Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Odd characters:

ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้ ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้ ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้ ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้

Question: Why does these characters draw so odd when you look at them in Windows*?

Here's a snippet from Outlook for you lucky bastards who aren't forced to use Windows:

Stuff

Related: What's the character encoding used?

*Windows as in the OS. Applications drawing text using GTK+ and the likes doesn't show these like something out of an LSD-trip gone wrong.

share|improve this question
4  
+1 this is so awesome! –  Moab Feb 19 '12 at 21:10
1  
Your question contains an unsubstantiated claim -- that Windows draws them "wrong". It would help if you stated how you think they should be drawn and what specifically is wrong with the way Windows draws them. –  David Schwartz Feb 19 '12 at 21:36
2  
I'd be curious to see how the other OS'es handle this, I only see how Windows does it and to me that seems "right". –  Mokubai Feb 19 '12 at 21:49
4  
1  
Also related: en.wikipedia.org/wiki/Combining_character –  iglvzx Feb 21 '12 at 20:38
show 5 more comments

2 Answers 2

As I seem to have taken a bit of a hit for thinking that Windows is "doing it right" I feel I should post an answer to justify my position.

The fact of the matter is that the text you have is telling the operating system to render an insane amount of combining characters. The problem that one operating system actually renders them while another does not is due to a number of issues. One of these issues is how thorough the programmers were when they wrote the code to render them, another would be due to programmers being too lazy to implement them properly, if at all.

Basically it comes down to the idea that written languages are fluid things, and that many characters in certain languages have multiple different diacritics that get applied to modify the pronunciation of characters. How do we handle all these diacritics, do we give each letter with a diacritic a new character (which would result in one heck of a lot of new and nearly identical characters) or do we create a set of characters specifically for diacritics and reduce our overall alphabet?

Unicode gives us the scope to do both, but in doing so the programmers who have to render these diacritics have to deal with the fact that there are some characters that actually do have multiple diacritics, one above and one below, and then the programmer has to ask the question of just when do they stop. They could limit it to two, and satisfy most people but ignore those who want or need three diacritics in order to write formally in their own language.

Microsoft, whether rightly or wrongly, decided to let the user decide just how many extra marks a person wants to use. This path takes a rather good programmer and some tough rationalisation to follow through. I fully support them in both allowing this and the fact that they do it well.

If those characters were missing on the other hand, I would want to know just why they were missing. Was it a "we drop this on the floor after x diacritics" decision, or was it due to the programmers being too lazy to do it properly and potentially exposing me to some buffer overflow with code hidden in the diacritics getting passed out to be executed by the system?

The simple issue here is that by actually rendering those characters I can see that the system is doing exactly what it is told to do, rather than doing what it thinks is right or, worse, doing something potentially harmful.

share|improve this answer
8  
Or: Why does Windows draw horribly, horribly wrong characters so well? –  mtone Feb 21 '12 at 19:51
    
Covering over someone else's text meets the criteria of "potentially harmful" in my book. (Perhaps the message being covered up is important.) Incidentally, my preferred solution would be some form of clipping rather than a limit on the number of diacritics. (If there are really languages which use characters that overlap with characters on adjacent lines, I don't care to know about it!) –  Harry Johnston Feb 21 '12 at 21:22
    
Further: since MS are unlikely to change this behaviour anytime soon, Facebook and other sites that accept user data are likely to try to sanitize the character set themselves in order to prevent pranksters from misusing this "feature". Unfortunately, the sanitization process may well have undesirable side effects. If Windows clipped the output this wouldn't be necessary. –  Harry Johnston Feb 21 '12 at 22:31
add comment

Why does these characters draw so odd when you look at them in Windows*?

Because Windows attempts to render large numbers of Unicode combining characters when your text contains them, even though no actual script would ever combine that many marks together.

share|improve this answer
    
Presumably that means Windows is "doing it right" as per what is actually being asked of it rather than imposing limits on how many combining characters can be used. –  Mokubai Feb 19 '12 at 21:36
    
See also superuser.com/questions/389333/… which seems to indicate that such tricks have gained popularity in Facebook. –  Jukka K. Korpela Feb 19 '12 at 21:37
    
@Mokubai: thing is, this is untrusted data - data coming from the internet. Windows shouldn't necessarily do what untrusted data asks of it if it might not be in the best interests of the user. –  Harry Johnston Feb 21 '12 at 3:01
1  
@HarryJohnston I would be more worried if it didn't show all the diacritics, please see my answer. –  Mokubai Feb 21 '12 at 19:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.