- Allow building with
base-4.15
(GHC 9.0) or later on Windows.
-
Rename the
withCodePageVerbosity
function towithCodePageOptions
to reflect the fact that its first argument is now anOptions
data type instead of just aBool
to represent its verbosity. (The ability to configure verbosity is now controlled through thechatty
field ofOptions
.) -
On non-Windows OSes,
withCodePage
(and related functions) now make a best effort guess in converting the suppliedCodePage
to aTextEncoding
and adjusing the currentTextEncoding
to that one. (For instance,withCP65001
will adjust the currentTextEncoding
to beutf8
on non-Windows OSes.) If the suppliedCodePage
does not map to a knownTextEncoding
, these functions will error at runtime on non-Windows OSes.This is a departure from the previous major version of
code-page
, where these functions did not do anything at all on non-Windows OSes. If you would like to recover this old behavior, usewithCodePageOptions defaultOptions{nonWindowsBehavior = NonWindowsDoNothing}
. -
withCodePage
and friends now change the locale encoding (on GHC 7.4 or later) in addition to the encodings forstdin
,stdout
, andstderr
. -
Add
withCP1252
andcp1252
for the Latin1 code page. -
Add a
System.IO.CodePage.Internal
module that contains certain internal details (such as the constructors ofOptions
andNonWindowsBehavior
).
- Fix the build on GHC 7.8 and older
- Squash minor bug in fixCodePage (the same bug reported in commercialhaskell/stack#3002)
- Fix the build on non-Intel architectures (thanks, erikd!)
- Initial commit.