Re: Problem with national characters
- From: "Leif B. Kristensen" <abuse@xxxxxxxxxxxxxx>
- Date: Sat, 09 Apr 2005 12:03:44 +0200
"Martin v. Löwis" skrev:
> You need to do locale.setlocale(locale.LC_ALL, "") to get
> locale-specific upper-casing.
That makes a lot of sense. Thank you.
>>> 'før'.upper()
'F\xf8R'
>>> 'FØR'
'F\xd8R'
>>> import locale
>>> locale.setlocale(locale.LC_ALL, "")
'no_NO'
>>> 'før'.upper()
'F\xd8R'
>>> 'FØR'
'F\xd8R'
I must make a note of the LC_ALL variable in the installation README.
I for one have been running Gentoo Linux for two years without ever
setting the locale, - but now I've finally gotten around to write my
own /etc/env.d/02locale file :-)
> Notice that things are more difficult in the Windows terminal window,
> as this uses an encoding different from the one that the system's
> locale functions expect.
The real input will come from a GUI or a browser interface, so the
Windows terminal problem isn't really an issue.
--
Leif Biberg Kristensen
http://solumslekt.org/
.
- References:
- Problem with national characters
- From: Leif B. Kristensen
- Re: Problem with national characters
- From: "Martin v. Löwis"
- Problem with national characters
- Prev by Date: Re: change the date string into timestamp
- Next by Date: Re: change the date string into timestamp
- Previous by thread: Re: Problem with national characters
- Next by thread: split an iteration
- Index(es):
Relevant Pages
|