[Python-Dev] Removal of Win32 ANSI API (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Fri Nov 26 21:39:36 CET 2010
- Previous message: [Python-Dev] Removal of Win32 ANSI API
- Next message: [Python-Dev] Issues 9931 and 9055 - test_ttk_guionly and buildbot run as a service
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 PyUnicodeFSDecoder 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 winreadlink() 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
- Previous message: [Python-Dev] Removal of Win32 ANSI API
- Next message: [Python-Dev] Issues 9931 and 9055 - test_ttk_guionly and buildbot run as a service
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]