Left single quoteLowercase ae ligature
ASCII 145 is ‘ on Windows and æ in old DOS.
‘ (Left Single Quote) is byte 145 in Windows-1252, Unicode U+2018. It opens a single-quoted phrase in English, ‘like this’, and ’ (byte 146) closes it. Word and phone keyboards put it in for you, and that's where it goes wrong. Autocorrect picks the direction from what comes before, so an apostrophe at the start of a word gets the opening mark: ‘90s, rock ‘n’ roll. Both should use ’, since an apostrophe always takes the closing shape. Pasted into SQL or a shell, ‘value’ isn't a quoted string at all, just a syntax error, and it's no substitute for the backtick ` either. In UTF-8 it's E2 80 98, which shows up as ‘ when read as Windows-1252. The HTML entity is ‘.
æ (Small AE) is byte 145 in code page 437, the original IBM PC character set, and maps to Unicode U+00E6. Windows-1252 has the left single quote ‘ at 145, so Danish or Norwegian DOS text read as Windows-1252 turns æble into ‘ble, with what looks like a stray opening quote. Code page 850 kept æ at 145 too. Capital Æ is the next byte, 146.
#include <stdio.h>int main(void) {/* On Windows (code page 1252) byte 145 is ‘.Modern terminals expect UTF-8, so print the code point, not the byte. */printf("\u2018\n"); /* UTF-8: E2 80 98 */unsigned char b = 145; /* the raw Windows-1252 byte */printf("%d 0x%02X\n", b, b); /* 145 0x91 */return 0;}
#include <stdio.h>int main(void) {/* Byte 145 is æ only on a console using code page 437(chcp 437 on Windows, or DOSBox). On a UTF-8 terminal thelone byte 0x91 is invalid and prints as garbage, often �. */putchar(145);/* char is signed on x86, so a plain char holding 0x91 is -111.Use unsigned char when you compare or index by byte value. */char c = (char)145;unsigned char u = 145;printf("\n%d %d\n", c, u); /* -111 145 *//* Portable: print the Unicode character as UTF-8 instead. */printf("\u00E6\n"); /* C3 A6 */return 0;}
æ is also ASCII 230 on Windows, which has the full guide.
Your code has a curly quote where Python needs a straight one, usually because it was copied from a document, a chat app or a blog that prettifies quotes. Replace every ‘ and ’ with a straight ' and every “ and ” with ", then run it again. If you paste from the same source often, do that replacement before running anything.
Follow the variety of English you're writing. American style uses double quotes and saves single ones for a quote inside a quote: “She said ‘no’ twice.” British publishing often does the reverse and starts with single quotes. Newspapers and publishers set their own house rules on top of that, so a style guide you've been given wins.
Press Ctrl+Z right after Word converts it, and that one quote goes back to straight. To switch it off for good, open File > Options > Proofing > AutoCorrect Options, go to the AutoFormat As You Type tab and clear the option that replaces straight quotes with smart quotes. Quotes already in the document stay curly until you replace them.
Code page 437 and the Nordic code page 865 both store æ as byte 145, which is the opening quote in Windows-1252, so være reads as v‘re and særlig as s‘rlig. Capital Æ breaks right next door, into ’. Convert the file once instead of fixing words by hand: `iconv -f CP865 -t UTF-8 old.txt > new.txt`.
Code page 437 and the Nordic code page 865 both store æ as byte 145, which is the opening quote in Windows-1252, so være reads as v‘re and særlig as s‘rlig. Capital Æ breaks right next door, into ’. Convert the file once instead of fixing words by hand: `iconv -f CP865 -t UTF-8 old.txt > new.txt`.