filepath-1.4.99.0: Library for manipulating FilePaths in a cross platform way.
Safe HaskellNone
LanguageHaskell2010

System.OsPath.Encoding.Internal

Synopsis

Documentation

ucs2le :: TextEncoding Source #

mkUcs2le :: CodingFailureMode -> TextEncoding Source #

ucs2le_DF :: CodingFailureMode -> IO (TextDecoder ()) Source #

ucs2le_EF :: CodingFailureMode -> IO (TextEncoder ()) Source #

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 #

decodeWith :: TextEncoding -> ShortByteString -> Either EncodingException String Source #

encodeWith :: TextEncoding -> String -> Either EncodingException ShortByteString Source #

data EncodingException Source #

Constructors

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

Instances details
Eq EncodingException Source # 
Instance details

Defined in System.OsPath.Encoding.Internal

Show EncodingException Source # 
Instance details

Defined in System.OsPath.Encoding.Internal

Methods

showsPrec :: Int -> EncodingException -> ShowS

show :: EncodingException -> String

showList :: [EncodingException] -> ShowS

Exception EncodingException Source # 
Instance details

Defined in System.OsPath.Encoding.Internal

Methods

toException :: EncodingException -> SomeException

fromException :: SomeException -> Maybe EncodingException

displayException :: EncodingException -> String

NFData EncodingException Source # 
Instance details

Defined in System.OsPath.Encoding.Internal

Methods

rnf :: EncodingException -> ()

wNUL :: Word16 Source #