** When I type in either of those character-sets, my characters would appear in sequence, one after the other, according to the directionality. Strong types are character sets that have explicit directionality. Luckily, Unicode came in and defined directionality, and although Unicode still has problems, RTL users can at least type their language normally, rather than learn to write backwards.
There were several tools you could download in those ancient days that would take your text and flip it. This might be doable when typing one or two words, but if you had an entire paragraph or an entire article, it could get annoying fast. If I wanted to write the Hebrew word "שלום", which starts with the hebrew letter "ש", I would have to type it backwards, starting with the letter "ם", and produce "םולש"-because the letters would appear sequentially from left to right. Those days, Hebrew was, in fact, typed backwards. There were no sites, really-only a collection of static HTML pages that, more often than not, included horrendous tags such as and and featured pages in which one-font-served-all and the backgrounds were tiled.
I remember building web pages in raw HTML that most of us would cringe at today. In the beginning days of the Internet-way, way back, when dinosaurs roamed the earth and half of you who are reading this post were probably in diapers-the Internet assumed pretty much everything is left-to-right. These types control how these characters are presented inside a string. Unicode, which is the encoding system most common online, defines character type directionality for groups of characters as either strong, weak, or neutral. Well, I'm going to try, so just keep reading. I'm going to explain eeeeeeeeeeeeeeverything. Oh, and there are also some characters that may (and do) flip around visually depending on the text they're in.ĭon't worry. And some characters are merely neutral, which means they get their directionality by their surroundings. Some characters have "weak" directionality, in that, although they have directionality internally, they don't affect characters around them. Hebrew and English (and a couple of other languages) are of the "strong" directionality types, the ones that not only have direction but also affect their surroundings.
These are fairly clear, and if you type a string that consists of these languages on their own, the situation is more or less okay (but I'll go over some issues with that later)īut not all characters in strings are equal. I already said that English is recognized as an "LTR" language (Left-to-Right), and Hebrew, Arabic, Urdu (and some others) as RTL languages (Right-to-Left). Bidirectionality of characters and stringsīefore I delve into some interesting examples of mixed-up directionality problems, I should first go over how browsers consider directionality at all. Mostly.īut even browsers have problems when deciding what to do when languages are mixed up, and that, my friends, is a recipe for really weird issues when typing and viewing bidirectional text. Browsers-for the most part-know that too, just like they know that the default directionality of a web page is left-to-right (LTR), and that if there is a setting that explicitly defines the direction to right-to-left, the page should flip like a mirror. Rikki EndsleyĮnglish is written left to right. When you watch her talk video and read her article, you'll see why I couldn't take proper notes to write about the talk, so I'm glad she contributed her story directly to us instead. I saw Moriel Schottlender give a talk about this topic at 2016 in Geelong last month and asked her to submit an article about it.