[python-nl] print euro

Jeroen Ruigrok van der Werven asmodai at in-nomine.org
Thu Feb 7 20:37:58 CET 2008


-On [20080207 20:20], egbert (egbert.bouwman at hccnet.nl) wrote:
>maar in de python shells:
>    print unichr(164)   ---> het euro teken, en dat is latin-9
>    print unichr(8364)  ---> gaat fout, not in range(256)

Op mijn FreeBSD machine met locale op UTF-8 werkt je voorbeeld gewoon:

>>> print unichr(8364)
€

Ik denk dat je hier tegenaan loopt:

http://bugs.python.org/issue1602

Normaal gesproken zou je codepage 65001 op Windows gebruiken voor UTF-8
ondersteuning.

-- 
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/
To err is human, to forgive divine...


More information about the Python-nl mailing list