1[comment {-*- tcl -*- doctools manpage}]
2[manpage_begin unicode n 1.0.0]
3[copyright {2007, Sergei Golovan <sgolovan@nes.ru>}]
4[moddesc {Unicode normalization}]
5[titledesc {Implementation of Unicode normalization}]
6[require Tcl 8.3]
7[require unicode 1.0]
8[description]
9[para]
10
11This is an implementation in Tcl of the Unicode normalization forms.
12
13[section "COMMANDS"]
14
15[list_begin definitions]
16[call [cmd "::unicode::fromstring"] \
17        [arg string]]
18
19Converts [arg string] to list of integer Unicode character codes which
20is used in [package unicode] for internal string representation.
21
22[call [cmd "::unicode::tostring"] \
23        [arg uclist]]
24
25Converts list of integers [arg uclist] back to Tcl string.
26
27[call [cmd "::unicode::normalize"] \
28        [arg form] \
29        [arg uclist]]
30
31Normalizes Unicode characters list [arg ulist] according to [arg form]
32and returns the normalized list. Form [arg form] takes one of the following
33values: [arg D] (canonical decomposition), [arg C] (canonical decomposition, followed
34by canonical composition), [arg KD] (compatibility decomposition), or [arg KC]
35(compatibility decomposition, followed by canonical composition).
36
37[call [cmd "::unicode::normalizeS"] \
38        [arg form] \
39        [arg string]]
40
41A shortcut to
42::unicode::tostring [lb]unicode::normalize \$form [lb]::unicode::fromstring \$string[rb][rb].
43Normalizes Tcl string and returns normalized string.
44
45[list_end]
46
47[section EXAMPLES]
48
49[example {
50% ::unicode::fromstring "\u0410\u0411\u0412\u0413"
511040 1041 1042 1043
52% ::unicode::tostring {49 50 51 52 53}
5312345
54%
55}]
56
57[example {
58% ::unicode::normalize D {7692 775}
5968 803 775
60% ::unicode::normalizeS KD "\u1d2c"
61A
62%
63}]
64
65[section "REFERENCES"]
66
67[list_begin enum]
68
69[enum]
70    "Unicode Standard Annex #15: Unicode Normalization Forms",
71    ([uri http://unicode.org/reports/tr15/])
72
73[list_end]
74
75[see_also stringprep(n) ]
76
77[section "AUTHORS"]
78Sergei Golovan
79
80
81[section {BUGS, IDEAS, FEEDBACK}]
82
83This document, and the package it describes, will undoubtedly contain
84bugs and other problems.
85
86Please report such in the category [emph stringprep] of the
87[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}].
88
89Please also report any ideas for enhancements you may have for either
90package and/or documentation.
91
92
93[keywords unicode normalization]
94[manpage_end]
95