Message125824
| Author |
v+python |
| Recipients |
BreamoreBoy, David.Sankel, amaury.forgeotdarc, brian.curtin, christian.heimes, christoph, davidsarah, ezio.melotti, lemburg, mark, pitrou, ssbarnea, tim.golden, tzot, v+python, vstinner |
| Date |
2011年01月09日.06:52:49 |
| SpamBayes Score |
2.0056639e-08 |
| Marked as misclassified |
No |
| Message-id |
<1294555979.18.0.574724683586.issue1602@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Interesting!
I was able to tweak David-Sarah's code to work with Python 3.x, mostly doing things that 2to3 would probably do: changing unicode() to str(), dropping u from u'...', etc.
I skipped the unmangling of command-line arguments, because it produced an error I didn't understand, about needing a buffer protocol. But I'll attach David-Sarah's code + tweaks + a test case showing output of the Cyrillic alphabet to a console with code page 437 (at least, on my Win7-64 box, that is what it is).
Nice work, David-Sarah. I'm quite sure this is not in a form usable inside Python 3, but it shows exactly what could be done inside Python 3 to make things work... and gives us a workaround if Python 3 is not fixed. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年01月09日 06:52:59 | v+python | set | recipients:
+ v+python, lemburg, tzot, amaury.forgeotdarc, pitrou, vstinner, christian.heimes, tim.golden, mark, christoph, ezio.melotti, ssbarnea, brian.curtin, davidsarah, BreamoreBoy, David.Sankel |
| 2011年01月09日 06:52:59 | v+python | set | messageid: <1294555979.18.0.574724683586.issue1602@psf.upfronthosting.co.za> |
| 2011年01月09日 06:52:50 | v+python | link | issue1602 messages |
| 2011年01月09日 06:52:49 | v+python | create |
|