HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Modulecode-page-0.2.1Haskell2010

System.IO.CodePage

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

Contents
  1. Adjusting CodePages
  2. Notable CodePages
  3. Options
  4. Record fields of Options
  5. NonWindowsBehavior
  6. Constructing NonWindowsBehavior
Synopsis
  • Packagecode-page-0.2.1
  • Exports23
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceCodePage.hs

Adjusting CodePages

valuewithCodePage :: CodePage -> IO a -> IO a

Sets the code page for an action as necessary.

On operating systems besides Windows, this will make an effort to change the current TextEncoding to something that is equivalent to the supplied CodePage. Currently, the only supported CodePages on non-Windows OSes are cp65001, cp1200, cp1201, cp12000, and cp12001. Supplying any other CodePage will result in a runtime error on non-Windows OSes. (If you would like to configure this behavior, use withCodePageOptions instead.)

Notable CodePages

datadata Options

Options that specify how withCodePage and friends should work.

Record fields of Options

NonWindowsBehavior

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

Constructing NonWindowsBehavior