[Python-Dev] ParseTuple question (original) (raw)
Mark Hammond skippy.hammond at gmail.com
Sun Jan 4 00:01:37 CET 2009
- Previous message: [Python-Dev] ParseTuple question
- Next message: [Python-Dev] ParseTuple question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2/01/2009 10:32 PM, Ulrich Eckhardt wrote:
Hi!
I'm looking at NullImporterinit in import.c and especially at the call to PyArgParseTuple there. What I'm wondering is what that call will do when I call the function with a Unicode object. Will it convert the Unicode to a char string first, will it return the Unicode object in a certain (default) encoding, will it fail?
PyArg_ParseTuple will fail if a unicode object is passed where a 's' format string is specified.
I'm working on the MS Windows CE port, and I don't have stat() there. Also, I don't have GetFileAttributesA(char const*) there, so I need a wchart (UTF-16) string anyway. What would be the best way to get one?
On 'normal' windows you generally would need to use WideCharToMultiByte() to get a 'char *' version of your wchar string - but I expect you already know that, so I doubt I understand the question...
Cheers,
Mark
- Previous message: [Python-Dev] ParseTuple question
- Next message: [Python-Dev] ParseTuple question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]