[Python-Dev] len(chr(i)) = 2?

Raymond Hettinger raymond.hettinger at gmail.com
Mon Nov 22 19:29:33 CET 2010


On Nov 22, 2010, at 9:41 AM, Terry Reedy wrote:

> On 11/22/2010 5:48 AM, Stephen J. Turnbull wrote:
> 
>> I disagree.  I do see a problem with "UCS-2", because it fails to tell
>> us that Python implements a large number of features that make it easy
>> to do a very good job of working with non-BMP data in 16-bit builds of
> 
> Yes. As I read the standard, UCS-2 is limited to BMP chars. So I was a bit confused when Python was described as UCS-2, until I realized that the term was inaccurate. Using that term punishes people like me who take the time to read the standard or otherwise learn what the term means.

Bingo!

Thanks for the excellent summary of the problem.

> 
> What Python does might be called USC-2+ or UCS-2e (xtended).

That would be a step in the right direction.


Raymond



More information about the Python-Dev mailing list