Modules 11
System.OsString.Encoding.Internal
mkUcs2le :: CodingFailureMode -> TextEncoding
ucs2le_DF :: CodingFailureMode -> IO (TextDecoder ())
ucs2le_EF :: CodingFailureMode -> IO (TextEncoder ())
ucs2le_decode :: DecodeBuffer
ucs2le_encode :: EncodeBuffer
utf16le_b :: TextEncoding
Mimics the base encoding for filesystem operations. This should be total on all inputs (word16 byte arrays).
Note that this has a subtle difference to encodeWithBaseWindows/decodeWithBaseWindows: it doesn't care for
the 0x0000 end marker and will as such produce different results. Use takeWhile (/= 'NUL') on the input
to recover this behavior.
mkUTF16le_b :: CodingFailureMode -> TextEncoding
utf16le_b_DF :: CodingFailureMode -> IO (TextDecoder ())
utf16le_b_EF :: CodingFailureMode -> IO (TextEncoder ())
utf16le_b_decode :: DecodeBuffer
utf16le_b_encode :: EncodeBuffer
cWcharsToChars_UCS2 :: [Word16] -> [Char]
cWcharsToChars :: [Word16] -> [Char]
charsToCWchars :: [Char] -> [Word16]
withWindowsString :: String -> (Int -> Ptr Word16 -> IO a) -> IO a
peekWindowsString :: (Ptr Word16, Int) -> IO String
withPosixString :: String -> (CStringLen -> IO a) -> IO a
withPosixString' :: String -> (CStringLen -> IO a) -> IO a
peekPosixString :: CStringLen -> IO String
peekPosixString' :: CStringLen -> IO String
decodeWithTE :: TextEncoding -> BS8.ShortByteString -> Either EncodingException String
Decode with the given TextEncoding.
encodeWithTE :: TextEncoding -> String -> Either EncodingException BS8.ShortByteString
Encode with the given TextEncoding.
decodeWithBasePosix :: BS8.ShortByteString -> IO String
This mimics the filepath decoder base uses on unix (using PEP-383), with the small distinction that we're not truncating at NUL bytes (because we're not at the outer FFI layer).
decodeWithBasePosix' :: BS8.ShortByteString -> IO String
This mimics the string decoder base uses on unix, with the small distinction that we're not truncating at NUL bytes (because we're not at the outer FFI layer).
encodeWithBasePosix :: String -> IO BS8.ShortByteString
This mimics the filepath encoder base uses on unix (using PEP-383), with the small distinction that we're not truncating at NUL bytes (because we're not at the outer FFI layer).
encodeWithBasePosix' :: String -> IO BS8.ShortByteString
This mimics the string encoder base uses on unix, with the small distinction that we're not truncating at NUL bytes (because we're not at the outer FFI layer).
decodeWithBaseWindows :: BS16.ShortByteString -> IO String
This mimics the filepath decoder base uses on windows, with the small distinction that we're not truncating at NUL bytes (because we're not at the outer FFI layer).
encodeWithBaseWindows :: String -> IO BS16.ShortByteString
This mimics the filepath dencoder base uses on windows, with the small distinction that we're not truncating at NUL bytes (because we're not at the outer FFI layer).
data EncodingException
EncodingError :: String -> (Maybe Word8) -> EncodingException
(Maybe Word8)Could not decode a byte sequence because it was invalid under the given encoding, or ran out of input in mid-decode.
showEncodingException :: EncodingException -> String
wNUL :: Word16
Instances
5
instance Eq EncodingExceptioninstance Typeable EncodingExceptioninstance Show EncodingExceptioninstance Exception EncodingExceptioninstance NFData EncodingException
Build record and source files
Community contribution. The service has not verified this documentation. The generator reported 4 diagnostics.
Target: Linux on x86-64. Some inferred types and resolved links are not available.
Generator: aihc-haddock-858b1951-web-1
Metadata snapshot: 467adfa4e90b59b0072712e32d97437632176e89f16e62151dd53a2e41646abb
Open the dependency plan · Download the documentation model
- aihc-base-4.21.2.0 · Core library · Cabal file
- aihc-internal-9.1204.0 · Core library · Cabal file
- aihc-prim-0.13.0 · Core library · Cabal file
- aihc-rts-1.0.2 · Core library · Cabal file
- aihc-template-haskell-2.23.0.0 · Core library · Cabal file
- array-0.5.8.0 · Cabal revision 2 · Cabal file · Source archive
- bytestring-0.12.2.0 · Cabal revision 1 · Cabal file · Source archive
- deepseq-1.5.2.0 · Cabal revision 0 · Cabal file · Source archive
- exceptions-0.10.12 · Cabal revision 2 · Cabal file · Source archive
- mtl-2.3.2 · Cabal revision 1 · Cabal file · Source archive
- os-string-2.0.11 · Cabal revision 0 · Cabal file · Source archive
- stm-2.5.3.1 · Cabal revision 1 · Cabal file · Source archive
- transformers-0.6.3.0 · Cabal revision 2 · Cabal file · Source archive