Sunday, March 26, 2006

The answer is "incorrectly".

incorrectly-rendered-unicode

4 comments:

  1. That's very funny, but could you please ljcut it? I had to delete it from my friends page with Platypus in order to read the friends page on my monitor, which apparently is not up to your standards.

    ReplyDelete
  2. If you're saying what I think you're saying, you're wrong. Whether the text is in utf8 or ucs4 doesn't affect the difficulty of width calculations. Unicode has all manner of combining characters, so even if you have an array of actual 21-bit-wide characters, you still can't assume that width of text = len(array). Also, even in a fixed width font in a terminal emulator, you need to use 2x the normal width for CJK characters.

    ReplyDelete
  3. Quite true. But I think we can agree that if you don't even convert from an encoded byte string to a character string, your chances of doing things correctly are even smaller. ;)

    Also, uh, 21-bit-wide? I hope that's a typo for 32, I'd hate to think about a system that deals with things in units of 21 bits.

    ReplyDelete