When using the right-click menu context, windows passes file path as raw (byte) string type.
For example:
path = 'C:\\MyDir\\\x99\x8c\x85\x8d.mp3'
Many external packages in my application are expecting unicode
type strings, so I have to convert it into unicode
.
That would be easy if we'd known the raw string's encoding beforehand (In the example, it is cp1255
). However I can't know which encoding will be used locally on each computer around the world.
How can I convert the string
into unicode
? Perhaps using win32api
is needed?