Re: code pages I think
- Posted by Gerardo <gebrandariz at YAHOO.COM> May 19, 2001
- 542 views
Kat, ----- Original Message ----- From: "Kat" <gertie at PELL.NET> To: "EUforum" <EUforum at topica.com> Subject: Re: code pages I think > Ok..... > > If i understand right, Igor and Geraldo are saying this: If i recieve something > in a cyrilic font, Russian, Greek, Hebrew, or whatever,, as long as i know > that a byte of (for invented instance) 203 = a certain character in the sender's > language, then as long as i keep that byte associated with that knowledge, > even if i do not have that codepage, i can use that information to know what > that letter, and word, and paragraph, mean, despite what they display as. As > a second for instance, more real than the first, the Russian text i > copy/pasted to Igor came from IE5 where it looked cyrilic, and i pasted it to > Pegasus, which gives me apparently zero control of the font language > families, and in Pegasus it was that collection of lantinik vowels with > superscripts. Igor, i hope, read it as "thanks" in his native language's > codepage. Now, if i knew the capital 'A' with a certain superscript was the > same as the (for instance) 4th character of the Russian alphabet, then it > would be possible for me, or a program, to read the Russian that's displayed > with the wrong code,, because to the program, it's just a byte, an index into > the font table. The display is to present a standard visual interface to > humans,, and could just as likely be read properly with totally random chars, > as long as *i* knew how the characters represented the Russian characters. > The same byte, associated with another code page, would be interpreted as > some other character, but be displayed the same in the same wrong > codepage. Like how 39d = 27h = 47o = 100111b. > > Is this correct? > > Kat As Igor already said, you're absolutely in the right. The catchword is translation, just as you translate between your ascii and ansi settings, say CP850 vs. CP1252. This is what prompted the development of Unicode, only Unicode, like Ada, wound up being a solution more complex than the problem. Sad. Let me add a personal thought, relevant to programming for others (and not just for our own enjoyment and illustration). I believe that a program should either be so simple and straightforward that nothing could possibly affect it, or should give the user the opportunity to fiddle with every setting until it looks and works right. Anything in between will work until it doesn't, period. Remember Kant's moral imperative (say what? shut up and go get your encyclopedia): do everything as if it could become a general rule. That is, every program should behave as if lives depended on it. Think of medical apps, of air control software, whatever example chills your bones best. I'm working for the local stock exchange, where a real mistake might mean millions of dollars, and there's no such thing as 'oops, sorry.' Hard work, ain't it? Gerardo