Unicode Cheat Sheet

Unicode is a standardized character encoding system that represents text characters from different writing systems. Here’s a cheat sheet for Unicode:

Unicode Basics

  • Code Points:
    • Unicode assigns a unique code point (integer) to each character.
    • Example: U+0041 represents the Latin capital letter “A.”
  • Unicode Range:
    • Unicode characters are divided into blocks and ranges.
    • Basic Latin: U+0000 to U+007F, Latin-1 Supplement: U+0080 to U+00FF, and so on.

Representing Unicode Characters

  • Escape Sequences:
    • In programming languages, you can use escape sequences like \u or \U to represent Unicode characters.
    • Example: \u0041 represents the Latin capital letter “A.”
  • HTML Entities:
    • In HTML, use named entities or numeric character references.
    • Example: © represents the copyright symbol ©.

Common Unicode Symbols

  • Basic Latin Letters:
    • Latin Capital Letters: A-Z (U+0041 to U+005A)
    • Latin Small Letters: a-z (U+0061 to U+007A)
  • Mathematical Symbols:
    • Plus Sign: U+002B (+), Minus Sign: U+2212 (−), Multiplication Sign: U+00D7 (×), Division Sign: U+00F7 (÷)
  • Arrows:
    • Left Arrow: U+2190 (←), Right Arrow: U+2192 (→), Up Arrow: U+2191 (↑), Down Arrow: U+2193 (↓)
  • Emoticons:
    • Smiling Face: 😊 (U+1F60A), Heart: ❤️ (U+2764)
    • Here is a dedicated Emoji Cheat Sheet.

Unicode Utilities

  • Unicode Consortium Website:
    • The official Unicode website provides charts, code charts, and other resources.
    • Unicode Consortium
  • Unicode Character Table:
  • Unicode Emoji List:
    • Explore a list of Unicode emojis and their codes.
    • Unicode Emoji List

Unicode in Programming

In Python:

# Using escape sequences
print("\u0041")  # Output: A

# Using the chr() function
print(chr(65))    # Output: A

In JavaScript:

// Using escape sequences
console.log('\u0041');  // Output: A

// Using String.fromCharCode()
console.log(String.fromCharCode(65));  // Output: A

Here is a dedicated JavaScript Cheat Sheet.

Unicode Resources

  • Unicode Code Charts:
    • Explore code charts for different Unicode blocks.
    • Unicode Code Charts
  • Unicode Emoji Charts:
    • View charts specifically for Unicode emoji characters.
    • Unicode Emoji Charts

This Unicode cheat sheet provides a brief overview, and you can explore the Unicode Consortium’s resources for more in-depth information.