En dashLowercase u with circumflex
ASCII 150 is – on Windows and û in old DOS.
– (En Dash) is byte 150 in Windows-1252, Unicode U+2013. It's the dash for ranges, as in 9–5 or pages 10–20, and in German and British typesetting a spaced en dash does the work of a sentence dash. It ends up where it shouldn't through automatic typography. WordPress turns a double hyphen into an en dash, so --verbose in a tutorial can arrive as –verbose, and the program sees an argument it doesn't know. Numbers suffer too: a figure like –5 pasted from a PDF won't parse, because JavaScript's parseFloat and spreadsheets only accept the hyphen-minus (0x2D) as a sign. The true minus sign, U+2212, isn't in Windows-1252 at all. In UTF-8 the en dash is E2 80 93, which reads as – in Windows-1252. The HTML entity is –.
û (Small U with Circumflex) is byte 150 in code page 437, the original IBM PC character set, and maps to Unicode U+00FB. Windows-1252 has the en dash – at 150, so French DOS text read as Windows-1252 turns août into ao–t and sûr into s–r. Code page 850 kept û at 150 too.
#include <stdio.h>int main(void) {/* On Windows (code page 1252) byte 150 is –.Modern terminals expect UTF-8, so print the code point, not the byte. */printf("\u2013\n"); /* UTF-8: E2 80 93 */unsigned char b = 150; /* the raw Windows-1252 byte */printf("%d 0x%02X\n", b, b); /* 150 0x96 */return 0;}
#include <stdio.h>int main(void) {/* Byte 150 is û only on a console using code page 437(chcp 437 on Windows, or DOSBox). On a UTF-8 terminal thelone byte 0x96 is invalid and prints as garbage, often �. */putchar(150);/* char is signed on x86, so a plain char holding 0x96 is -106.Use unsigned char when you compare or index by byte value. */char c = (char)150;unsigned char u = 150;printf("\n%d %d\n", c, u); /* -106 150 *//* Portable: print the Unicode character as UTF-8 instead. */printf("\u00FB\n"); /* C3 BB */return 0;}
û is also ASCII 251 on Windows, which has the full guide.
A hyphen joins the parts of a word or a compound, as in e-mail and well-known. The en dash connects two separate things: a span like 2019–2024, or two equal partners, as in the Paris–Berlin train or a US–China agreement. The longer em dash, byte 151, is the one for breaks in a sentence.
Swap the dash before parsing: `parseFloat(s.replace(/[\u2013\u2212]/g, '-'))` handles both the en dash and the true minus sign. Do it once where the data comes in, not at every calculation. Numbers taken from PDFs often carry other lookalikes as well, like non-breaking spaces between thousands, so check a sample before trusting the totals.
From 10 to 20. The en dash already means to, so pairing it with from or between says it twice: write between 1990 and 1995, or just 1990–1995 on its own. The dash suits tables, citations and headings. In running text the words usually read better anyway.
That dash is a û. DOS keeps û at byte 150, which Windows-1252 uses for the en dash, so août becomes ao–t and sûr becomes s–r. It hides well, since a dash inside a date looks almost deliberate. With pandas, read the file as `pd.read_csv('old.csv', encoding='cp850')` and the months come back intact.
That dash is a û. DOS keeps û at byte 150, which Windows-1252 uses for the en dash, so août becomes ao–t and sûr becomes s–r. It hides well, since a dash inside a date looks almost deliberate. With pandas, read the file as `pd.read_csv('old.csv', encoding='cp850')` and the months come back intact.