การเข้ารหัส

ASCII Art

Visual art created from text characters, originally limited to the 95 printable ASCII characters. Unicode expands the palette with box-drawing characters, block elements, and braille patterns.

What is ASCII Art?

ASCII art is the practice of creating visual images, diagrams, and decorative text using characters from the ASCII character set (or, in modern usage, the broader Unicode character set). It originated in the era of teletype and early computer terminals, where bitmap graphics were unavailable and all output was character-based. ASCII art spread through bulletin board systems (BBS), Usenet, email signatures, and early web pages in the 1980s and 1990s.

While classic ASCII art uses the 95 printable ASCII characters (U+0020–U+007E) — particularly letters, digits, slashes, underscores, and pipe characters — Unicode dramatically expanded the creative palette available to text-based artists with three key character ranges.

Unicode Box-Drawing Characters (U+2500–U+257F)

The Box Drawing block (128 characters) provides lines and corners for drawing rectangular diagrams, table borders, and flow charts entirely in text. These characters are drawn to align precisely with adjacent box-drawing characters, making them ideal for terminal user interfaces (TUIs), data tables, and tree displays.

┌─────────────────┐
│  Unicode Table  │
├──────┬──────────┤
│ Code │ Name     │
├──────┼──────────┤
│U+2500│ BOX DRAW │
│U+2502│ VERTICAL │
└──────┴──────────┘

Heavy and double-line variants (┃, ━, ╔, ╗, ╠, ╣) allow visual hierarchy in complex diagrams. Frameworks like rich (Python) and blessed use these characters extensively.

Unicode Block Elements (U+2580–U+259F)

The Block Elements range (32 characters) provides fractional block fills — upper half, lower half, left quarter, right quarter, and eight levels of vertical fill. These allow pixel-level approximation in a character grid, enabling grayscale images to be rendered in terminal output.

▓▒░ ← Full, medium, light shade
▄▀█ ← Lower half, upper half, full block

Modern terminal image viewers like catimg and viu use block elements to display photographs at quarter-cell resolution, giving the impression of twice the vertical resolution of the character grid.

Unicode Braille Patterns (U+2800–U+28FF)

The Braille Patterns block (256 characters) encodes all possible combinations of the 8 dots in a Braille cell. While designed for tactile display devices, these characters are also used by Unicode artists to achieve very high-resolution text art, since each Braille character can represent an 2×4 grid of on/off pixels — giving 8 "pixels" per character cell.

# Each Braille character is a 2x4 dot matrix
# Bit positions:  1 4
#                 2 5
#                 3 6
#                 7 8
# U+2800 = all dots off (blank)
# U+28FF = all 8 dots on (⣿)

Terminal art generators use Braille to render bitmap images at approximately 160 DPI equivalent in a standard 80×24 terminal.

Quick Facts

Property Value
Classic ASCII art range U+0020–U+007E (95 printable ASCII characters)
Box Drawing block U+2500–U+257F (128 characters)
Block Elements block U+2580–U+259F (32 characters)
Braille Patterns block U+2800–U+28FF (256 characters)
Braille pixel density 8 pixels per character cell (2×4 grid)
Notable Python library rich (box-drawing for terminal UI)
Historical origin Teletype terminals, BBS culture (1970s–1990s)

คำศัพท์ที่เกี่ยวข้อง

เพิ่มเติมใน การเข้ารหัส

ASCII

มาตรฐานรหัสข้อมูลของอเมริกา (American Standard Code for Information Interchange) การเข้ารหัส 7 บิตครอบคลุม 128 ตัวอักษร …

Base64

Binary-to-text encoding that represents binary data using 64 ASCII characters (A–Z, a–z, …

Big5

การเข้ารหัสอักษรจีนตัวเต็มที่ใช้ส่วนใหญ่ในไต้หวันและฮ่องกง เข้ารหัสอักขระ CJK ประมาณ 13,000 ตัว

EBCDIC

Extended Binary Coded Decimal Interchange Code รหัสเข้ารหัสของเมนเฟรม IBM ที่มีช่วงตัวอักษรไม่ต่อเนื่อง ยังคงใช้ในธนาคารและเมนเฟรมองค์กร

EUC-KR

การเข้ารหัสอักขระภาษาเกาหลีที่อิงตาม KS X 1001 แมปอักษรฮันกึลและฮันจาเป็นลำดับสองไบต์

GB2312 / GB18030

กลุ่มการเข้ารหัสอักษรจีนตัวย่อ: GB2312 (6,763 อักขระ) พัฒนาเป็น GBK แล้วเป็น GB18030 ซึ่งเป็นมาตรฐานแห่งชาติจีนที่บังคับใช้และเข้ากันได้กับ Unicode

ISO 8859

กลุ่มการเข้ารหัสไบต์เดี่ยว 8 บิตสำหรับกลุ่มภาษาต่างๆ ISO 8859-1 (Latin-1) เป็นพื้นฐานของ 256 จุดรหัสแรกของ Unicode

Shift JIS

การเข้ารหัสอักขระภาษาญี่ปุ่นที่ผสม ASCII/JIS Roman แบบไบต์เดี่ยวกับคันจิ JIS X 0208 แบบสองไบต์ ยังคงใช้งานในระบบญี่ปุ่นรุ่นเก่า

UCS-2

การเข้ารหัส 2 ไบต์แบบความยาวคงที่ที่ล้าสมัย ครอบคลุมเฉพาะ BMP (U+0000–U+FFFF) เป็นรุ่นก่อนของ UTF-16 ที่ไม่สามารถแสดงอักขระเสริมได้

UTF-16

การเข้ารหัส Unicode แบบความยาวแปรผันที่ใช้ 2 หรือ 4 ไบต์ (1 หรือ 2 หน่วยรหัส 16 …