Artifact 7a361d6af050bd2a888239ed649f388a1251e314787d1be9ee8eb808f6256ff0:
- File doc/markdown/unicode.md — part of check-in [f0995c8b62] at 2026-09-18 21:16:22 on branch tip-700 — - 4 new conversions - make sure we have a space between a .ccmd and a .cargs markdown span - escape "[" and "]" properly so it is preserved as literal character - even more ugly code to handle the TIP markers which may go across paragraphs and be in other places than anticipated up to now (user: Torsten, size: 1776) [annotate] [blame] [check-ins using]
CommandName: unicode ManualSection: n Version: 9.1 TclPart: Tcl TclDescription: Tcl Built-In Commands Links:
- Tcl_UtfToNormalized(3) Keywords:
- Unicode
- normalize Copyright:
- Copyright (c) 2025 Ashok P. Nadkarni. ---
Name
unicode - Unicode character transforms
Synopsis
::: {.synopsis} ::: [unicode]{.cmd} [function]{.arg} [options]{.optarg} [string]{.arg} :::
Description
The command performs one of several Unicode character transformations, depending on function which may take the values described below. []{version="TIP726"}
[unicode]{.cmd} [tonfc]{.sub} [[-profile]{.lit} [profile]{.arg}]{.optarg} [string]{.arg} : Returns string normalized as per Unicode Normalization Form C (NFC).
[]{version="TIP726"}
[unicode]{.cmd} [tonfd]{.sub} [[-profile]{.lit} [profile]{.arg}]{.optarg} [string]{.arg} : Returns string normalized as per Unicode Normalization Form D (NFD).
[]{version="TIP726"}
[unicode]{.cmd} [tonfkc]{.sub} [[-profile]{.lit} [profile]{.arg}]{.optarg} [string]{.arg} : Returns string normalized as per Unicode Normalization Form KC (NFKC).
[]{version="TIP726"}
[unicode]{.cmd} [tonfkd]{.sub} [[-profile]{.lit} [profile]{.arg}]{.optarg} [string]{.arg} : 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.