factor/basis/io/encodings/iana/iana-docs.factor

29 lines
1.6 KiB
Factor
Raw Normal View History

2009-02-03 18:32:05 -05:00
USING: help.syntax help.markup strings ;
2008-04-30 23:06:13 -04:00
IN: io.encodings.iana
2009-02-03 18:32:05 -05:00
ABOUT: "io.encodings.iana"
ARTICLE: "io.encodings.iana" "IANA-registered encoding names"
"The " { $vocab-link "io.encodings.iana" } " vocabulary provides words for accessing the names of encodings and the encoding descriptors corresponding to names." $nl
"Most text encodings in common use have been registered with IANA. There is a standard set of names for each encoding. Simple conversion functions:"
{ $subsections
name>encoding
encoding>name
}
2009-02-03 18:32:05 -05:00
"To let a new encoding be used with the above words, use the following:"
{ $subsections register-encoding } ;
2009-02-03 18:32:05 -05:00
2008-04-30 23:06:13 -04:00
HELP: name>encoding
2008-05-01 21:02:34 -04:00
{ $values { "name" "an encoding name" } { "encoding" "an encoding descriptor" } }
{ $description "Given an IANA-registered encoding name, find the encoding descriptor that represents it, or " { $snippet "f" } " if it is not found (either not implemented in Factor or not registered)." } ;
2008-04-30 23:06:13 -04:00
HELP: encoding>name
{ $values { "encoding" "an encoding descriptor" } { "name" "an encoding name" } }
{ $description "Given an encoding descriptor, return the preferred IANA name. If no name is found, returns " { $snippet "f" } "." } ;
2008-04-30 23:06:13 -04:00
{ name>encoding encoding>name } related-words
2009-02-03 18:32:05 -05:00
HELP: register-encoding
{ $values { "descriptor" "an encoding descriptor" } { "name" string } }
{ $description "Registers an encoding descriptor with the given name, available for lookup through " { $link name>encoding } " and " { $link encoding>name } ". IANA-registered aliases are automatically included. The name given must be the first name in the " { $snippet "resources:basis/io/encodings/iana/character-sets" } " file." } ;