[Tutor] Using special characters in Python
Erik Price
eprice@ptc.com
Fri Feb 21 11:29:00 2003
Ole Jensen wrote:
> I would like to now if it is possible to use special characters in pyth=
on
> especially in strings.
I'm not sure if this will help you, but you can designate a given string=20
as a Unicode string by using this syntax:
unicode_string =3D u"=E6on flux"
There is also a unicode() function, you can read the docstring:
>>> print unicode.__doc__
unicode(string [, encoding[, errors]]) -> object
Create a new Unicode object from the given encoded string.
encoding defaults to the current default string encoding and
errors, defining the error handling, to 'strict'.
>>>
Erik