code-page-0.2: Windows code page library for Haskell

Copyright(C) 2018 Ryan Scott
LicenseBSD-style (see the file LICENSE)
MaintainerRyan Scott
StabilityExperimental
PortabilityPortable
Safe HaskellSafe
LanguageHaskell2010

System.IO.CodePage.Internal

Description

Various internals used by System.IO.CodePage.

Note that this is an internal module, and as such, the API presented here is not guaranteed to be stable, even between minor releases of this library.

Synopsis

Documentation

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.

cp1252 :: CodePage Source #

The Latin1 code page.

data Options Source #

Options that specify how withCodePage and friends should work.

Constructors

Options 

Fields

data NonWindowsBehavior Source #

Specifies how withCodePage and friends should work on operating systems other than Windows.

Constructors

NonWindowsDoNothing

Don't do anything at all on non-Windows OSes.

NonWindowsFallbackCodePageEncoding (CodePage -> TextEncoding)

On non-Windows OSes, change the TextEncoding by converting the CodePage argument to a TextEncoding using the supplied function.

nonWindowsDoNothing :: NonWindowsBehavior Source #

Don't do anything at all on non-Windows OSes.

nonWindowsFallbackCodePageEncoding :: (CodePage -> TextEncoding) -> NonWindowsBehavior Source #

On non-Windows OSes, change the TextEncoding by converting the CodePage argument to a TextEncoding using the supplied function.

defaultFallbackCodePageEncoding :: CodePage -> TextEncoding Source #

Provides a best-effort attempt to convert a CodePage to a TextEncoding on non-Windows OSes. Errors if given a CodePage that it doesn't know how to convert.