> Is it possible a conversion from bytes (ANSI) to unicode fails on > windows? It should fail sometimes, right? Not for windows-1252, but certainly for shift-jis (you know better than me). It seems that whether MultiByteToWideChar will fail depends on whether MB_ERR_INVALID_CHARS is given or not. I don't know what it will do if this flag is not given - my guess it fills in REPLACEMENT CHARACTER. > If not, is it allowed to convert to unicode with > PyUnicode_FSDecoder if function doesn't return str? For example, > os.stat() takes str as arguments but doesn't return str. This I don't understand. os.stat doesn't return text at all - so what do you want to convert? > # I noticed win_readlink() in Modules/posixmodule.c already unicode > # only. Maybe not so much problem? ;-) Well, readlink is new on Windows, and symlinks are not widespread. So there is no backwards compatibility concern here. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4