π is the Unicode character PLAYING CARD TWO OF DIAMONDS, code point U+1F0C2 (decimal 127170) in the Playing Cards block, added in Unicode 6.0. In HTML write 🃂, and in UTF-8 it is the 4 bytes F0 9F 83 82.
Codes
| Where | How to write it |
|---|---|
| Code point | U+1F0C2 |
| Decimal | 127170 |
| UTF-8 bytes | F0 9F 83 82 |
| UTF-16 (big-endian) | D83C DCC2 |
| UTF-32 | 0001F0C2 |
| HTML decimal | 🃂 |
| HTML hex | 🃂 |
| CSS | \1F0C2 |
| JavaScript | \u{1F0C2} or \uD83C\uDCC2 |
| JSON | \uD83C\uDCC2 |
| Python | \U0001F0C2 |
| Python by name | \N{PLAYING CARD TWO OF DIAMONDS} |
| Java, C# | \uD83C\uDCC2 |
| Rust, Swift | \u{1F0C2} |
| Go, C, C++ | \U0001F0C2 |
| URL (percent-encoded) | %F0%9F%83%82 |
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 | PLAYING CARD TWO OF DIAMONDS |
| Code point | U+1F0C2 (decimal 127170) |
| Block | Playing Cards (U+1F0A0βU+1F0FF) |
| General category | So: Other symbol |
| Script | Common |
| Bidirectional class | ON: Other neutral |
| Mirrored in right-to-left text | No |
| First in Unicode version | 6.0 |
Nearby in Playing Cards
- πΉ U+1F0B9 Playing Card Nine Of Hearts
- πΊ U+1F0BA Playing Card Ten Of Hearts
- π» U+1F0BB Playing Card Jack Of Hearts
- πΌ U+1F0BC Playing Card Knight Of Hearts
- π½ U+1F0BD Playing Card Queen Of Hearts
- πΎ U+1F0BE Playing Card King Of Hearts
- πΏ U+1F0BF Playing Card Red Joker
- π U+1F0C1 Playing Card Ace Of Diamonds
- π U+1F0C3 Playing Card Three Of Diamonds
- π U+1F0C4 Playing Card Four Of Diamonds
- π U+1F0C5 Playing Card Five Of Diamonds
- π U+1F0C6 Playing Card Six Of Diamonds
- π U+1F0C7 Playing Card Seven Of Diamonds
- π U+1F0C8 Playing Card Eight Of Diamonds
- π U+1F0C9 Playing Card Nine Of Diamonds
- π U+1F0CA Playing Card Ten Of Diamonds
All 82 characters: Playing Cards.
Official reference
Questions people ask
- What is the HTML code for π?
- Use 🃂 (decimal) or 🃂 (hex).
- What is the UTF-8 encoding of U+1F0C2?
- F0 9F 83 82 (hex), 4 bytes. In a URL it is %F0%9F%83%82.
- How do I write U+1F0C2 in JavaScript or Python?
- JavaScript: \u{1F0C2} or \uD83C\uDCC2. Python: \U0001F0C2.
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