[Python-de] Python verschluckt sich an chinesischen Schriftzeichen

Michael Ströder michael at stroeder.com
Fr Jun 1 18:44:57 CEST 2012


Thomas 'PointedEars' Lahn wrote:
> Bernd Nawothnig wrote:
> 
>> On 2012-04-21, wb wrote:
>>> Laut sys.maxunicode (= 65535) habe ich wohl auch eine UTF-16 build,
>>> was genau das heißen mag...

Es ist dann ein UCS-2-Build:

  --enable-unicode[=ucs[24]]
                          Enable Unicode strings (default is ucs2)

>> Das heißt, dass dann nicht jedes Unicodezeichen intern abgespeichert
>> werden kann, also nicht nur nicht dargestellt werden kann.
> 
> Wie kommst Du auf dies schmale Brett?

Ist sys.maxunicode nicht die max. Anzahl der Unicode Code Points?

So richtig verstehe ich das hier nicht:
What is the difference between UCS-2 and UTF-16?
http://unicode.org/faq/basic_q.html#14

"[..] Sometimes in the past an implementation has been labeled "UCS-2" to
indicate that it does not support supplementary characters and doesn't
interpret pairs of surrogate code points as characters. Such an implementation
would not handle processing of character properties, code point boundaries,
collation, etc. for supplementary characters."

Ciao, Michael.


Mehr Informationen über die Mailingliste python-de