stringprep man page on Ubuntu

Man page or keyword search:  
man Server   6591 pages
apropos Keyword Search (all sections)
Output format
Ubuntu logo
[printable version]

stringprep(3tcl)   Preparation of Internationalized Strings   stringprep(3tcl)

______________________________________________________________________________

NAME
       stringprep - Implementation of stringprep

SYNOPSIS
       package require Tcl  8.3

       package require stringprep  1.0.1

       ::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 International‐
       ized Strings ("stringprep"). It allows to  define  stringprep  profiles
       and  use	 them  to prepare Unicode strings for comparison as defined in
       RFC-3454.

COMMANDS
       ::stringprep::register profile ?-mapping	 list?	?-normalization	 form?
       ?-prohibited  list? ?-prohibitedList list? ?-prohibitedCommand command?
       ?-prohibitedBidi boolean?
	      Register the stringprep profile named profile. Options  are  the
	      following.

	      Option  -mapping	specifies  stringprep  mapping	tables.	  This
	      parameter takes list of tables from appendix B of RFC-3454.  The
	      usual  list values are {B.1 B.2} or {B.1 B.3} where B.1 contains
	      characters which commonly map to	nothing,  B.3  specifies  case
	      folding,	and B.2 is used in profiles with unicode normalization
	      form KC. Defult value is {} which means no mapping.

	      Option -normalization takes a string and if it is nonempty  then
	      it  uses	as  a name of Unicode normalization form. Any value of
	      "D", "C", "KD" or "KC" may be used, though RFC-3454 defines only
	      two options: no normalization or normalization using form KC.

	      Option  -prohibited takes a list of RFC-3454 tables with prohib‐
	      ited characters. Current version does allow to  prohibit	either
	      all  tables  from	 C.3  to C.9 or neither of them. An example of
	      this list for RFC-3491 is {A.1 C.1.2 C.2.2 C.3 C.4 C.5  C.6  C.7
	      C.8 C.9}.

	      Option -prohibitedList specifies a list of additional prohibited
	      characters. The list  contains  not  characters  themselves  but
	      their  Unicode numbers. For example, Nodeprep specification from
	      RFC-3920 forbids the following codes: {0x22 0x26 0x27 0x2f  0x3a
	      0x3c 0x3e 0x40} (\" \& \' / : < > @).

	      Option  -prohibitedCommand  specifies  a command which is called
	      for every character code in mapped and normalized string. If the
	      command  returns	true  then the character is considered prohib‐
	      ited. This option is useful when a list for  -prohibitedList  is
	      too large.

	      Option  -prohibitedBidi  takes  boolean  value and if it is true
	      then the bidirectional character	processing  rules  defined  in
	      section 6 of RFC-3454 are used.

       ::stringprep::stringprep profile string
	      Performs	stringprep  operations	defined	 in profile profile to
	      string string. Result is a prepared string or one of the follow‐
	      ing  errors:  invalid_profile  (profile profile is not defined),
	      prohibited_character (string string contains a prohibited	 char‐
	      acter)  or  prohibited_bidi (string string contains a prohibited
	      bidirectional sequence).

       ::stringprep::compare profile string1 string2
	      Compares two unicode strings prepared accordingly to  stringprep
	      profile  profile.	 The command returns 0 if prepared strings are
	      equal, -1 if string1 is lexicographically less than string2,  or
	      1 if string1 is lexicographically greater than string2.

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       SF	Trackers       [http://source‐
       forge.net/tracker/?group_id=12883].   Please  also report any ideas for
       enhancements you may have for either package and/or documentation.

SEE ALSO
       unicode(3tcl)

KEYWORDS
       stringprep, unicode

COPYRIGHT
       Copyright (c) 2007-2009, Sergei Golovan <sgolovan@nes.ru>

stringprep			     1.0.1		      stringprep(3tcl)
[top]

List of man pages available for Ubuntu

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net