Unicode is represented as the Char type Precondition for this is the support of Unicode character range in the compiler (e.g. ghc but not hugs)
Modulehxt-unicode-9.0.2.4Haskell98
Data.String.Unicode
Unicode and UTF-8 Conversion Functions
Contents
Synopsis
- type Unicode
- type UString
- type UTF8Char
- type UTF8String
- type UStringWithErrors
- type DecodingFct
- type DecodingFctEmbedErrors
- value utf8ToUnicode
- value utf8ToUnicodeEmbedErrors
- value latin1ToUnicode
- value ucs2ToUnicode
- value ucs2BigEndianToUnicode
- value ucs2LittleEndianToUnicode
- value utf16beToUnicode
- value utf16leToUnicode
- value unicodeCharToUtf8
- value unicodeToUtf8
- value unicodeToXmlEntity
- value unicodeToLatin1
- value unicodeRemoveNoneAscii
- value unicodeRemoveNoneLatin1
- value intToCharRef
- value intToCharRefHex
- value intToHexString
- value getDecodingFct
- value getDecodingFctEmbedErrors
- value getOutputEncodingFct
- value normalizeNL
- value guessEncoding
- value getOutputEncodingFct'
- value unicodeCharToUtf8'
- value unicodeCharToXmlEntity'
- value unicodeCharToLatin1'
- Packagehxt-unicode-9.0.2.4
- Exports33
- LanguageHaskell98
- LicenceMIT
- SourceUnicode.hs
Unicode Type declarations
the type for Unicode strings
UTF-8 charachters are represented by the Char type
UTF-8 strings are implemented as Haskell strings
Decoding function with a pair containing the result string and a list of decoding errors as result
Decoding function where decoding errors are interleaved with decoded characters
UTF-8 to Unicode conversion with deletion of leading byte order mark, as described in XML standard F.1
code conversion from latin1 to Unicode
UCS-2 to UTF-8 conversion with byte order mark analysis
UCS-2 big endian to Unicode conversion
UCS-2 little endian to Unicode conversion
UTF-16 big endian to UTF-8 conversion with removal of byte order mark
UTF-16 little endian to UTF-8 conversion with removal of byte order mark
conversion from Unicode (Char) to a UTF8 encoded string.
conversion from Unicode strings (UString) to UTF8 encoded strings.
substitute all Unicode characters, that are not legal 1-byte UTF-8 XML characters by a character reference.
This function can be used to translate all text nodes and attribute values into pure ascii.
see also : unicodeToLatin1
substitute all Unicode characters, that are not legal latin1 UTF-8 XML characters by a character reference.
This function can be used to translate all text nodes and attribute values into ISO latin1.
see also : unicodeToXmlEntity
removes all non ascii chars, may be used to transform a document into a pure ascii representation by removing all non ascii chars from tag and attibute names
see also : unicodeRemoveNoneLatin1, unicodeToXmlEntity
removes all non latin1 chars, may be used to transform a document into a pure ascii representation by removing all non ascii chars from tag and attibute names
see also : unicodeRemoveNoneAscii, unicodeToLatin1
convert an Unicode into a XML character reference.
see also : intToCharRefHex
convert an Unicode into a XML hexadecimal character reference.
see also: intToCharRef
the lookup function for selecting the decoding function
the lookup function for selecting the decoding function
the lookup function for selecting the encoding function
White Space (XML Standard 2.3) and end of line handling (2.11)
#x0D and #x0D#x0A are mapped to #x0A
the lookup function for selecting the encoding function
conversion from Unicode (Char) to a UTF8 encoded string.
substitute all Unicode characters, that are not legal 1-byte UTF-8 XML characters by a character reference.
substitute all Unicode characters, that are not legal latin1 UTF-8 XML characters by a character reference.