Message177812
| Author |
serhiy.storchaka |
| Recipients |
JBernardo, Rosuav, asvetlov, ezio.melotti, ned.deily, roger.serwy, serhiy.storchaka, terry.reedy |
| Date |
2012年12月20日.12:57:02 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1356008222.68.0.914686538381.issue13153@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
A simplest solution is to raise a TclError instead of ValueError for non-BMP characters. This should not break any existing code, because a user code should be ready to catch a TclError in any case. Here is a patch.
A more complicated solution is to add ValueError to any catch of TclError. And this will fix only IDLE, user programs should fix self every.
Also we can silently encode non-BMP characters for Tcl with UTF-16 (and decode a result back). This can cause some subtle errors with shifted indices however. |
|