[commit: base] master: Support for Windows DBCS and new SBCS with MultiByteToWideChar (f982978)

Max Bolingbroke batterseapower at hotmail.com
Wed May 8 21:49:51 CEST 2013


Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

https://github.com/ghc/packages-base/commit/f982978eaa5d74c5dffe71c14a1555587b6a5e48

>---------------------------------------------------------------

commit f982978eaa5d74c5dffe71c14a1555587b6a5e48
Author: Max Bolingbroke <batterseapower at hotmail.com>
Date:   Thu Apr 18 21:29:08 2013 +0100

    Support for Windows DBCS and new SBCS with MultiByteToWideChar
    
    Because MultiByteToWideChar/WideCharToMultiByte have a rather unhelpful
    interface, we have to use a lot of binary searching tricks to get them
    to match the iconv-like interface that GHC requires.
    
    Even though the resulting encodings are slow, it does at least mean that we
    now support all of Window's code pages. What's more, since these codecs are
    basically only used for console output there probably won't be a huge volume
    of text to deal with in the common case, so speed is less of a worry.
    
    Note that we will still use GHC's faster table-based custom codec for supported
    SBCSs.

 GHC/IO/Encoding/CodePage.hs     |    4 +-
 GHC/IO/Encoding/CodePage/API.hs |  427 +++++++++++++++++++++++++++++++++++++++
 GHC/IO/Encoding/Types.hs        |   12 +-
 GHC/IO/Handle/Internals.hs      |   17 +-
 GHC/Windows.hs                  |   20 +-
 base.cabal                      |    3 +-
 6 files changed, 458 insertions(+), 25 deletions(-)


Diff suppressed because of size. To see it, use:

    git show f982978eaa5d74c5dffe71c14a1555587b6a5e48



More information about the ghc-commits mailing list