Tcl 9.1/Tk9.1 Documentation > Tcl Commands, version 9.1a1 > unicode

Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

NAME
unicode — Unicode character transforms
SYNOPSIS
DESCRIPTION
unicode tonfc ?-profile profile? string
unicode tonfd ?-profile profile? string
unicode tonfkc ?-profile profile? string
unicode tonfkd ?-profile profile? string
SEE ALSO
KEYWORDS

NAME

unicode — Unicode character transforms

SYNOPSIS

unicode function ?options? string

DESCRIPTION

The command performs one of several Unicode character transformations, depending on function which may take the values described below.

unicode tonfc ?-profile profile? string
Returns string normalized as per Unicode Normalization Form C (NFC).

unicode tonfd ?-profile profile? string
Returns string normalized as per Unicode Normalization Form D (NFD).

unicode tonfkc ?-profile profile? string
Returns string normalized as per Unicode Normalization Form KC (NFKC).

unicode tonfkd ?-profile profile? string
Returns string normalized as per Unicode Normalization Form KD (NFKD).

The normalization forms NFC, NFD, NFKC and NFKD referenced above are defined in Section 3.11 of the Unicode standard (see https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-3/).

The -profile option determines the command behavior in the presence of conversion errors. The passed profile must be strict or replace. See the PROFILES section in the documentation of the encoding command for details on profiles.

SEE ALSO

Tcl_UtfToNormalized

KEYWORDS

Unicode, normalize
Copyright © 2025 Ashok P. Nadkarni.