I like Unicode more than I used to...

Dan Bishop danb_83 at yahoo.com
Sat Feb 15 18:35:32 EST 2003


Skip Montanaro <skip at pobox.com> wrote in message news:<mailman.1045247567.10504.python-list at python.org>...
> For those of you living in a non-ASCII universe, I'm sure this will be
> old-hat.  You can hit 'd' now.
> 
> Now that I have a terminal application which can display utf-8 encoded data,
> I'm beginning to form a better opinion of Unicode.  I can do something like:
> 
>     >>> import codecs
>     >>> f = codecs.open("foo.test", "wb", "utf-8")
>     >>> f.write("abc\r\n")
>     >>> f.write(u"\N{TRADE MARK SIGN}\r\n")
>     >>> f.write(u"\u8482\r\n")
>     >>> f.close()
> 
> then simply cat the file to see what God hath wrought:

God hath wrought a black square?




More information about the Python-list mailing list