The footgun of right-to-left decorative characters

Hacker News Top News

Summary

The Manichaean fleuron Unicode character has a right-to-left directional type that can cause unexpected text reordering in web layouts. The article explains the issue and provides fixes using HTML's <bdi> tag or CSS unicode-bidi property.

No content available
Original Article
View Cached Full Text

Cached at: 07/11/26, 07:23 AM

# The footgun of right-to-left decorative characters - Vox Silva Source: [https://blog.alexbeals.com/posts/the-footgun-of-right-to-left-decorative-characters](https://blog.alexbeals.com/posts/the-footgun-of-right-to-left-decorative-characters) May 19, 2026 Fleurons, and other printer's ornaments are decorative elements used in typography\. Many of these have made it into fonts in the digital age, with Unicode supporting classic fleurons like ❦ and ❧,1These are slowly getting introduced into the blog styling, formal post Coming Soon™\.but also additional symbols\-turned\-visual indicators ranging from the aptly named ❀ \(White Florette\) to the lesser known ᪥ \(Tai Tham Sign Dokmai2Dokmai means 'flower' in Tai Tham scripts like Northern Thai or Lao\.\)\. I was recently exploring using 𐫱 as a delineator between the date and post categories, but found that it was unexpectedly rendering in the middle of the tag: It*should*render like this\. Why doesn't it? ## Manichaeism and Unicode 𐫱 is the Manichaean Punctuation Fleuron, part of a block in Unicode for adapting religious texts from Manichaeism\. If you care to know what Manichaeism is, it was a world religion from the 3rd century AD which collapsed through a combination of active persecution, competition from Christianity, Islam, and Buddhism, and the death of the empires that had tied themselves to it\.3Also they foolishly didn't allow post\-deceased converts like*some*[fast\-growing religions](https://en.wikipedia.org/wiki/Baptism_for_the_dead#Latter-day_Saint_practice_and_teachings)\.If you don't care, you just need to know that they had a pretty flower icon\.\.\.and wrote from right\-to\-left\. While most Manichaean scripts are solely written in right\-to\-left, they're not as constrained on a website:4Look at me Mom\!עברית\(HEBREW\)andعربي\(ARABIC\)and𐫖𐫀𐫗𐫏𐫐𐫏𐫀𐫗\(MANICHAEAN\)all in one sentence\!whatever rendering algorithmChromeuses to layout text needs to handle bidirectional text consisting of both left\-to\-right and right\-to\-left characters\. Unicode is well\-described, so there's a Unicode Bidirectional Algorithm that explains how to do this, but because Unicode is so complex this[requires ~20k words and 51 revisions](https://www.unicode.org/reports/tr9/)—let's stick to a TL;DR\. Each character has a bidirectional character type \(visible in[UnicodeData\.txt](https://www.unicode.org/Public/UNIDATA/UnicodeData.txt)\)\. This can be strong types, like`L`\(for left\) for stuff like the letter "A" or`R`\(for right\) for Hebrew text; weak types, like`EN`for European Numbers such as 0; or neutral, like`WS`for whitespace like tabs and spaces\.5[Here's the table](https://www.unicode.org/reports/tr9/#Table_Bidirectional_Character_Types)if you're curious\.Strong types will take precedence, and weak types will defer to their surrounding strong types\. [![](https://blog.alexbeals.com/images/the-footgun-of-right-to-left-decorative-characters/1.png)](https://blog.alexbeals.com/images/the-footgun-of-right-to-left-decorative-characters/1.png) The Manichaean fleuron is`R`typed, and so it rearranges the weak block of the digits`400`\(though they remain internally ordered as 400 instead of 004\), rendering`𐫱 <span\>400 Divisadero</span\>`as "𐫱400 Divisadero"\. ## Fixing with HTML and CSS Luckily this is fixable if we remember that we have to do it\! We can wrap the fleuron with the`<bdi\>`HTML tag to isolate the directionality from the text around it:𐫱400 Divisadero\. You can also do the same thing with the CSS style`unicode\-bidi: bidi\-override;`:6'Bidi' for bi\-directional\.𐫱400 Divisadero, which has*marginally*better support across browsers\.7Though who really cares about IE\. [![](https://blog.alexbeals.com/images/the-footgun-of-right-to-left-decorative-characters/2.png)](https://blog.alexbeals.com/images/the-footgun-of-right-to-left-decorative-characters/2.png)[![](https://blog.alexbeals.com/images/the-footgun-of-right-to-left-decorative-characters/3.png)](https://blog.alexbeals.com/images/the-footgun-of-right-to-left-decorative-characters/3.png) *`<bdi\>`**unicode\-bidi* Just remember to do this the next time you reach for something like 𞢹 or 𐩕\.

Similar Articles

Deciphering Basmala

Hacker News Top

An article discussing the historical and technical challenges of rendering Arabic typography, focusing on the importance of ligatures for the basmala phrase and the role of Unicode in solving the problem.

Hershey is a textual vector font format

Lobsters Hottest

The article describes the Hershey vector font format, a textual representation of glyphs using a coordinate encoding system where letters map to signed values, and includes examples and links to related resources.

Equivalence of Unicode strings is strange (2016)

Lobsters Hottest

Unicode string equivalence is complex, especially with collations, leading to surprising results like deletion of control characters and non-deterministic grouping. The author discusses challenges in implementing proper Unicode support in database systems.