> On Jul 4, 2023, at 12:38 PM, Nikolay Nikolov via fpc-pascal 
> <fpc-pascal@lists.freepascal.org> wrote:
> 
> For console apps that use the Unicode KVM video unit, I've introduced two 
> functions for determining the display width of a Unicode string in the video 
> unit:
> 
> function ExtendedGraphemeClusterDisplayWidth(const EGC: UnicodeString): 
> Integer;
> { Returns the number of display columns needed for the given extended 
> grapheme cluster }
> 
> function StringDisplayWidth(const S: UnicodeString): Integer;
> { Returns the number of display columns needed for the given string }
> 
> Remember, the display width is different than the number of graphemes, due to 
> East Asian double width characters.
> 
> And these work with UnicodeString, which is UTF-16, not UTF-8. But Free 
> Pascal can convert between the two.

is there an example snippet of how all this works? It's too level for newbies 
to understand. :)

Regards,
Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to