Right double quoteLowercase o with umlaut
ASCII 148 is ” on Windows and ö in old DOS.
” (Right Double Quote) is byte 148 in Windows-1252, Unicode U+201D. English closes double quotes with it, and Swedish and Finnish use it on both ends: ”Hej”. Its garbled form looks cut off. The UTF-8 bytes are E2 80 9D, and 9D is one of the unassigned slots in Windows-1252 (byte 157), so where the opening quote turns into “, the closing one comes out as †followed by nothing visible, or as â€� in tools that flag bad bytes. It also gets used as an inch mark, as in a 27” monitor. That passes visually, but the proper symbol is the double prime ″ (U+2033), and parsers and spreadsheets expect the plain ASCII quote (0x22). The HTML entity is ”.
ö (Small O with Umlaut) is byte 148 in code page 437, the original IBM PC character set, and maps to Unicode U+00F6. Windows-1252 has the right double quote ” at 148, so German DOS text read as Windows-1252 turns schön into sch”n, and curly quotes printed to a code page 437 console come out as ô and ö. Code page 850 kept ö at 148 too. Capital Ö is 153 in DOS.
#include <stdio.h>int main(void) {/* On Windows (code page 1252) byte 148 is ”.Modern terminals expect UTF-8, so print the code point, not the byte. */printf("\u201D\n"); /* UTF-8: E2 80 9D */unsigned char b = 148; /* the raw Windows-1252 byte */printf("%d 0x%02X\n", b, b); /* 148 0x94 */return 0;}
#include <stdio.h>int main(void) {/* Byte 148 is ö only on a console using code page 437(chcp 437 on Windows, or DOSBox). On a UTF-8 terminal thelone byte 0x94 is invalid and prints as garbage, often �. */putchar(148);/* char is signed on x86, so a plain char holding 0x94 is -108.Use unsigned char when you compare or index by byte value. */char c = (char)148;unsigned char u = 148;printf("\n%d %d\n", c, u); /* -108 148 *//* Portable: print the Unicode character as UTF-8 instead. */printf("\u00F6\n"); /* C3 B6 */return 0;}
ö is also ASCII 246 on Windows, which has the full guide.
In American English, inside: periods and commas always go before the closing quote, as in She called it “done.” British style usually puts them inside only when they belong to the quoted words, so it's She called it ‘done’. with the period outside. Question marks and exclamation points follow the meaning in both styles.
The console is reading Windows-1252 text with code page 437 or 850, where byte 147 (“) is ô and byte 148 (”) is ö. The usual source is a batch file saved in Windows-1252 with text pasted in from Word. Retype those quotes as straight " in the script, since ASCII quotes print the same under every code page.
The console is reading Windows-1252 text with code page 437 or 850, where byte 147 (“) is ô and byte 148 (”) is ö. The usual source is a batch file saved in Windows-1252 with text pasted in from Word. Retype those quotes as straight " in the script, since ASCII quotes print the same under every code page.