3 ms·
Fun facts: - a few code pages (such as CP864 DOS Arabic) use the arabic percent sign ٪ (0x066A) at codepoint 0x25 instead of the standard ANSI %. - Mozilla Fi
by sheetjs 12y ago
Fun facts:
- a few code pages (such as CP864 DOS Arabic) use the arabic percent sign ٪ (0x066A) at codepoint 0x25 instead of the standard ANSI %.
- Mozilla Firefox and Thunderbird approximate the Arabic codepages (including ASMO-708) to ISO-8869-6, which breaks XLS parsing from files generated from certain international versions of Excel (which actually forced me to build a library for the various character encodings: https://github.com/SheetJS/js-codepage https://github.com/SheetJS/js-codepage)
- alister 12y agoMore fun facts: - We went from 128 ASCII characters to 110,187 currently-assigned Unicode characters (or Encoded Character code points, to use precise language)[1]. That's a thousand-fold increase. Who would have thought we'd need so many! - Unicode can represent 1,114,112 code points. So there's lots of room for yet more. [1] http://babelstone.blogspot.ca/2005/11/how-many-unicode-characters-are-there.html http://babelstone.blogspot.ca/2005/11/how-many-unicode-chara...
- MichaelGG 12y agoIt's like there should be an encoding which specifies the intent. Unless the Arabic percent sign (which looks like ANSI but flipped?) has some other semantics, why shouldn't Excel handle both of them? Other than that there could be 100 different percent signs.
- sheetjs 12y agoThe strings are encoded based on the specified codepage, and code page 864 cannot represent the standard percent symbol "%". Excel itself can handle it because they have their own implementation of codepages, but other implementations are not necessarily correct (many iconv implementations make the same mistake). Keep in mind that Unicode only emerged in the 1990s and Excel predates unicode by about a decade.
- MichaelGG 12y agoRight, I'm wondering why Unicode doesn't offer some sort of meaning-equivalent API (or does it)? Like a way to know Arabic and standard percent have the same meaning. Or that fullwidth 'A' is equivalent in meaning to 'A'.