Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #18497
| From | Marko Rauhamaa <marko@pacujo.net> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Locale bug? |
| References | <m3ty4dc5b7.fsf@elektro.pacujo.net> <8739bwop3y.fsf@enterprise.ximalas.info> |
| Date | 2012-01-04 14:51 +0200 |
| Message-ID | <m3pqezd41b.fsf@elektro.pacujo.net> (permalink) |
| Organization | NBL Networks Oy |
"=?ISO-8859-1?Q?Trond_Endrest=F8l?=" <Trond.Endrestol@ximalas.info>:
> Marko Rauhamaa <marko@pacujo.net> writes:
>> $ python3
>> >>> locale.setlocale(locale.LC_TIME, ('fi_FI', 'UTF-8'))
>> >>> time.strftime("%a, %d %b %Y %H:%M:%S %z (%Z)")
>> 'ti, 03 tammi\xa0 2012 14:51:57 +0200 (EET)'
>
> It may be OS-specific.
You're right. It's a generic linux problem (in the coreutils rpm of
Fedora). An analogous C program demonstrates the same issue.
> Your sample code runs fine on FreeBSD/i386
> trond@enterprise:~>python3.2
> >>> locale.setlocale(locale.LC_TIME, ('fi_FI', 'UTF-8'))
> >>> time.strftime("%a, %d %b %Y %H:%M:%S %z (%Z)")
> 'Ti, 03 Tam 2012 15:03:15 +0100 (CET)'
Well, "Ti" and "Tam" probably shouldn't be capitalized...
Marko
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Locale bug? Marko Rauhamaa <marko@pacujo.net> - 2012-01-03 14:57 +0200
Re: Locale bug? =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@ximalas.info> - 2012-01-03 15:08 +0100
Re: Locale bug? Marko Rauhamaa <marko@pacujo.net> - 2012-01-04 14:51 +0200
Re: Locale bug? Marko Rauhamaa <marko@pacujo.net> - 2012-01-04 15:07 +0200
csiph-web