News for hackers. Stuff that matters.
Re:Libgrapheme: A simple freestanding C99 library for Unicode by mananaysiempre on Tuesday November 15, 2022 @05:26PM (#33615987)
As far as existing terminals are concerned, I don’t know. FWIW, there are similar problems (though only to the point of looking wrong, not of misunderstanding) in other scripts: Cyrillic as used in Bulgarian and a number of other languages[1] and even Latin as used in Polish[2].

Even the Han version, though, does not seem to me to be the sort of “what does it even mean?” problem like those I listed above; more like what you want the input to be. You can make your terminal keep language state, e.g. using the deprecated language tags. Pro: some form of this likely already needs to happen for bidi support; similar to what HTML does. Con: no text file or program ever did this; your nice UTF-8-only terminal is now stateful and goes mad after `head /dev/urandom`. Alternatively, you can require the driving program to emit variation selectors for each Han character. Pro: the state and the ensuing madness is now limited; you can still pretend you’re looking at a stream of characters. Con: no text file or program ever did this; neither does HTML although it theorerically could.

[1] https://commons.wikimedia.org/wiki/File:Cyrillic_alternates....

[2] https://www.twardoch.com/download/polishhowto/kreska.html

There are no comments on this comment yet.