HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulehxt-unicode-9.0.2.4Haskell98

Data.String.Unicode

Unicode and UTF-8 Conversion Functions

  • 7 types
  • 26 values

Unicode Type declarations

33 declarations
typetype Unicode = Char
#

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)

typetype UTF8Char = Char
#

UTF-8 charachters are represented by the Char type

typetype DecodingFct = String -> (UString, [String])
#

Decoding function with a pair containing the result string and a list of decoding errors as result

UTF-8 to Unicode conversion with deletion of leading byte order mark, as described in XML standard F.1

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

valuenormalizeNL :: String -> String
#

White Space (XML Standard 2.3) and end of line handling (2.11)

#x0D and #x0D#x0A are mapped to #x0A

valueunicodeCharToXmlEntity' :: Char -> StringFct
#

substitute all Unicode characters, that are not legal 1-byte UTF-8 XML characters by a character reference.

valueunicodeCharToLatin1' :: Char -> StringFct
#

substitute all Unicode characters, that are not legal latin1 UTF-8 XML characters by a character reference.