Documentation ¶
Overview ¶
Package fold implements operations that map similar characters to a common target. These operations are called character foldings, and can be used to ignore certain distinctions between similar characters.
Each folder implements the transform.Transform interface.
DISCLAIMER: these folders are based on suggested foldings that appear in withdrawn drafts of Unicode technical reports. They may not be complete. Their names come from those technical reports.
WARNING: folding is NOT appropriate for secure contexts - see x/text/secure/precis instead.
See, for important commentary: - Unicode Technical Report 30: CHARACTER FOLDINGS (withdrawn, draft) - Unicode Technical Report 25: CHARACTER FOLDINGS (draft)
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Accents = accents
Accents is a transformer that removes accents from Latin/Greek/Cyrillic characters.
var CanonicalDuplicates = canonicalDuplicates
CanonicalDuplicates is a transformer that folds duplicate singletons (usually when the same character, for historical reasons, has two different code points) (e.g. Ohm => Omega)
var Dashes = dashes
Dashes is a transformer that folds everything in Unicode class Pd ("dash punctuation") to hyphen-minus '-'.
var Digits = digits
Digits is a transformer that folds digits in a native language or a typographical context to a substitute ASCII digit. Note that this maps to Unicode code points for the digits '0' to '9', not to the codepoints with integer values 0 to 9.
var GreekLetterforms = greekLetterforms
GreekLetterforms is a transformer that folds alternative Greek letterforms e.g. 'ϐ' to 'β'.
var HebrewAlternates = hebrewAlternates
HebrewAlternates is a transformer that folds e.g. wide Hebrew characters to non-wide variants.
var Jamo = jamo
Jamo folding converts from the Hangul Compatibility Jamo Unicode block to the Hangul Jamo Unicode block.
var Math = math
Math folding converts font variants, excluding the HebrewAlternates.
var NoBreak = noBreak
NoBreak folding converts non-breaking space and non-breaking hyphens.
var Positional = positional
Positional folding performs positional forms folding including Arabic ligatures.
var Small = small
Small folding converts small variant forms into normal forms.
var Space = space
Space folding converts all spaces to a single 0x0020 space.
Functions ¶
This section is empty.
Types ¶
This section is empty.