Yes, they do from 3.0 to 3.2. Windows uses narrow assemblies, while (most) Unix uses wide assemblies
Using Python 3.2 on Windows:
>>> a = '\N{MAHJONG TILE GREEN DRAGON}' >>> len(a) 2 >>> a '🀅'
Although this behavior is expected in version 3.3+ using Windows:
>>> a = '\N{MAHJONG TILE GREEN DRAGON}' >>> len(a) 1 >>> a '\U0001f005' >>> print(a) Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> print(a) UnicodeEncodeError: 'UCS-2' codec can't encode character '\U0001f005' in position 0: Non-BMP character not supported in Tk
The UCS-2 codec is used on Tk (I use IDLE - the terminal may show another error).
Jbernardo
source share