| Copyright | 2012 shelarcy |
|---|---|
| License | BSD-style |
| Maintainer | shelarcy@gmail.com |
| Stability | Provisional |
| Portability | Non-portable (Win32 API) |
| Safe Haskell | None |
| Language | Haskell2010 |
GHC.IO.Windows.Encoding
Description
Encode/Decode multibyte character using Win32 API.
Synopsis
- encodeMultiByte :: CodePage -> String -> String
- encodeMultiByteIO :: CodePage -> String -> IO String
- encodeMultiByteRawIO :: CodePage -> String -> IO (LPCSTR, CInt)
- decodeMultiByte :: CodePage -> String -> String
- decodeMultiByteIO :: CodePage -> String -> IO String
- wideCharToMultiByte :: CodePage -> DWORD -> LPCWSTR -> CInt -> LPSTR -> CInt -> LPCSTR -> LPBOOL -> IO CInt
- multiByteToWideChar :: CodePage -> DWORD -> LPCSTR -> CInt -> LPWSTR -> CInt -> IO CInt
- withGhcInternalToUTF16 :: Ptr Word8 -> Int -> ((Ptr Word16, CInt) -> IO a) -> IO a
- withUTF16ToGhcInternal :: Ptr Word8 -> Int -> (CInt -> Ptr Word16 -> IO CInt) -> IO Int
Documentation
encodeMultiByte :: CodePage -> String -> String Source #
The System.IO output functions (e.g. putStr) don't
automatically convert to multibyte string on Windows, so this
function is provided to make the conversion from a Unicode string
in the given code page to a proper multibyte string. To get the
code page for the console, use getCurrentCodePage.
decodeMultiByteIO :: CodePage -> String -> IO String Source #
Because of stringToUnicode is unclear name, we use decodeMultiByteIO
for alias of stringToUnicode.