[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Unicode



Hi,

Am Mittwoch, den 26.05.2010, 13:52 -0300 schrieb Marco Túlio Gontijo e
> What is the “simplest” package the problem occured with so far?
> 
> The other times it happened was with warnings being shown with code with utf-8
> chars.  This is the first time it occurs without an utf-8 char output.  So this
> is the first time I see it happens.  It's actually easy to reproduce:
> 
> With the gtk-0.11.0 source:
> 
> ghc --make Setup
> ./Setup configure
> ./Setup build
> 
> It outputs: Setup: ./Graphics/UI/Gtk/General/IconTheme.chs: invalid argument

this sounds as if ./Graphics/UI/Gtk/General/IconTheme.chs has utf8
encoding. Some tool (maybe gtk2hs-buildtools) read the file using new
new locale-aware IO code. Therefore it works with your locale.

With the C locale, the ghc IO code guesses another encoding from the
locale (ascii?) and reads the file using that.

The solution would be that the code reading the file calls hSetEncoding
to fix the encoding to utf8, independent from the locale.
http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/GHC-IO-Handle.html#v%3AhSetEncoding

Greetings,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: