3 ms·
I always thought you kind of need those directional control characters to correctly render bidi text? e.g. if you write something in Hebrew but include a Latin
by arp242 1y ago
I always thought you kind of need those directional control characters to correctly render bidi text? e.g. if you write something in Hebrew but include a Latin word/name (or the reverse).
- dcrazy 1y agoThis is the job of the Bidi Algorithm: https://www.unicode.org/reports/tr9/ https://www.unicode.org/reports/tr9/ Of course, this is an “annex”, not part of the core Unicode spec. So in situations where you can’t rely on the presentation layer’s (correct) implementation of the Bidi algorithm, you can fall back to directional override/embedding characters.
- acdha 1y agoOver the years I’ve run into a few situations where the rules around neutral characters didn’t produce the right result and so we had to use the override characters to force the correct display. It’s completely a niche but very handy when you are mixing quotes within a complex text.
- layer8 1y agoRead the parent’s link. The characters “to be avoided” are a particular special-purpose subset, not directional control characters in general.