[IronPython] IronPython unichr() problem with values greater than 65536

Dino Viehland dinov at microsoft.com
Tue May 11 17:22:36 CEST 2010


Can Gencer wrote:
>  I am having some problems with the unichr() built in function in
>  IronPython. It only seems to support unicode characters up to 2 bytes,
>  not the extended unicode characters. You can simply try a command like
>  unichr(66363) and it will give a ValueError, saying that the value is
>  not in range. However 66363 is a valid unicode character. Is there a
>  way to configure IronPython to support wide unicode characters? I am
>  using IronPython 2.6.


There's no way to get 32-bit Unicode support.  IronPython builds on the
Unicode support from .NET which is only UTF16.  Of course you can always
use surrogate characters to represent the full range of characters.



More information about the Ironpython-users mailing list