Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data EncodingException = EncodingError String (Maybe Word8)
- showEncodingException :: EncodingException -> String
- ucs2le :: TextEncoding
- mkUcs2le :: CodingFailureMode -> TextEncoding
- ucs2le_DF :: CodingFailureMode -> IO (TextDecoder ())
- ucs2le_EF :: CodingFailureMode -> IO (TextEncoder ())
- ucs2le_decode :: DecodeBuffer
- ucs2le_encode :: EncodeBuffer
- utf16le_b :: TextEncoding
- mkUTF16le_b :: CodingFailureMode -> TextEncoding
- utf16le_b_DF :: CodingFailureMode -> IO (TextDecoder ())
- utf16le_b_EF :: CodingFailureMode -> IO (TextEncoder ())
- utf16le_b_decode :: DecodeBuffer
- utf16le_b_encode :: EncodeBuffer
- encodeWithBasePosix :: String -> IO ShortByteString
- decodeWithBasePosix :: ShortByteString -> IO String
- encodeWithBaseWindows :: String -> IO ShortByteString
- decodeWithBaseWindows :: ShortByteString -> IO String
Types
data EncodingException Source #
EncodingError String (Maybe Word8) | Could not decode a byte sequence because it was invalid under the given encoding, or ran out of input in mid-decode. |
Instances
NFData EncodingException | |
Defined in System.OsString.Encoding.Internal rnf :: EncodingException -> () Source # | |
Exception EncodingException | |
Show EncodingException | |
Defined in System.OsString.Encoding.Internal showsPrec :: Int -> EncodingException -> ShowS # show :: EncodingException -> String # showList :: [EncodingException] -> ShowS # | |
Eq EncodingException | |
Defined in System.OsString.Encoding.Internal (==) :: EncodingException -> EncodingException -> Bool # (/=) :: EncodingException -> EncodingException -> Bool # |
UCS-2
ucs2le_DF :: CodingFailureMode -> IO (TextDecoder ()) Source #
ucs2le_EF :: CodingFailureMode -> IO (TextEncoder ()) Source #
UTF-16LE_b
utf16le_b :: TextEncoding Source #
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.
utf16le_b_DF :: CodingFailureMode -> IO (TextDecoder ()) Source #
utf16le_b_EF :: CodingFailureMode -> IO (TextEncoder ()) Source #
base encoding
encodeWithBasePosix :: String -> IO ShortByteString Source #
This mimics the filepath dencoder 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).
decodeWithBasePosix :: ShortByteString -> IO String Source #
This mimics the filepath 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).
encodeWithBaseWindows :: String -> IO ShortByteString Source #
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).
decodeWithBaseWindows :: ShortByteString -> IO String Source #
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).