unicode string literals and "u" prefix
Diez B. Roggisch
deetsNOSPAM at web.de
Tue Nov 9 18:35:48 EST 2004
Hi,
> Working for an insurance company, most of our data contain french
> accented characters.
> So, we are condemned to work essentially with unicode strings.
> In fact, it is hard to find examples where plain ascii strings would
> be useful in our case.
> Even data we retrieve from databases are returned to us as unicode
> strings.
This statement looks as if you confuse utf-8 and unicode. They are not the
same. The former is an encoding of the latter.
> A way of defaulting all string literal as unicode would have been a
> relief.
I can understand that wish, but it certainly would break too much existing
3rd-party-code. But I wonder if a tool as pychecker could be enhanced to
issue warnings on python code if string literals are not prefixed by an u.
--
Regards,
Diez B. Roggisch
More information about the Python-list
mailing list