by zyx321 · 6y ago · 0 comments
Will not reverse composed ligatures, e.g. ﷺ is synonymous to صَلَّىٰ ٱللَّٰهُ عَلَيْهِ وَسَلَّمَ, but صَلَّىٰ ٱللَّٰهُ عَلَيْهِ وَسَلَّمَ with a LTR directional override is صَلَّىٰ ٱللَّٰهُ عَلَيْهِ وَسَلَّمَ while ﷺ remains as ﷺ.
Will not reverse 겁 into 벅.
The issue brought up by the article is that neither makes sense. Reversing a string is not a semantically meaningful operation.
BTW, you can reverse Unicode (in any UTF), so long as you don't really care about the semantics of the result -- if all you want to do is reverse the codepoints, you could. After all, it is an interesting programming interview trick question, though admittedly then "you can't really" answer is more fun because you get to talk about glyphs and ligatures and so on, and natural language, thus demonstrating your mastery to the person who was trying to trick you.
I do agree with the overall point; just thought this specific example was a bit odd.
Does the string-reversing function receive "English" and output "hsilgnE" or "lishEng"? What if the string matches no known words (e.g. alphanumeric passphrase)? What if the string represents a single syllable (e.g. "was")?
Thinking of strings as connected to vocalized syllables only makes sense with strings meant to represent syllables, sure, but even that can lead to counterintuitive results.
I know you weren't defending the idea of a string-reversing function, but your objection is not exactly grounded in principle, either. That is, when you ask
> Why would reversing 겁 into 벅 make sense?
one could easily say, why wouldn't that literal reversal of the phoneme make sense? I understand it doesn't, but that's the problem with Unicode reversing-functions.
But instead Unicode has formatting and control code points and that complicates everything?
Is that the gist of it or is there more?
"Reverse" is just too ambiguous when dealing with Unicode.
So you can actually separate them if you want pretty easily
Is AAVE a separate “language” from “standard English”? How about Creole? Is that French, English, or a distinct language?
Is Pennsylvania Dutch/“Low German” German or English?
What about Yiddish? Modern Yiddish is an entirely different beast from historical Yiddish.
Who is going to be defining the type for Greek? What region and point in history will they be using for a reference?
Does GermanString contain Eszett? If so, is it a separate code point or interchangeable with “ss”? Is there logic that defines when “ss” should be represented as an Eszett and when it should be rendered as “ss”?
No, I think Unicode is the right approach. You get all the code points you might need and logic for processing them as glyphs. Leave everything else up to the application.