On 27.12.2021 16:00, Janis Papanagnou wrote:
[ characters from different languages (or Unicode planes) require
differing amounts of cells for displaying in a terminal window ]
'wc -L' seems to be the solution for me; it's non-standard but works
on my system at least.
$ printf "\U30ee" | wc -L
2
$ printf "\U0041" | wc -L
1
For the examples above it works, it's possible to determine the number
of required cells.
But it doesn't work correctly for other subsets of characters, e.g. for
the Smiley-characters I don't get the correct number (2) on my system.
$ printf "\U1f600" | wc -L
0
I noticed that with a newer OS version the result is correct.
$ printf "\U1f600" | wc -L
2
I want to fix the system files where these numbers are defined.[*]
Q: Can anyone tell me where the character cell widths are defined?
Thanks.
Janis
[*] I don't want to upgrade that system or selectively update files
from a repository with all dependencies and possibly undesired effects.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)