File: unicode.man

package info (click to toggle)
tcllib 1.12-dfsg-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 25,336 kB
  • ctags: 7,235
  • sloc: tcl: 126,727; ansic: 10,090; sh: 9,855; xml: 1,766; yacc: 753; makefile: 127; perl: 84; f90: 84; pascal: 74; python: 33; ruby: 13; php: 11
file content (94 lines) | stat: -rw-r--r-- 2,334 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin unicode n 1.0.0]
[copyright {2007, Sergei Golovan <sgolovan@nes.ru>}]
[moddesc {Unicode normalization}]
[titledesc {Implementation of Unicode normalization}]
[require Tcl 8.3]
[require unicode 1.0]
[description]
[para]

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

[section "COMMANDS"]

[list_begin definitions]
[call [cmd "::unicode::fromstring"] \
        [arg string]]

Converts [arg string] to list of integer Unicode character codes which
is used in [package unicode] for internal string representation.

[call [cmd "::unicode::tostring"] \
        [arg uclist]]

Converts list of integers [arg uclist] back to Tcl string.

[call [cmd "::unicode::normalize"] \
        [arg form] \
        [arg uclist]]

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

[call [cmd "::unicode::normalizeS"] \
        [arg form] \
        [arg string]]

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

[list_end]

[section EXAMPLES]

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

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

[section "REFERENCES"]

[list_begin enum]

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

[list_end]

[see_also stringprep(n) ]

[section "AUTHORS"]
Sergei Golovan


[section {BUGS, IDEAS, FEEDBACK}]

This document, and the package it describes, will undoubtedly contain
bugs and other problems.

Please report such in the category [emph stringprep] of the
[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}].

Please also report any ideas for enhancements you may have for either
package and/or documentation.


[keywords unicode normalization]
[manpage_end]