This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients David E. Franco G., eryksun, serhiy.storchaka, terry.reedy
Date 2017-05-11.22:16:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494541015.77.0.731406517437.issue30019@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2017-05-11 22:16:55terry.reedysetrecipients: + terry.reedy, serhiy.storchaka, eryksun, David E. Franco G.
2017-05-11 22:16:55terry.reedysetmessageid: <1494541015.77.0.731406517437.issue30019@psf.upfronthosting.co.za>
2017-05-11 22:16:55terry.reedylinkissue30019 messages
2017-05-11 22:16:55terry.reedycreate