Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Flat instances for the text library
Documentation
The desired text encoding can be explicitly specified using the wrappers UTF8Text and UTF16Text.
The default encoding is UTF8:
>>>
tst (UTF8Text $ T.pack "日日日") == tst (T.pack "日日日")
True
A wrapper to encode/decode Text as UTF8
Instances
Show UTF8Text Source # | |
Flat UTF8Text Source # | |
Eq UTF8Text Source # | |
Ord UTF8Text Source # | |
Defined in Flat.Instances.Text |
>>>
tt (UTF16Text $ T.pack "aaa")
(True,[1,6,97,0,97,0,97,0,0])
>>>
tt (UTF16Text $ T.pack "𐍈𐍈𐍈")
(True,[1,12,0,216,72,223,0,216,72,223,0,216,72,223,0])
A wrapper to encode/decode Text as UTF16
Instances
Show UTF16Text Source # | |
Flat UTF16Text Source # | |
Eq UTF16Text Source # | |
Ord UTF16Text Source # | |
Defined in Flat.Instances.Text |
Orphan instances
Flat Text Source # | Text (and Data.Text.Lazy) is encoded as a byte aligned array of bytes corresponding to its UTF8 encoding.
Strict and Lazy Text have the same encoding:
|
Flat Text Source # | |