π is the Unicode character MATHEMATICAL BOLD DIGIT FOUR, code point U+1D7D2 (decimal 120786) in the Mathematical Alphanumeric Symbols block, added in Unicode 3.1. In HTML write 𝟒, and in UTF-8 it is the 4 bytes F0 9D 9F 92.
Codes
| Where | How to write it |
|---|---|
| Code point | U+1D7D2 |
| Decimal | 120786 |
| UTF-8 bytes | F0 9D 9F 92 |
| UTF-16 (big-endian) | D835 DFD2 |
| UTF-32 | 0001D7D2 |
| HTML decimal | 𝟒 |
| HTML hex | 𝟒 |
| CSS | \1D7D2 |
| JavaScript | \u{1D7D2} or \uD835\uDFD2 |
| JSON | \uD835\uDFD2 |
| Python | \U0001D7D2 |
| Python by name | \N{MATHEMATICAL BOLD DIGIT FOUR} |
| Java, C# | \uD835\uDFD2 |
| Rust, Swift | \u{1D7D2} |
| Go, C, C++ | \U0001D7D2 |
| URL (percent-encoded) | %F0%9D%9F%92 |
JavaScript and JSON strings store text as UTF-16, so this character takes two code units (a surrogate pair) and "π".length is 2. Python 3 strings count code points, so its length there is 1.
Properties
| Property | Value |
|---|---|
| Name | MATHEMATICAL BOLD DIGIT FOUR |
| Code point | U+1D7D2 (decimal 120786) |
| Block | Mathematical Alphanumeric Symbols (U+1D400βU+1D7FF) |
| General category | Nd: Decimal digit |
| Script | Common |
| Bidirectional class | EN: European number |
| Numeric value | 4 |
| Mirrored in right-to-left text | No |
| First in Unicode version | 3.1 |
Decomposition
MATHEMATICAL BOLD DIGIT FOUR has a compatibility decomposition (font) to the sequence below. NFKC and NFKD normalisation replace it with that sequence, which can change how text looks, so use them for search, not for storage.
Nearby in Mathematical Alphanumeric Symbols
- π U+1D7C8 Mathematical Sans-Serif Bold Italic Rho Symbol
- π U+1D7C9 Mathematical Sans-Serif Bold Italic Pi Symbol
- π U+1D7CA Mathematical Bold Capital Digamma
- π U+1D7CB Mathematical Bold Small Digamma
- π U+1D7CE Mathematical Bold Digit Zero
- π U+1D7CF Mathematical Bold Digit One
- π U+1D7D0 Mathematical Bold Digit Two
- π U+1D7D1 Mathematical Bold Digit Three
- π U+1D7D3 Mathematical Bold Digit Five
- π U+1D7D4 Mathematical Bold Digit Six
- π U+1D7D5 Mathematical Bold Digit Seven
- π U+1D7D6 Mathematical Bold Digit Eight
- π U+1D7D7 Mathematical Bold Digit Nine
- π U+1D7D8 Mathematical Double-Struck Digit Zero
- π U+1D7D9 Mathematical Double-Struck Digit One
- π U+1D7DA Mathematical Double-Struck Digit Two
All 997 characters: Mathematical Alphanumeric Symbols.
Official reference
Questions people ask
- What is the HTML code for π?
- Use 𝟒 (decimal) or 𝟒 (hex).
- What is the UTF-8 encoding of U+1D7D2?
- F0 9D 9F 92 (hex), 4 bytes. In a URL it is %F0%9D%9F%92.
- How do I write U+1D7D2 in JavaScript or Python?
- JavaScript: \u{1D7D2} or \uD835\uDFD2. Python: \U0001D7D2.
Source
Unicode Character Database 18.0.0 (Unicode License v3); HTML entity names from the WHATWG HTML Standard (CC BY 4.0). The encodings above are computed from the code point and checked against Python's encoders. How the character looks depends on your fonts.
Legal entity
Devansh Yadav
Moradabad, Uttar Pradesh
Governing law: Courts at Moradabad, Uttar Pradesh
Phone: +91 8433475698
Legal: legal@analyzeit.in