UTF-8 Unicode operators vs digraphs
H. S. Teoh
hsteoh at qfbox.info
Fri Aug 14 19:12:39 UTC 2026
On Fri, Aug 14, 2026 at 05:48:02PM +0000, Dlighted via Digitalmars-d wrote:
> On Friday, 14 August 2026 at 14:56:06 UTC, H. S. Teoh wrote:
> > You forgot Chinese. Each character is composed of any number of
> > radicals, including other characters, in completely arbitrary 2D
> > layouts with completely arbitrary distortions and simplifications to
> > shoehorn everything into a square block. (Look up "Biangbiang
> > noodles" in Wikipedia sometime, for laughs.) Unicode literally
> > threw up its hands and embraced the combinatorial explosion instead
> > of trying to reason with it. :-D
> To humans but to the computer chinese is also simple. It's just a
> bunch of squares lined up in a row.
That's because Unicode gave up trying to figure it out, and sacrificed a
huge block of codepoints (> 20,000 codepoints) to cover the
combinatorial explosion of radicals, thus giving you a 1-to-1
correspondence for the most commonly-used combinations.
Unfortunately, that belies the actual nature of the writing -- those
radicals inside characters can behave like independent entities, and
combine with each other in very complex 2D ways (including such lovely
things like wrapping around other radicals, curling around them, nesting
one within another, etc). Fortunately, we no longer live in the age of
those old insane Chinese scribes who invented this crazy system -- most
radical combinations have been standardized and so Unicode could get
away with just spending lots of codepoints for each combination.
(And the proof that this is only a compromise on Unicode's part is the
various CJK supplemental blocks that have since been allocated. Because
the combinatorial explosion is theoretically infinite, you see -- and
over time new combinations are discovered to be in use, so Unicode has
to add them to supplemental blocks. We're lucky that most combinations
have largely fallen out of use. And that modern-day Chinese no longer
have the same obsession as the old scribes in creating new combinations
on the fly. Otherwise CJK codepoints would easily take over the entire
codepoint space. :-D Or worse, you'd have multi-codepoint
diacritic-style 2D compositions for Chinese characters... the people
designing text rendering engines would faint trying to implement such a
monstrosity.)
T
--
A bend in the road is not the end of the road unless you fail to make the turn. -- Brian White
More information about the Digitalmars-d
mailing list