On Windows, use the console code page for text file encoding/decoding.
authorJudah Jacobson <judah.jacobson@gmail.com>
Sun, 13 Sep 2009 02:21:26 +0000 (02:21 +0000)
committerJudah Jacobson <judah.jacobson@gmail.com>
Sun, 13 Sep 2009 02:21:26 +0000 (02:21 +0000)
commitde76ff60453a0a57a9a942e4f0130ec2eca921f0
treeacce7f4cf66b6ff2622a101a2270d506bbfd2bcb
parentd6403a02588eb91ad9342ff632a2d31966ae4287
On Windows, use the console code page for text file encoding/decoding.

We keep all of the code page tables in the module
GHC.IO.Encoding.CodePage.Table.  That file was generated automatically
by running codepages/MakeTable.hs; more details are in the comments at the
start of that script.

Storing the lookup tables adds about 40KB to each statically linked executable;
this only increases the size of a "hello world" program by about 7%.

Currently we do not support double-byte encodings (Chinese/Japanese/Korean), since
including those codepages would increase the table size to 400KB.  It will be
straightforward to implement them once the work on library DLLs is finished.
GHC/IO/Encoding.hs
GHC/IO/Encoding/CodePage.hs [new file with mode: 0644]
GHC/IO/Encoding/CodePage/Table.hs [new file with mode: 0644]
System/IO.hs
base.cabal
codepages/MakeTable.hs [new file with mode: 0644]