[XML-SIG] [OT] locale.py doesn't work? (fwd)

Roman Suzi rnd@onego.ru
Tue, 6 Feb 2001 08:23:26 +0300 (MSK)

I am sorry for offtopic, but I can't contact Martin at
martin@mira.cs.tu-berlin.de for a week already.
(connection refused)

---------- Forwarded message ----------
Date: Tue, 30 Jan 2001 15:46:02 +0300 (MSK)
From: Roman Suzi <rnd@onego.ru>
To: Martin v. Loewis <martin@mira.cs.tu-berlin.de>
Subject: locale.py doesn't work?

Hello, Martin!

I am trying to use ru_RU.koi8-r locale
(collation, uppercase, etc) but it doesn't work
for unknown reason.

Here is a code:

> cat ./try_locale.py
#!/usr/bin/env python

import locale

import os
# os.environ["LC_ALL"] =3D "ru_RU.CP1251"

# print locale.getdefaultlocale()


print locale.getlocale()

print locale.string.uppercase
print locale.string.lowercase

# End of try_locale.py

> ./try_locale.py
['ru_RU', 'ISO8859-5']

- which is wrong, because koi8-r uppercase letters are different.
It is not even ISO8859-5 (I tried with recode:

> ./try_locale.py | recode ISO8859-5..koi8-r
['ru_RU', 'ISO8859-5']
ABCDEFGHIJKLMNOPQRSTUVWXYZ=B3recode: Invalid input in step

- and this is strange.

Am I missing something important?
Or is it a bug in Python 2.0?
(All this in BlackCat Linux 6.2 ~=3D RH 6.2)

(You are the author of the article "Internationalizing Python"
so probably you could answer this question.)

Sincerely yours, Roman Suzi
Vote for my design: http://silvermouse.onego.ru/gray.php3?id=3D0018
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd@onego.ru _/
_/ Tuesday, January 30, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "Give instruction to a wise man and he will be yet wiser." _/