One halfBox bottom-right corner, double vertical
ASCII 189 is ½ on Windows and ╜ in old DOS.
½ (One Half) is byte 189 in Windows-1252, Unicode U+00BD. It's the everyday fraction: ½ price, 2½ hours, half shoe sizes. It also turns up in US street addresses. Some houses have fractional numbers like 221½, and USPS addressing standards write them with ASCII digits and a space, 221 1/2. A checkout form that strips non-ASCII characters turns 221½ into 221, a different house, so convert ½ to 1/2 instead of deleting it. Old DOS had ½ too, at 171. In UTF-8 it's C2 BD, which misreads as ½ on a page decoded as Windows-1252. The HTML entity is ½.
╜ (Double Up, Single Left) is byte 189 in code page 437, the original IBM PC character set, and maps to Unicode U+255C. It's the bottom-right corner of a box with double sides and a single bottom edge: ║ (186) comes down from above and ─ (196) runs in from the left. It completes the set that ╖ (183) starts at the top right, with ╙ (211) at the bottom left. Its entity ╜ differs from ╝ (╝) only in the case of the last letter, and swapping them draws the all-double corner instead. Code page 850 put the cent sign ¢ on this byte. In UTF-8 it's E2 95 9C.
#include <stdio.h>int main(void) {/* On Windows (code page 1252) byte 189 is ½.Modern terminals expect UTF-8, so print the code point, not the byte. */printf("\u00BD\n"); /* UTF-8: C2 BD */unsigned char b = 189; /* the raw Windows-1252 byte */printf("%d 0x%02X\n", b, b); /* 189 0xBD */return 0;}
#include <stdio.h>int main(void) {/* Byte 189 is ╜ only on a console using code page 437(chcp 437 on Windows, or DOSBox). On a UTF-8 terminal thelone byte 0xBD is invalid and prints as garbage, often �. */putchar(189);/* char is signed on x86, so a plain char holding 0xBD is -67.Use unsigned char when you compare or index by byte value. */char c = (char)189;unsigned char u = 189;printf("\n%d %d\n", c, u); /* -67 189 *//* Portable: print the Unicode character as UTF-8 instead. */printf("\u255C\n"); /* E2 95 9C */return 0;}
Press Ctrl+Z right after it happens to undo that one change. To turn it off for good, go to File, Options, Proofing, AutoCorrect Options, and on the AutoFormat As You Type tab clear the box for fractions. It's worth doing for recipes, because Word only converts 1/2, 1/4 and 3/4 and leaves 1/3 as typed, so the list ends up mixing styles.
Build it from a superscript numerator, the fraction slash ⁄ (U+2044) and subscript digits: ³⁄₁₆. It's plain text, so it copies and pastes anywhere, but fonts don't always match the superscript and subscript sizes. Search won't match it against 3/16 either, which matters for product names people will type into a search box.
In running prose, spell out a simple fraction: half an hour, one-third of the vote. Use the ½ character with numbers people read at a glance, like 2½ hours in a schedule, a recipe or a table, and fall back to 1/2 only where the text has to stay ASCII. Chicago style also spells out simple fractions in prose.
In text, `\textonehalf` gives the ready-made ½ glyph and works in current LaTeX without extra packages. In math, `\frac{1}{2}` sets a stacked fraction, and `\tfrac{1}{2}` from amsmath keeps it small enough for inline use. For a slanted look on any fraction, the xfrac package's `\sfrac{3}{16}` does it.
½ is a single character, and code that expects digits handles it badly. JavaScript's parseFloat('9½') returns 9, dropping the half without an error, and Python's float() rejects it outright. Python's unicodedata.numeric('½') does return 0.5 if you need the value. Normalization has its own trap: NFKC rewrites ½ as 1⁄2 with a fraction slash, so 1½ turns into 11⁄2, which reads like eleven halves.
Which one you get depends on your PC's DOS code page, because that's what Alt codes use without a leading zero. A US setup has the box corner ╜ at 189, and a Western European one has ¢ there. Alt+0189 gives ½ on both, and so does Alt+171, where the DOS table keeps its ½.
Which one you get depends on your PC's DOS code page, because that's what Alt codes use without a leading zero. A US setup has the box corner ╜ at 189, and a Western European one has ¢ there. Alt+0189 gives ½ on both, and so does Alt+171, where the DOS table keeps its ½.