[Python-bugs-list] [ python-Bugs-678259 ] locale.getpreferredencoding fails on AIX
SourceForge.net
noreply@sourceforge.net
Mon, 03 Mar 2003 15:11:00 -0800
Bugs item #678259, was opened at 2003-01-31 19:01
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=678259&group_id=5470
Category: Extension Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Martin v. Löwis (loewis)
Summary: locale.getpreferredencoding fails on AIX
Initial Comment:
The problem is setting LC_CTYPE to an empty string:
>>> locale.setlocale(locale.LC_CTYPE, '')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/neal/python/dist/aix/Lib/locale.py", line
381, in setlocale
return _setlocale(category, locale)
locale.Error: locale setting not supported
Putting a try/except around the setlocale call in
getpreferredencoding allows the test to pass. I don't
know if this is correct.
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2003-03-04 00:11
Message:
Logged In: YES
user_id=21627
What are the relevant environment settings? According to
http://nscp.upenn.edu/aix4.3html/libs/basetrf2/setlocale.htm
specifying "" as the second argument of setlocale is
supported, and means the same thing as it does on all other
systems: take locale settings from the user preferences.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=678259&group_id=5470