You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's have a look at the letter 'ễ' in the surname "Nguyễn". You can either find it as a single composed unicode character U+1EC5. Or decomposed as "e\u{302}\u{303}". When truncating a text, the letter ễ should stay ễ, and not be truncated to ê or e. Or take the emoji "👯♂️", which is composed of "\u{1f46f}\u{200d}\u{2642}\u{fe0f}", a sequence that must not be split up.
It would be nice if one could make |center and |truncate understand unicode widths (ễ = 1 display character; 👯♂️ = 2 display characters), and grapheme clusters. It should be opt in, because the lookup tables are big.
Maybe, instead of modifying the existing functions, new ones should be introduced.
The text was updated successfully, but these errors were encountered:
Let's have a look at the letter
'ễ'
in the surname"Nguyễn"
. You can either find it as a single composed unicode character U+1EC5. Or decomposed as"e\u{302}\u{303}"
. When truncating a text, the letterễ
should stayễ
, and not be truncated toê
ore
. Or take the emoji"👯♂️"
, which is composed of"\u{1f46f}\u{200d}\u{2642}\u{fe0f}"
, a sequence that must not be split up.It would be nice if one could make
|center
and|truncate
understand unicode widths (ễ = 1 display character; 👯♂️ = 2 display characters), and grapheme clusters. It should be opt in, because the lookup tables are big.Maybe, instead of modifying the existing functions, new ones should be introduced.
The text was updated successfully, but these errors were encountered: