Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #28206

Re: why i can't set locale?

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'locale': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:set': 0.09; 'received:80.91.229.3': 0.16; 'received:dip.t-dialin.net': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-dialin.net': 0.16; 'setlocale': 0.16; 'unsupported': 0.16; 'wrote:': 0.17; 'skip:" 30': 0.20; '"",': 0.22; 'skip:_ 20': 0.22; 'header:User- Agent:1': 0.26; 'setting': 0.26; '(most': 0.27; 'header:X -Complaints-To:1': 0.28; '>>>>': 0.29; 'file': 0.32; 'picking': 0.33; 'traceback': 0.33; 'to:addr:python-list': 0.33; 'skip:l 30': 0.35; 'subject:?': 0.35; 'received:org': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: why i can't set locale?
Date Sat, 01 Sep 2012 08:10:40 +0200
Organization None
References <CA+YdQ_4KAYdOf8xJtkVxH6gShFXTNwHm7X9cuTxB8474d0zasA@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host p5084a216.dip.t-dialin.net
User-Agent KNode/4.7.3
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.26.1346479853.27098.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1346479853 news.xs4all.nl 6931 [2001:888:2000:d::a6]:38852
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:28206

Show key headers only | View raw


contro opinion wrote:

>>>> locale.setlocale(locale.LC_ALL, 'gbk')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.6/locale.py", line 513, in setlocale
>     return _setlocale(category, locale)
> locale.Error: unsupported locale setting

Try picking one of the locales listed by

$ locale -a

(Goggle suggests that you may be looking for "zh_CN.GBK")

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: why i can't set locale? Peter Otten <__peter__@web.de> - 2012-09-01 08:10 +0200

csiph-web