Jack Jansen wrote: > > I guess we need another format specifier than "s" here. "s" does the > conversion to standard-python-utf8 for wide strings, Actually, "t" does the UTF-8 conversion... "s" will give you the raw internal UTF-16 representation in platform byte order. > and we'd need another > format for conversion to current-local-os-convention-8-bit-encoding-of-unicode- > strings. I'd suggest adding some king of generic PyOS_FilenameFromObject(PyObject *v, void *buffer, int buffer_len) API for the conversion of strings, Unicode and text buffers to an OS dependent filename buffer. And/or perhaps sepcific APIs for each OS... e.g. PyOS_MBCSFromObject() (only on WinXX) PyOS_AppleFromObject() (only on Mac ;) > I assume that that would also come in handy for MacOS, where we'll have the > same problem (filenames are in Apple's proprietary 8bit encoding). Is that encoding already supported by the encodings package ? If not, could you point me to a map file for the encoding ? -- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
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