How do I get the encoding that is used for the string returned by GetUserName
from the win32 API? I'm using pywin32 and it returns an 8-bit string. On my German XP, this string is obviously encoded using Latin-1, but this might not be the case for other Windows installations.
I could use GetUserNameW
, but I would have to wrap that myself using ctypes, which I'd like to avoid for now if there is a simpler solution.