From mboxrd@z Thu Jan 1 00:00:00 1970 From: cowan@mercury.ccil.org (John Cowan) Date: Sun, 27 Mar 2016 19:30:52 -0400 Subject: [TUHS] Character sets In-Reply-To: <56F8565C.3080704@update.uu.se> References: <56F7B14A.7040201@update.uu.se> <20160327112920.GH12921@mercury.ccil.org> <56F7C85F.6060503@update.uu.se> <20160327214943.GS3766@eureka.lemis.com> <56F8565C.3080704@update.uu.se> Message-ID: <20160327233049.GA11617@mercury.ccil.org> Johnny Billquist scripsit: > >>Haha. Yes... Except that you now have multiple representations of each > >>character within one character set. So what has improved??? Mojibake, though not unknown, is now much less common, and the number of documents on the web that are in UTF-8 (including its ASCII subset) is at 85% and rising. > >In the Good Old Days, characters were all the same size, and you could > >do nice, simple things like > > > > while (*c && *c++ != " "); That particular piece of code still works if the encoding is UTF-8. Fundamentally, Unicode is complicated because human writing systems are complicated. > Another one I noted a while ago was that functions and command in > Unix, such as lpq, which try to print things in nice columns now > fail, because the code don't actually know how many characters have > been output. Well, if the font isn't fixed-width, you're screwed anyway. But if it is, there is information in the Unicode tables that tells you which characters have widths of 0, 1, or 2. Print programs can be modified to use that information. > And let's not even talk about such wonderful concepts as colors in > the character set definition... Unicode seems to have it all... Colors are optional. > I wonder how many code points exist for 'A'. It's definitely more than > one... Other than Greek and Cyrillic A letters, there are the math letters, which are used *in plain text* to designate semantic differences: plain A, italic A, and bold A mean different things mathematically. Using the math italics for emphasis or book titles is a Bad Thing. -- John Cowan http://www.ccil.org/~cowan cowan at ccil.org There was an old man Said with a laugh, "I From Peru, whose lim'ricks all Cut them in half, the pay is Look'd like haiku. He Much better for two." --Emmet O'Brien