readFileUTF8 -package:polysemy-fs
Read a file in UTF8 encoding, throwing an exception on invalid
character encoding.
This function will use OS-specific line ending handling.
Strictly read a file into a
Text using a UTF-8 character
encoding. In the event of a character encoding error, a Unicode
replacement character will be used (a.k.a.,
lenientDecode).
Read a file strictly, as opposed to how
readFile does it using
lazy IO, but also disregard system locale and assume that the file is
encoded in UTF-8. Haskell source files are expected to be encoded in
UTF-8 by GHC.