Quarter Life Crisis

The world according to Sven-S. Porst

« Teddy ZooMainIlford FP4 »

More Unicode Fun

338 words

Following my recent notes on Hydra and the usage of

❧ ☃ ⌘ ﷺ ☃

as a background image in the application, I observed a couple of strange things with that string. Note, that it contains an arabic character. This may hint that the thing I’m going to describe is related to the interplay of RTL and LTR writing.

As web browsers don’t seem to render this in a particularly consistent order, let me point out that the characters you see above were entered in the following order: (ROTATED FLORAL HEART BULLET), (SNOWMAN), (PLACE OF INTEREST SIGN), (ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM), (SNOWMAN) = 12342. In the WebKit based preview window this looks like 43212. Pasting the string into a Cocoa text field like Safari’s location field completely reverses the order to be 24321.

I wanted so save the string for future use, so I put it in a text clipping on my desktop. The Finder uses the reversed order 24321 to display the file name, with ‘textCipping.’ being added at the left as I noticed before. The Finder’s usual ugly face shows when you’re trying to look at the clipping’s preview which shows gibberish. Another ugly face can be seen when opening the clipping with the clipping viewer seeming to be stuck in the previous century and not doing any of the Unicode magic:

Finder's problems with these strings

I know that the whole writing direction stuff isn’t exactly easy. But to me these look like too many ways to display the same string…

P.S. Also note the interesting and inconsistent things that happen when typing in the string. In the text field case described above, type a roman letter at the right and side of the string and everything will be back in the original order with the new letter being at the right of the existing characters. Do the same in the Finder and the letters will be reversed to the original order as well but this time the new letter will be at the left of them. Eeek.

December 4, 2004, 16:05

Comments

Comment by Dirk: User icon

I found this interesting. Firefox 1.0 renders the glyphs in the order you described in the text with apparently the right characters.

My Internet Explorer shows only 5 boxes for unknown character, of which all but the fourth are rendered bold (with a thick border). Maybe i could tweak IE to use another font to render it correctly, but since i don’t use IE normally i really don’t care that much.

December 5, 2004, 11:04

Comment by Levi Aho: User icon

I use Mozilla Firefox also. I get them as 12342, but lacking any arabic fonts, I get a missing glyph box for ARABIC LIGATURE ALLALLAHOU ALAYHE WASALLAM. Moz missing glyph boxes have the hex in them so you can figure out what you’re missing. It’s pretty cool.

January 3, 2005, 10:20

Comment by drebes: User icon

Have you noticed that the updated WebKit in MacOS X 10.4.3 renders it as 12342, also. There were many RTL changes applied to WebKit.

November 3, 2005, 0:37

Comment by ssp: User icon

Looks cool, thanks for the heads-up!

November 3, 2005, 1:00

Add your comment

« Teddy ZooMainIlford FP4 »

Comments on

Photos

Categories

Me

This page

Out & About

pinboard Links

♪♬♪

Received data seems to be invalid. The wanted file does probably not exist or the guys at last.fm changed something.

People

Ego-Linking