Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- ucs2le :: TextEncoding
- mkUcs2le :: CodingFailureMode -> TextEncoding
- ucs2le_DF :: CodingFailureMode -> IO (TextDecoder ())
- ucs2le_EF :: CodingFailureMode -> IO (TextEncoder ())
- ucs2le_decode :: DecodeBuffer
- ucs2le_encode :: EncodeBuffer
- cWcharsToChars :: [Word16] -> [Char]
- charsToCWchars :: [Char] -> [Word16]
- withCWString :: String -> (Ptr Word16 -> IO a) -> IO a
- peekCWString :: Ptr Word16 -> IO String
- withFilePathWin :: FilePath -> (Ptr Word16 -> IO a) -> IO a
- peekFilePathWin :: Ptr Word16 -> IO FilePath
- withFilePathPosix :: FilePath -> (CString -> IO a) -> IO a
- peekFilePathLenPosix :: CStringLen -> IO FilePath
- decodeWith :: TextEncoding -> ShortByteString -> Either EncodingException String
- encodeWith :: TextEncoding -> String -> Either EncodingException ShortByteString
- decodeWithBasePosix :: ShortByteString -> IO String
- encodeWithBasePosix :: String -> IO ShortByteString
- decodeWithBaseWindows :: ShortByteString -> String
- encodeWithBaseWindows :: String -> ShortByteString
- data EncodingException = EncodingError String (Maybe Word8)
- showEncodingException :: EncodingException -> String
- wNUL :: Word16
Documentation
ucs2le_decode :: DecodeBuffer Source #
ucs2le_encode :: EncodeBuffer Source #
cWcharsToChars :: [Word16] -> [Char] Source #
charsToCWchars :: [Char] -> [Word16] Source #
withCWString :: String -> (Ptr Word16 -> IO a) -> IO a Source #
Marshal a Haskell string into a NUL terminated C wide string using temporary storage.
- the Haskell string may not contain any NUL characters
- the memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.
peekCWString :: Ptr Word16 -> IO String Source #
withFilePathWin :: FilePath -> (Ptr Word16 -> IO a) -> IO a Source #
peekFilePathWin :: Ptr Word16 -> IO FilePath Source #
withFilePathPosix :: FilePath -> (CString -> IO a) -> IO a Source #
peekFilePathLenPosix :: CStringLen -> IO FilePath Source #
decodeWith :: TextEncoding -> ShortByteString -> Either EncodingException String Source #
encodeWith :: TextEncoding -> String -> Either EncodingException ShortByteString Source #
decodeWithBasePosix :: ShortByteString -> IO String Source #
encodeWithBasePosix :: String -> IO ShortByteString Source #
decodeWithBaseWindows :: ShortByteString -> String Source #
encodeWithBaseWindows :: String -> ShortByteString Source #
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
Eq EncodingException Source # | |
Defined in System.OsPath.Encoding.Internal (==) :: EncodingException -> EncodingException -> Bool (/=) :: EncodingException -> EncodingException -> Bool | |
Show EncodingException Source # | |
Defined in System.OsPath.Encoding.Internal showsPrec :: Int -> EncodingException -> ShowS show :: EncodingException -> String showList :: [EncodingException] -> ShowS | |
Exception EncodingException Source # | |
Defined in System.OsPath.Encoding.Internal toException :: EncodingException -> SomeException fromException :: SomeException -> Maybe EncodingException displayException :: EncodingException -> String | |
NFData EncodingException Source # | |
Defined in System.OsPath.Encoding.Internal rnf :: EncodingException -> () |
showEncodingException :: EncodingException -> String Source #