| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Mikan.Utils.Char
Description
Mikan strings are backed by Data.Text, which can only represent unicode scalar values.
However, the Haskell type Char represents all unicode code points, including surrogates.
To allow primStringFromList to be injective
we make sure character values also exclude surrogate code points,
mapping them to the replacement character U+FFFD.
See #4999 for more information.
Synopsis
- replacementChar :: Char
- isSurrogateCodePoint :: Char -> Bool
- replaceSurrogateCodePoint :: Char -> Char
- integerToChar :: Integer -> Char
Documentation
replacementChar :: Char Source #
The unicode replacement character � (U+FFFD).
isSurrogateCodePoint :: Char -> Bool Source #
Is a character a surrogate code point?
replaceSurrogateCodePoint :: Char -> Char Source #
Map surrogate code points to the unicode replacement character.
integerToChar :: Integer -> Char Source #
Total function to convert an integer to a character. Maps surrogate code points
to the replacement character U+FFFD.