Menu ▾ ▴

#8 SELECT and GETSELECTION disagree about the columns of emoji

open
nobody
None
4 hours ago
4 hours ago
No

Noticed while testing a GExperts fix for identifiers after non-ASCII characters: for a character outside the Basic Multilingual Plane, e.g. an emoji, which is a surrogate pair in UTF-16, SELECT counts it as 2 columns, while GETSELECTION reports it as 1.

So selecting a range with SELECT and reading it back with GETSELECTION does not give the same columns on such a line.

Not investigated further. The first step is to check visually in the editor which of the two matches what the IDE shows, for Delphi 13 and for a pre-XE version (where the editor columns count UTF-8 bytes).

Discussion


Log in to post a comment.