Lowercase i with grave accentInfinity
ASCII 236 is ì on Windows and ∞ in old DOS.
ì (Small I with Grave) is byte 236 in Windows-1252, Unicode U+00EC. Italian writes sì and così with it, and Chinese pinyin uses it for the falling fourth tone, as in shì (是). Pinyin is where Windows-1252 falls short. It covers the fourth-tone vowels à è ì ò ù and the second-tone á é í ó ú, but not the first-tone macrons (ī) or the third-tone carons (ǐ), so nǐ hǎo can't be stored in it at all. Use UTF-8 for any pinyin with tone marks. Old DOS had ì at 141. The UTF-8 bytes C3 AC misread as ì. The HTML entity is ì.
∞ (Infinity) is byte 236 in code page 437, the original IBM PC character set, and maps to Unicode U+221E. Parsers won't read it as a number. Python's float('∞') raises ValueError and JavaScript's Number('∞') gives NaN, because the languages spell it inf and Infinity. JSON has no infinity at all, and JavaScript's JSON.stringify serializes Infinity as null without any error, so a value can silently vanish on its way through an API. The emoji ♾ (U+267E) is a separate character that phones can draw as a picture. Code page 850 put ý on this byte. In UTF-8, ∞ is E2 88 9E, and the HTML entity is ∞.
#include <stdio.h>int main(void) {/* On Windows (code page 1252) byte 236 is ì.Modern terminals expect UTF-8, so print the code point, not the byte. */printf("\u00EC\n"); /* UTF-8: C3 AC */unsigned char b = 236; /* the raw Windows-1252 byte */printf("%d 0x%02X\n", b, b); /* 236 0xEC */return 0;}
#include <stdio.h>int main(void) {/* Byte 236 is ∞ only on a console using code page 437(chcp 437 on Windows, or DOSBox). On a UTF-8 terminal thelone byte 0xEC is invalid and prints as garbage, often �. */putchar(236);/* char is signed on x86, so a plain char holding 0xEC is -20.Use unsigned char when you compare or index by byte value. */char c = (char)236;unsigned char u = 236;printf("\n%d %d\n", c, u); /* -20 236 *//* Portable: print the Unicode character as UTF-8 instead. */printf("\u221E\n"); /* E2 88 9E */return 0;}
Both exist, and they're different words. Sì with the accent means yes, while si without it is the pronoun in si chiama, and also the note B in music. The same accent separates lì (there) from li (them), and là (there) from la (the).
Scottish Gaelic uses the grave, ì, and Irish uses the acute, í, so the word for a thousand is mìle in one and míle in the other. Older Scottish texts put acute accents on some vowels too, but current Scottish spelling uses graves only. An accent pointing the wrong way in a name is a sure sign the two languages got mixed up.
It's the fourth tone, the sharp falling one, marked on an i: shì, as in 是 (to be). Pinyin needs four tone marks per vowel, but neither DOS nor Windows-1252 has more than ì and í for i. The first and third tones, ī and ǐ, need Unicode, which is why older text often uses tone numbers instead, like shi4.
Replace the symbol before parsing: `float(s.replace('∞', 'inf'))` in Python turns ∞ into inf and -∞ into -inf. In JavaScript, swap it for Infinity before calling Number(). Do it once at the import step, so every later calculation sees a real number instead of an error or NaN.