Bug 89291 - problem with non-unicode locale in threads
Summary: problem with non-unicode locale in threads
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: python
Version: 9
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Mihai Ibanescu
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2003-04-22 09:51 UTC by Eugene Morozov
Modified: 2007-04-18 16:53 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-09-30 15:57:45 UTC

Attachments (Terms of Use)

Description Eugene Morozov 2003-04-22 09:51:11 UTC
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 20:07:17 UTC
How does it behave in Fedora?

Comment 2 Mihai Ibanescu 2005-09-30 15:57:45 UTC
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.