HORIZON HASKELLDocslts/ghc-10.0.xaa25b892026-10-10Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · aa25b89 · 2026-10-10

Moduletext-2.1.4Haskell2010

Data.Text.Internal.Encoding.Utf8

Warning: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk!

Basic UTF-8 validation and character manipulation.

  • 3 types
  • 17 values
  • Packagetext-2.1.4
  • Exports20
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceUtf8.hs
valueutf8Length :: Char -> Int
#

Measure byte length of UTF-8 encoding for a given character.

valueord2 :: Char -> (Word8, Word8)
#

Encode a character as UTF-8 bytes assuming that exactly 2 are needed. This precondition is not checked.

valueord3 :: Char -> (Word8, Word8, Word8)
#

Encode a character as UTF-8 bytes assuming that exactly 3 are needed. This precondition is not checked.

valueord4 :: Char -> (Word8, Word8, Word8, Word8)
#

Encode a character as UTF-8 bytes assuming that exactly 4 are needed. This precondition is not checked.

Validation

4 declarations

Naive decoding

8 declarations