charmap - Linux
Overview
The charmap
command displays a graphical character map that allows users to visually browse and select Unicode characters with their corresponding code points. It is a useful tool for developers, designers, and anyone working with text and character encoding.
Syntax
charmap [options]
Options/Flags
- –unicode (None): Display Unicode characters. This is the default mode.
- –ascii (None): Display only ASCII characters.
- –blocks (None): Display a list of Unicode blocks.
- –code-points (None): Show code points of characters.
- –font ("Terminus"): Specify the font to use in the character map.
- –height (24): Set the height of the character map in lines.
- –width (80): Set the width of the character map in columns.
- –scale (1): Scale the character map by the given factor.
- –help (None): Print help information and exit.
- –version (None): Print version information and exit.
Examples
- Display the Unicode character map:
charmap
- Display only ASCII characters:
charmap --ascii
- List Unicode blocks:
charmap --blocks
- Show code points of characters:
charmap --code-points
- Use a different font:
charmap --font Menlo
Common Issues
- If the character map does not display correctly, try adjusting the terminal font settings or updating your terminal emulator.
- Some fonts may not support all Unicode characters. If a character is missing, try using a different font.
Integration
The charmap
command can be piped to other commands for further processing. For example, to save the character map as an image file:
charmap | convert -trim +repage BMP3:charmap.bmp
Related Commands
hexdump
: Display a file in different formats, including character encoding.od
: Print the contents of a file in octal, decimal, hexadecimal, and other formats.unichar
: Identify and display Unicode characters.