LinuxCommandLibrary

fc-cat

Read font files, showing font information

SYNOPSIS

fc-cat [OPTION]... [FILE]...

PARAMETERS

-h, --help
    Show this help message and exit

-V, --version
    Print version information

-e, --encoding=ENCODING
    Set the encoding of stdin/stdout

-i, --input-encoding=ENCODING
    Set the input encoding (default: locale)

-o, --output-encoding=ENCODING
    Set the output encoding (default: locale)

DESCRIPTION

fc-cat is a command-line tool from the Fcitx input method framework, designed to concatenate one or more files (or standard input) to standard output while converting character encodings. Fcitx is a lightweight input method supporting complex scripts like Chinese, Japanese, and Korean on Linux. This utility addresses encoding mismatches common in input method dictionaries, configuration files, and text resources.

By default, it uses the system's locale for input and output encodings, but users can override these with -i and -o options. The -e option sets a unified encoding for stdin/stdout. It leverages Fcitx's encoding tables for reliable conversion, making it ideal for viewing or processing files in GBK, Big5, EUC-JP, or other legacy encodings without iconv issues.

Common use cases include inspecting Fcitx data files via fcitx-configtool or scripting text processing for input methods. Unlike standard cat, it handles multi-byte encodings robustly within the Fcitx ecosystem.

ENVIRONMENT VARIABLES

FCITX_DATA_DIR
Override Fcitx data directory.

EXIT STATUS

0 if successful, 1 on error.

HISTORY

Developed by Weng Xuetian as part of the Fcitx project since around 2007, evolving with Fcitx versions to support enhanced encoding handling for input method data.

SEE ALSO

cat(1), iconv(1), fcitx(1)

Copied to clipboard