Copyright | (C) 2018 Ryan Scott |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Ryan Scott |
Stability | Experimental |
Portability | Portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- type CodePage = Word32
- cp65001 :: CodePage
- cp1200 :: CodePage
- cp1201 :: CodePage
- cp12000 :: CodePage
- cp12001 :: CodePage
- cp1252 :: CodePage
- data Options = Options {}
- defaultOptions :: Options
- data NonWindowsBehavior
- nonWindowsDoNothing :: NonWindowsBehavior
- nonWindowsFallbackCodePageEncoding :: (CodePage -> TextEncoding) -> NonWindowsBehavior
- defaultFallbackCodePageEncoding :: CodePage -> TextEncoding
Documentation
Options that specify how withCodePage
and friends should work.
Constructors
Options | |
Fields
|
defaultOptions :: Options Source #
The default Options
:
Options
{chatty
=False
,nonWindowsBehavior
=nonWindowsFallbackCodePageEncoding
defaultFallbackCodePageEncoding
}
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 |
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.