On Thu, Apr 19, 2018 at 11:50:25AM +0300, Emanuele Giaquinta wrote:
You seem to assume that the 'data' argument to 'tt_paste' is in utf-8
encoding, while it is actually in locale encoding (see the
rxvt_selection object in rxvttoolkit.C).

Yes, that is to be fixed. I've looked up the code. I would have preferred to move the filtering up to work with unicode representation (and avoid sequence matching), but strings are coming from xlib and they are in locale encoding.

So, there are two general ways to deal with all this: 1) go through intermediate unicode representation or 2) pre-build byte sequences based on the user locale and apply them as-is afterwards. The second option seems less wasteful but I'm not sure that a specific byte sequence will always match the whole codepoint and won't span across multiple codepoints (it can't happen in utf8 and such, but there are lots of encodings). Anyway, I will look into this somewhat soon.

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/rxvt-unicode

Reply via email to