haskell / 9 / libraries / win32-2.12.0.0 / system-win32-encoding.html

System.Win32.Encoding

Copyright 2012 shelarcy
License BSD-style
Maintainer shelarcy@gmail.com
Stability Provisional
Portability Non-portable (Win32 API)
Safe Haskell Safe-Inferred
Language Haskell2010

Description

Enocode/Decode mutibyte charactor using Win32 API.

getCurrentCodePage :: IO DWORD Source

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.

encodeMultiByteIO :: CodePage -> String -> IO String Source

decodeMultiByte :: CodePage -> String -> String Source

The System.IO input functions (e.g. getLine) don't automatically convert to Unicode, so this function is provided to make the conversion from a multibyte string in the given code page to a proper Unicode 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.

wideCharToMultiByte :: CodePage -> DWORD -> LPCWSTR -> CInt -> LPSTR -> CInt -> LPCSTR -> LPBOOL -> IO CInt Source

multiByteToWideChar :: CodePage -> DWORD -> LPCSTR -> CInt -> LPWSTR -> CInt -> IO CInt Source

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/9.4.2/docs/libraries/Win32-2.12.0.0/System-Win32-Encoding.html