What unicode character has a certain value?
Martin v. Loewis
martin at v.loewis.de
Wed Jul 24 02:15:25 EDT 2002
Gerhard Haering <gerhard.haering at gmx.de> writes:
> > a unicode string to an ascii string (if possible);
>
> .encode(encoding, conflict_strategy=None)
>
> for example: u"foobar".encode("utf-16")
Of course, if it is really ASCII (American Standard Code for
Information Interchange) that is desired, it is always
u"foobar".encode("ascii")
Regards,
Martin
More information about the Python-list
mailing list