question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compiled app does not work if the path contains unicode characters

See original GitHub issue
  • Nuitka version
0.6.3rc4
Python: 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 12:45:02) [MSC v.1900 32 bit (Intel)]
Executable: C:\Users\Windows10\Desktop\deploy-dir\3.6.7\Scripts\python.exe
OS: Windows
Arch: x86
  • How did you install Nuitka and Python

Via pip on the factory branch.

  • SSCCE
from win32com.shell import shell, shellcon

# Simply print out the current username home folder (equivalent to %userprofile%)
path = shell.SHGetFolderPath(0, shellcon.CSIDL_PROFILE, None, 0)
print("path =", path)

Compiled with:

python -m nuitka --standalone --trace-execution --debug test.py

This works fine if the username is latin, but not with such names abc こん ツリー.

I attached ok.log and bad.log to show where is fails; but this is the final error:

Traceback (most recent call last):
  File "C:\Users\abc \u3053\u3093 \u30c4\u30ea\u30fc\Desktop\test.dist\test.py", line 1, in <module>
    from win32com.shell import shell, shellcon
  File "C:\Users\abc \u3053\u3093 \u30c4\u30ea\u30fc\Desktop\test.dist\win32com\__init__.py", line 5, in <module win32com>
ImportError

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Apr 4, 2019

Released as 0.6.3

1reaction
kayhayencommented, Mar 30, 2019

Seems the factory code worked on everything but MinGW64, where host encoded strings were used, and the new code has different name for that on Windows and Linux, which is something I now removed, should be better now.

@Nuitka/nuitka-pushers I plan to make a release 0.6.3 mostly right after I merged this into develop. It’s very crucial issue for compatibility with Windows, esp. to Asia. Lets try and also have the most important fixes in it, but nothing risky anymore. There is always a next release. Interestingly no hotfixes were necessary last time, and I like it that way. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does not accept unicode file path #293 - Cyan4973/xxHash
(1) We can safely use UTF-8 to represent Unicode filename for modern systems (except Windows). I have no idea how fopen() behaves with...
Read more >
Can I retrieve a path, containing other than Latin characters?
Windows API calls without a W or A suffix are mapped to either Unicode or ANSI version, depending on whether UNICODE is defined....
Read more >
spatialite_gui is unable to open file whose path contains ...
I have a little Windows application which is having the same trouble if it is compiled with ANSI (or MBCS) code. However when...
Read more >
I cannot install CCS since the path contains bad Unicode ...
I receive the error at the first installation step: "Your temp directory pah contains Unicode Characters which can corrupt the installation".
Read more >
Warning about bidirectional Unicode text | GitHub Changelog
A warning is now displayed when a file's contents include bidirectional Unicode text. Such text can be interpreted or compiled differently ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found