Tcl Library Source Code

Documentation
Login


[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]

NAME

stringprep - Implementation of stringprep

Table Of Contents

SYNOPSIS

package require Tcl 8.5 9
package require stringprep 1.0.2

::stringprep::register profile ?-mapping list? ?-normalization form? ?-prohibited list? ?-prohibitedList list? ?-prohibitedCommand command? ?-prohibitedBidi boolean?
::stringprep::stringprep profile string
::stringprep::compare profile string1 string2

DESCRIPTION

This is an implementation in Tcl of the Preparation of Internationalized Strings ("stringprep"). It allows to define stringprep profiles and use them to prepare Unicode strings for comparison as defined in RFC-3454.

COMMANDS

EXAMPLES

Nameprep profile definition (see RFC-3491):

::stringprep::register nameprep  -mapping {B.1 B.2}  -normalization KC  -prohibited {A.1 C.1.2 C.2.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9}  -prohibitedBidi 1

Nodeprep and resourceprep profile definitions (see RFC-3920):

::stringprep::register nodeprep  -mapping {B.1 B.2}  -normalization KC  -prohibited {A.1 C.1.1 C.1.2 C.2.1 C.2.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9}  -prohibitedList {0x22 0x26 0x27 0x2f 0x3a 0x3c 0x3e 0x40}  -prohibitedBidi 1

::stringprep::register resourceprep  -mapping {B.1}  -normalization KC  -prohibited {A.1 C.1.2 C.2.1 C.2.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9}  -prohibitedBidi 1

REFERENCES

  1. "Preparation of Internationalized Strings ('stringprep')", (http://www.ietf.org/rfc/rfc3454.txt)

  2. "Nameprep: A Stringprep Profile for Internationalized Domain Names (IDN)", (http://www.ietf.org/rfc/rfc3491.txt)

  3. "Extensible Messaging and Presence Protocol (XMPP): Core", (http://www.ietf.org/rfc/rfc3920.txt)

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 Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.

When proposing code changes, please provide unified diffs, 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.

SEE ALSO

unicode(n)

KEYWORDS

stringprep, unicode

COPYRIGHT

Copyright © 2007-2009, Sergei Golovan