> From: "Laszlo Nagy"
> To: "Siniša Šegvić" , python-list@python.org
> Sent: Friday, September 9, 2011 11:39:52 AM
> Subject: Re: Portable locale usage
>
> Looks like you have found a bug! :-) Why don't you post a bug report?
I just did:
http://bugs
Why are you trying to force a specific locale to your program
anyway?
Because I wish to be able to correctly sort Croatian names.
Well, all right. If you want to sort Croatian names from a program that
runs on an English (or whatever) system, then you will have to check the
platform and use a
> From: "Laszlo Nagy"
> To: "Siniša Šegvić" , python-list@python.org
> Sent: Thursday, September 8, 2011 10:41:22 AM
> Subject: Re: Portable locale usage
> > I have set the system-wide locale to Croatian (Croatia)
> > on my development system as instru
I have set the system-wide locale to Croatian (Croatia)
on my development system as instructed by:
http://windows.microsoft.com/en-US/windows-vista/Change-the-system-locale
Nevertheless, your proposal produces:
('English_United States','1252')
This is what I see on my Hungarian Windows:
C:\U
On 07/09/11 20:33, Siniša Šegvić wrote:
> I expect that most of my Windows users will not care
> to configure their computers with the national locale
> (and besides, that does not seem to work, anyway).
Are, on Windows, the default system region/language setting, and the
locale, distinct? (And,
> From: "Laszlo Nagy"
> To: "ssegvic" , python-list@python.org
> Sent: Wednesday, September 7, 2011 4:51:20 PM
> Subject: Re: Portable locale usage
> > 1. Is there a way for writing portable Python code dealing with
> > locales (as sketched in the begi
1. Is there a way for writing portable Python code dealing with
locales
(as sketched in the beginning)?
I usually do this at the top of my main program, before importing other
modules:
import locale
locale.setlocale(locale.LC_ALL, '')
This is absolutely portable. The above snippet work
On 07/09/11 12:39, ssegvic wrote:
> On 6 ruj, 17:53, Thomas Jollans wrote:
>> On 06/09/11 16:46, ssegvic wrote:
>>
>>> For the moment, I only wish to properly sort a Croatian text file
>>> both on Windows and Linux (I am a cautious guy, I like reachable
>>> goals).
>>> When the locale is properly
On 6 ruj, 17:53, Thomas Jollans wrote:
> On 06/09/11 16:46, ssegvic wrote:
>
> > For the moment, I only wish to properly sort a Croatian text file
> > both on Windows and Linux (I am a cautious guy, I like reachable
> > goals).
> > When the locale is properly set, sorting works like a charm
> > wi
On 6 ruj, 17:53, Thomas Jollans wrote:
> On 06/09/11 16:46, ssegvic wrote:
>
> > For the moment, I only wish to properly sort a Croatian text file
> > both on Windows and Linux (I am a cautious guy, I like reachable
> > goals).
> > When the locale is properly set, sorting works like a charm
> > wi
On 6 ruj, 22:58, garabik-news-2005...@kassiopeia.juls.savba.sk wrote:
> Thomas Jollans wrote:
> > It looks like you don't actually care about the encoding: in your first
> > example, you use the default system encoding, which you do not control,
> > and in your second example, you're using two dif
Thomas Jollans wrote:
> It looks like you don't actually care about the encoding: in your first
> example, you use the default system encoding, which you do not control,
> and in your second example, you're using two different encodings on the
> two platforms. So why do you care whether or not t
On 06/09/11 16:46, ssegvic wrote:
> For the moment, I only wish to properly sort a Croatian text file
> both on Windows and Linux (I am a cautious guy, I like reachable
> goals).
> When the locale is properly set, sorting works like a charm
> with mylist.sort(key=locale.strxfrm).
The problem with
On 6 ruj, 15:13, Vlastimil Brom wrote:
> There may be some differences btween OSes end the versions, but using
> python 2.7 and 3.2 on Win XP and Win7 (Czech)
> I get the following results for setlocale:
>
> >>> locale.setlocale(locale.LC_ALL,'Croatian')
>
> 'Croatian_Croatia.1250'>>> locale.getl
On 6 ruj, 13:16, Thomas Jollans wrote:
> > locale.setlocale(locale.LC_ALL, (myISOCountryCode,
> > locale.getpreferredencoding()))
>
> As far as I can tell, this does work. Can you show us a traceback?
Sorry, I was imprecise.
I wanted to say that the above snippet
does not work both on Windows an
2011/9/6 ssegvic :
> Hi,
>
> I am musing on how to write portable Python3 code which would
> take advantage of the standard locale module.
>
> For instance, it would be very nice if we could say something like:
>
> # does not work!
> myISOCountryCode='hr'
> locale.setlocale(locale.LC_ALL, (myISOCou
On 06/09/11 11:59, ssegvic wrote:
> Hi,
>
> I am musing on how to write portable Python3 code which would
> take advantage of the standard locale module.
>
> For instance, it would be very nice if we could say something like:
>
> # does not work!
Doesn't it?
> myISOCountryCode='hr'
This is a l
Hi,
I am musing on how to write portable Python3 code which would
take advantage of the standard locale module.
For instance, it would be very nice if we could say something like:
# does not work!
myISOCountryCode='hr'
locale.setlocale(locale.LC_ALL, (myISOCountryCode,
locale.getpreferredencodin
18 matches
Mail list logo