Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.066 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.01; 'installed.': 0.07; 'used.': 0.07; 'locale': 0.09; 'set,': 0.16; 'subject:usage': 0.16; 'wrote:': 0.16; 'linux': 0.17; 'skip:m 30': 0.19; "aren't": 0.21; 'header:In-Reply-To:1': 0.22; 'windows': 0.26; 'problem': 0.28; 'sort': 0.33; 'to:addr:python-list': 0.33; 'header:User- Agent:1': 0.34; 'file': 0.36; 'subject:: ': 0.39; 'received:192': 0.39; 'to:addr:python.org': 0.39; 'wish': 0.69; 'received:62': 0.70; 'cautious': 0.84; 'charm': 0.84; 'from:addr:t': 0.84; 'reachable': 0.84 Date: Tue, 06 Sep 2011 17:53:37 +0200 From: Thomas Jollans User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.1) Gecko/20110831 Thunderbird/6.0.1 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Portable locale usage References: <6abee826-23f3-4d5e-948e-f2a436bf0ac0@t3g2000vbe.googlegroups.com> In-Reply-To: <6abee826-23f3-4d5e-948e-f2a436bf0ac0@t3g2000vbe.googlegroups.com> X-Enigmail-Version: 1.3.1 OpenPGP: id=5C8691ED Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1315324373 news.xs4all.nl 2515 [2001:888:2000:d::a6]:54212 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12840 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 that is of course that a Croatian locale has to be installed. Many Linux systems don't have locales that aren't used.