Lowercase a with circumflexGreek capital gamma
ASCII 226 is â on Windows and Γ in old DOS.
â (Small A with Circumflex) is byte 226 in Windows-1252, Unicode U+00E2. As a real letter it's in French âge and Portuguese câmara. But if your text is full of â followed by € or ‚, those aren't letters at all. Every UTF-8 character from U+2000 to U+2FFF starts with the byte E2, which is â in Windows-1252, and that range holds the curly quotes, the dashes, the ellipsis, the euro sign and the trademark sign. So ’ is a broken apostrophe, “ an opening quote, – an en dash and € a euro sign. Fix the decoding once and they all come back together. Old DOS had â at 131. In UTF-8, â itself is C3 A2, and the HTML entity is â.
Γ (Capital Gamma) is byte 226 in code page 437, the original IBM PC character set, and maps to Unicode U+0393. Maths uses it for the gamma function, where Γ(n) = (n − 1)! for whole numbers n. In a code page 437 console it also marks broken punctuation: the UTF-8 lead byte E2 displays as Γ, so a curly apostrophe prints as ΓÇÖ. And it has a Cyrillic twin, Г (U+0413), which looks the same but is a different character, so text mixing the two fails search. Code page 850 put Ô on this byte. In UTF-8, Γ is CE 93, and the HTML entity is Γ.
#include <stdio.h>int main(void) {/* On Windows (code page 1252) byte 226 is â.Modern terminals expect UTF-8, so print the code point, not the byte. */printf("\u00E2\n"); /* UTF-8: C3 A2 */unsigned char b = 226; /* the raw Windows-1252 byte */printf("%d 0x%02X\n", b, b); /* 226 0xE2 */return 0;}
#include <stdio.h>int main(void) {/* Byte 226 is Γ only on a console using code page 437(chcp 437 on Windows, or DOSBox). On a UTF-8 terminal thelone byte 0xE2 is invalid and prints as garbage, often �. */putchar(226);/* char is signed on x86, so a plain char holding 0xE2 is -30.Use unsigned char when you compare or index by byte value. */char c = (char)226;unsigned char u = 226;printf("\n%d %d\n", c, u); /* -30 226 *//* Portable: print the Unicode character as UTF-8 instead. */printf("\u0393\n"); /* CE 93 */return 0;}
That's a closing double quote ”. Its UTF-8 form is three bytes, and the last one, 9D, has no character in Windows-1252, so it turns into an invisible control or disappears and leaves only â€. The opening quote survives as “, which is why only the closing side looks cut off. If you're patching by hand, fix the full sequences first, then turn any leftover †into ”.
They're an ellipsis … and a bullet •. Both share their first two garbled bytes with the curly quotes, and the third one tells them apart: ¦ for the ellipsis, ¢ for the bullet. Decoding the text as UTF-8 brings them back without any replacing. If you do patch a few by hand, replace the whole three-character sequence and never â alone, since French and Portuguese text contains real ones.
No. The 1990 spelling rectifications made the circumflex optional on i and u, so connaitre and cout are now accepted, but â, ê and ô keep theirs: âge and château are still spelled that way. It can also be the only thing separating two words, since tâche means task and tache means stain.
Switch the console to UTF-8 before running the tool: in PowerShell, `[Console]::OutputEncoding = [Text.Encoding]::UTF8`. The program is already sending correct UTF-8, so nothing in its code or files needs changing. On a code page 850 console the same garble starts with Ô instead, so ÔÇÖ is the same broken apostrophe.