code-page-0.1.3: Windows code page library for Haskell
Copyright(C) 2016-2017 Ryan Scott
LicenseBSD-style (see the file LICENSE)
MaintainerRyan Scott
StabilityProvisional
PortabilityPortable
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.IO.CodePage

Description

Exports functions which adjust code pages on Windows, and do nothing on other operating systems.

Synopsis

Documentation

withCP65001 :: IO a -> IO a Source #

Sets the code page for an action to UTF-8 as necessary.

withCP1200 :: IO a -> IO a Source #

Sets the code page for an action to UTF-16LE as necessary.

withCP1201 :: IO a -> IO a Source #

Sets the code page for an action to UTF-16BE as necessary.

withCP12000 :: IO a -> IO a Source #

Sets the code page for an action to UTF-32LE as necessary.

withCP12001 :: IO a -> IO a Source #

Sets the code page for an action to UTF-32BE as necessary.

withCodePage :: CodePage -> IO a -> IO a Source #

Sets the code page for an action as necessary.

withCodePageVerbosity :: Bool -> CodePage -> IO a -> IO a Source #

Sets the code page for an action as necessary. If the Bool argument is True, this function will emit a warning to stderr indicating that the code page has been changed. (withCodePage sets this argument to False.)

type CodePage = Word32 Source #

A numeric type representing Windows code pages.

cp65001 :: CodePage Source #

The UTF-8 code page.

cp1200 :: CodePage Source #

The UTF-16LE code page.

cp1201 :: CodePage Source #

The UTF-16BE code page.

cp12000 :: CodePage Source #

The UTF-32LE code page.

cp12001 :: CodePage Source #

The UTF-32BE code page.