Komuś wpadł do głowy pomysł na zuoo w czystej postaci: popodmieniać w kodzie C# wszystkie średniki na grecki znak zapytania ( ; ). Kompilator zobaczy różnicę czy nie?
--
Jest dla mnie przewidziane specjalne miejsce w piekle. Tron
, tak jak :szatkus napisał, kompilator to wybredna bestia i się przypierdzieli na 100%. Średnik ma być średnik, kod się musi zgadzać, a nie graficzna reprezentacja znaku
HTML Entity (decimal) ; HTML Entity (hex) ; How to type in Microsoft Windows Alt +037E UTF-8 (hex) 0xCD 0xBE (cdbe) UTF-8 (binary) 11001101:10111110 UTF-16 (hex) 0x037E (037e) UTF-16 (decimal) 894 UTF-32 (hex) 0x0000037E (037e) UTF-32 (decimal) 894 C/C++/Java source code "\u037E" Python source code u"\u037E"
semicolon
Encodings HTML Entity (decimal) ; HTML Entity (hex) ; How to type in Microsoft Windows Alt +3B Alt 059 Alt 59 UTF-8 (hex) 0x3B (3b) UTF-8 (binary) 00111011 UTF-16 (hex) 0x003B (003b) UTF-16 (decimal) 59 UTF-32 (hex) 0x0000003B (3b) UTF-32 (decimal) 59 C/C++/Java source code "\u003B" Python source code u"\u003B"
The Greek mark has ended up identical in shape to the Latin semicolon; and Unicode has taken the inevitable decision that, since they look identical, they are identical, and the semantics can take care of itself ("If the text is Greek, this is an interrogative..."): U+37E canonically decomposes to U+003B Semicolon, which means that the two are not underlyingly differentiated. It's just as well Greek has never attempted to introduce the Latin semicolon into the language.
--
Zachowaj mnie Panie od zgubnego nawyku mniemania, że muszę coś powiedzieć na każdy temat i przy każdej okazji. Św. Tomasz z Akwinu