Message111470
| Author |
ronaldoussoren |
| Recipients |
ezio.melotti, piro, ronaldoussoren, vstinner |
| Date |
2010年07月24日.12:47:01 |
| SpamBayes Score |
4.6956335e-05 |
| Marked as misclassified |
No |
| Message-id |
<1279975623.1.0.83899500431.issue9167@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Using the CF API to fetch the system encoding won't work:
Using PyObjC:
>>> CFStringConvertEncodingToIANACharSetName(CFStringGetSystemEncoding())
u'macintosh'
There doesn't seem to be another way to extract the prefered encoding from the system.
I see two possible resolutions for this issue:
* Close as won't fix
This is technically a platform issue that has been fixed in OSX 10.5
* Add a workaround that explicitly sets os.environ['LANG'] to
'en_US.UTF-8' before converting argument and environment values
to Unicode (only on OSX < 10.4, when LANG=C and of course resetting
the previous value after conversion)
I have a 10.4 system I could develop this on, but that's currently in a different country than me. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年07月24日 12:47:03 | ronaldoussoren | set | recipients:
+ ronaldoussoren, vstinner, piro, ezio.melotti |
| 2010年07月24日 12:47:03 | ronaldoussoren | set | messageid: <1279975623.1.0.83899500431.issue9167@psf.upfronthosting.co.za> |
| 2010年07月24日 12:47:01 | ronaldoussoren | link | issue9167 messages |
| 2010年07月24日 12:47:01 | ronaldoussoren | create |
|