factor/basis/unicode/normalize/normalize-docs.factor

36 lines
1.7 KiB
Factor
Raw Normal View History

2009-01-07 18:59:01 -05:00
USING: help.syntax help.markup strings ;
IN: unicode.normalize
ABOUT: "unicode.normalize"
ARTICLE: "unicode.normalize" "Unicode normalization"
2009-01-26 00:03:49 -05:00
"The " { $vocab-link "unicode.normalize" "unicode.normalize" } " vocabulary defines words for normalizing Unicode strings."
$nl
"In Unicode, it is often possible to have multiple sequences of characters which really represent exactly the same thing. For example, to represent e with an acute accent above, there are two possible strings: " { $snippet "\"e\\u000301\"" } " (the e character, followed by the combining acute accent character) and " { $snippet "\"\\u0000e9\"" } " (a single character, e with an acute accent)."
$nl
"There are four normalization forms: NFD, NFC, NFKD, and NFKC. Basically, in NFD and NFKD, everything is expanded, whereas in NFC and NFKC, everything is contracted. In NFKD and NFKC, more things are expanded and contracted. This is a process which loses some information, so it should be done only with care."
$nl
"Most of the world uses NFC to communicate, but for many purposes, NFD/NFKD is easier to process. For more information, see Unicode Standard Annex #15 and section 3 of the Unicode standard."
{ $subsections
nfc
nfd
nfkc
nfkd
} ;
2009-01-07 18:59:01 -05:00
HELP: nfc
{ $values { "string" string } { "nfc" "a string in NFC" } }
2009-01-26 00:03:49 -05:00
{ $description "Converts a string to Normalization Form C." } ;
2009-01-07 18:59:01 -05:00
HELP: nfd
{ $values { "string" string } { "nfd" "a string in NFD" } }
2009-01-26 00:03:49 -05:00
{ $description "Converts a string to Normalization Form D." } ;
2009-01-07 18:59:01 -05:00
HELP: nfkc
{ $values { "string" string } { "nfkc" "a string in NFKC" } }
2009-01-26 00:03:49 -05:00
{ $description "Converts a string to Normalization Form KC." } ;
2009-01-07 18:59:01 -05:00
HELP: nfkd
2009-01-08 16:38:03 -05:00
{ $values { "string" string } { "nfkd" "a string in NFKD" } }
2009-01-26 00:03:49 -05:00
{ $description "Converts a string to Normalization Form KD." } ;