Bug 89291 - problem with non-unicode locale in threads
problem with non-unicode locale in threads
Product: Red Hat Linux
Classification: Retired
Component: python (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Mihai Ibanescu
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2003-04-22 05:51 EDT by Eugene Morozov
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-30 11:57:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eugene Morozov 2003-04-22 05:51:11 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
The following program should output identical strings (both should be
lowercase), but it prints uppercase version in thread until setlocale is called:

from threading import Thread

TEXT=u'\u041a\u0420\u042b\u0421\u042b \u0438

class TestThread(Thread):
    def __init__(self):

    def run(self):
        print 'In thread: %s' % TEXT.lower()
        locale.setlocale(locale.LC_ALL, LOCALE)
        print 'After setlocale in thread: %s' % TEXT.lower()

locale.setlocale(locale.LC_ALL, LOCALE)
t = TestThread()

Therefore locale.setlocale() in main thread doesn't have effect in another
threads. On Red Hat 8 this works as expected.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Run the included code snippet    

Actual Results:  In thread: ����� � ����
After setlocale in thread: ����� � ����

Expected Results:  In thread: ����� � ����
After setlocale in thread: ����� � ����

Additional info:
Comment 1 Mihai Ibanescu 2004-04-05 16:07:17 EDT
How does it behave in Fedora?
Comment 2 Mihai Ibanescu 2005-09-30 11:57:45 EDT
Since there are insufficient details provided in this report for us to
investigate the issue further, and we have not received the feedback we
requested, we will assume the problem was not reproduceable or has been fixed in
a later update for this product.

Users who have experienced this problem are encouraged to upgrade to the latest
update release, and if this issue is still reproduceable, please contact the Red
Hat Global Support Services page on our website for technical support options:

If you have a telephone based support contract, you may contact Red Hat at
1-888-GO-REDHAT for technical support for the problem you are experiencing. 

Note You need to log in before you can comment on or make changes to this bug.