readFileUTF8 -package:polysemy-fs

Like readFile, but with the encoding utf8.
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.
A strict version of readFileUTF8, see readFile' for details.