Portable locale usage
t at jollybox.de
Wed Sep 7 09:15:53 EDT 2011
On 07/09/11 12:39, ssegvic wrote:
> On 6 ruj, 17:53, Thomas Jollans <t... at jollybox.de> 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
>>> When the locale is properly set, sorting works like a charm
>>> with mylist.sort(key=locale.strxfrm).
>> The problem with that is of course that a Croatian locale has to be
>> installed. Many Linux systems don't have locales that aren't used.
> It appears we did not understand each other completely.
Yes we did. I was just pointing out that your code wouldn't be portable
to systems that don't have that specific locale.
More information about the Python-list