Message293518
Eryk> I tried print(transurrogate(s)) from editor and it worked!, printing '🔫 🔪' (though not near as pretty as here in Firefox.
I have previously thought of scanning strings before inserting into Text widgets and converting astral chars to \U000nnnnn form, with a color tag to distinguish such displays from the literal ten chars. This should work fine for read-only output to Shell but not easily in Editor. On Windows, I would just use transurrogate instead, and that would also work for loading files into the editor.
I believe transurrogate could potentially solve pasting on Windows by intercepting <<Paste>> events.
Serhiy, are you aware of Eryk's astral char workaround for Windows? Could it be incorporated into _tkinter, where a string's kind is accessible? |
|
Date |
User |
Action |
Args |
2017-05-11 22:16:55 | terry.reedy | set | recipients:
+ terry.reedy, serhiy.storchaka, eryksun, David E. Franco G. |
2017-05-11 22:16:55 | terry.reedy | set | messageid: <1494541015.77.0.731406517437.issue30019@psf.upfronthosting.co.za> |
2017-05-11 22:16:55 | terry.reedy | link | issue30019 messages |
2017-05-11 22:16:55 | terry.reedy | create | |
|