logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

unicode - Implementation of Unicode normalization

Authors

       Sergei Golovan

Bugs, Ideas, Feedback

       This document, and the package it describes, will undoubtedly contain bugs and  other  problems.   Please
       report  such  in  the  category stringprep of the TcllibTrackers [http://core.tcl.tk/tcllib/reportlist].
       Please also report any ideas for enhancements you may have for either package and/or documentation.

       When proposing code changes, please provide unifieddiffs, i.e the output of diff-u.

       Note further that attachments are strongly preferred over inlined patches. Attachments  can  be  made  by
       going  to the Edit form of the ticket immediately after its creation, and then using the left-most button
       in the secondary navigation bar.

Commands

::unicode::fromstringstring
              Converts  string  to list of integer Unicode character codes which is used in unicode for internal
              string representation.

       ::unicode::tostringuclist
              Converts list of integers uclist back to Tcl string.

       ::unicode::normalizeformuclist
              Normalizes Unicode characters list ulist according to form and returns the normalized  list.  Form
              form  takes  one of the following values: D (canonical decomposition), C (canonical decomposition,
              followed by  canonical  composition),  KD  (compatibility  decomposition),  or  KC  (compatibility
              decomposition, followed by canonical composition).

       ::unicode::normalizeSformstring
              A  shortcut  to  ::unicode::tostring [unicode::normalize \$form [::unicode::fromstring \$string]].
              Normalizes Tcl string and returns normalized string.

Description

       This is an implementation in Tcl of the Unicode normalization forms.

Examples

              % ::unicode::fromstring "\u0410\u0411\u0412\u0413"
              1040 1041 1042 1043
              % ::unicode::tostring {49 50 51 52 53}
              12345
              %

              % ::unicode::normalize D {7692 775}
              68 803 775
              % ::unicode::normalizeS KD "\u1d2c"
              A
              %

Keywords

       normalization, unicode

Name

       unicode - Implementation of Unicode normalization

References

       [1]    "Unicode Standard Annex #15: Unicode Normalization Forms", (http://unicode.org/reports/tr15/)

See Also

stringprep(3tcl)

Synopsis

       package require Tcl8.59

       package require unicode1.1.1::unicode::fromstringstring::unicode::tostringuclist::unicode::normalizeformuclist::unicode::normalizeSformstring

________________________________________________________________________________________________________________

See Also