PuTTY wish windows-utf16

This is a mirror. The primary PuTTY web site can be found here.

Home | Licence | FAQ | Docs | Download | Keys | Links
Mirrors | Updates | Feedback | Changes | Wishlist | Team

summary: Support UTF-16 on Windows
class: wish: This is a request for an enhancement.
difficulty: tricky: Needs many tuits.
priority: low: We aren't sure whether to fix this or not.

Josef Hinteregger reports that the CF_UNICODETEXT data stored by Windows in the clipboard is encoded in UTF-16; that is, it can contain surrogate pairs representing characters outside the BMP. PuTTY does not currently interpret those pairs. Of course, if it did, it would also have to be able to write them out again when copying to the clipboard itself or talking to the Windows GDI text display primitives, etc.

I can see two sensible ways to solve this. One is to do translation to and from UTF-16 on the platform side of the front end interface, if necessary for a given platform. So:

The other option is to do the UTF-32/UTF-16 translation on the cross-platform side (terminal.c and ldisc.c), and have it enabled or disabled by a #define in each platform header file. (The #define is certainly necessary: partly because we shouldn't accept UTF-16 surrogate pairs coming from front ends which are supposed to be speaking UTF-32, on the usual grounds of not accepting redundant encodings, but mostly because terminal.c will obviously need to know whether to send surrogate pairs when sending Unicode data back to the front end!)

I'm currently inclined to the first option, because UTF-16 is nasty and I'd rather it complicated only those front ends that had to deal with it than that it complicated the core code.

Audit trail for this wish.


If you want to comment on this web site, see the Feedback page.
(last revision of this bug record was at 2008-03-11 09:53:28 +0000)