Message155844
| Author |
roger.serwy |
| Recipients |
asvetlov, ezio.melotti, loewis, ned.deily, python-dev, roger.serwy, terry.reedy, vbr, vstinner |
| Date |
2012年03月15日.02:25:20 |
| SpamBayes Score |
3.807556e-09 |
| Marked as misclassified |
No |
| Message-id |
<1331778321.79.0.331624089649.issue14200@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Andrew, I do admit that I have a lot to learn about Unicode support in Python, for instance with its error-handling and its corner cases.
On Windows Vista, I do see that print() behaves differently than evaluating the expression. An exception is raised for:
print('\N{GOTHIC LETTER AHSA}')
On Linux, I see the character print as ? in xterm and as a '?' when evaluated. In gnome-terminal (Ubuntu Mono font) it prints as a box containing the code point in hex. No exception is raised.
I do see your point. The patch I provided always substitutes the unsupported character with its full expansion. Returning to a point earlier raised by Martin, using REPLACEMENT CHARACTER instead would be better. It would make the behavior of IDLE more consistent with xterm and gnome-terminal, although it would cause IDLE to hide errors if the program ran from a Windows console instead of IDLE.
Given that Windows and Linux (Ubuntu) behave differently, I'd rather let IDLE mimic the behavior of a Linux console than a Windows console. |
|