On Sun, Jul 24, 2016 at 11:55 PM, Eric Vought evought@pobox.com wrote:
According to this: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).a... NTFS stores file names internally in Unicode, but there are several versions of the API calls to get short/long/Unicode names. So, since CHIRP uses Unicode internally, it is likely not a matter of converting the path to Unicode but making sure that all of the API calls catch it that way in the first place (which should never hurt folks with only ASCII characters in their paths).
This page ( http://stackoverflow.com/questions/10180765/open-file-with-a-unicode-filenam... ) has details on handling this in Python. If you explicitly pass a Unicode strong *in* you will always get Unicode back from the call. Example with os.listdir() at bottom.
[I apologize to all the users here that don't care about dev stuff. We're clearly in http://intrepid.danplanet.com/mailman/listinfo/chirp_devel territory now.]
In this case, we're not feeding in a variable, just reading one with os.getenv(). http://chirp.danplanet.com/projects/chirp/repository/entry/chirp/platform.py...
It looks like this post addresses our specific problem: https://measureofchaos.wordpress.com/2011/03/04/python-on-windows-unicode-en...
Tom KD7LXL