4 ms·
Can someone link me to where python uses UTF-16? It was my understanding it defaulted to UTF-8. http://www.python.org/dev/peps/pep-3120/ http://www.python.org/
by natmaster 16y ago
Can someone link me to where python uses UTF-16? It was my understanding it defaulted to UTF-8.
http://www.python.org/dev/peps/pep-3120/ http://www.python.org/dev/peps/pep-3120/
- lysium 16y agoThat PEP only refers to the encoding of the source (code) file, not to the encoding on how strings are stored in Python. Edit: Your question might be answered at SO: http://stackoverflow.com/questions/1838170/what-is-internal-representation-of-string-in-python-3-x#1838285 http://stackoverflow.com/questions/1838170/what-is-internal-...
- fedd 16y agosorry for the quastion as the reply, i would also ask for some info about the unicode issues in jython, as i lack experience with all python stuff. does it have problems or everything is transparent?
- masklinn 16y ago> It was my understanding it defaulted to UTF-8. For external IO, internally it's in UTF-16 (actually UCS-2, mostly unaware of surrogates) or in UCS-4 (via a compile-time switch). See http://docs.python.org/c-api/unicode.html#Py_UNICODE http://docs.python.org/c-api/unicode.html#Py_UNICODE for the Py_UNICODE API.
- fnl 16y agocheck PEP-261