This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients
Date 2004-08-12.19:40:48
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=580910

Many thanks to Bob Ippolito for finding what's going on...

It turns out that CoreFoundation.framework calls 
__setonlyClocaleconv when it is loaded. As the name suggests this 
breaks the locale API's. I don't know what whoever added this 
"functionality" was smoking, but at least he had enough sense to make it 
possible to restore functionality.

The prototype for __setonlyClocaleconv is: extern int 
__setonlyClocaleconv(int val);

Experimentation shows that setting val to a non-zero value breaks 
setlocale and setting it to 0 re-enables setlocale. The function returns the 
previous setting.

This means it is possible to create a workaround for this issue:

1) Add configure and/or weak-linking magic to detect the function
2) Call oldValue = __setonlyClocaleconv(0) before using a locale API
3) Call __setonlyClocaleconv(oldValue) after doing so.

Would such a patch be accepted?
History
Date User Action Args
2007-08-23 14:24:54adminlinkissue1005113 messages
2007-08-23 14:24:54admincreate