UTF-8 in source code (Re: [Python-Dev] Internationalization Toolkit)
M.-A. Lemburg
mal@lemburg.com
Thu, 18 Nov 1999 19:32:49 +0100
Guido van Rossum wrote:
>
> > I guess to make ur"" have a meaning at all, we'd need to go
> > the Java preprocessor way here, i.e. scan the string *only*
> > for \uXXXX sequences, decode these and convert the rest as-is
> > to Unicode ordinals.
> >
> > Would that be ok ?
>
> Read Tim's code (posted about 40 messages ago in this list).
I did, but wasn't sure whether he was argueing for going the
Java way...
> Like Java, it interprets \u.... when the number of backslashes is odd,
> but not when it's even. So \\u.... returns exactly that, while
> \\\u.... returns two backslashes and a unicode character.
>
> This is nice and can be done regardless of whether we are going to
> interpret other \ escapes or not.
So I'll take that as: this is what we want in Python too :-)
--
Marc-Andre Lemburg
______________________________________________________________________
Y2000: 43 days left
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/