Ticket #7 (new defect)

Opened 5 years ago

Last modified 3 months ago

compile gtk2hs failed under locale zh_CN.utf8

Reported by: duncan Owned by:
Priority: normal Milestone:
Component: general Version: 0.15.1
Keywords: Cc:

Description

Bug previously reported in the  ghc trac


when compile gtk2hs under locale zh_CN.utf8, I got:

c2hsLocal: Error in C header file. <built-in>:1: (column 0) [FATAL]
    Lexical error!
    The character '#' does not fit here.

when I compile it using locale POSIX, it succeed.

Change History

in reply to: ↑ description   Changed 12 months ago by guest

Replying to duncan:

Bug previously reported in the  ghc trac ---- when compile gtk2hs under locale zh_CN.utf8, I got: {{{ c2hsLocal: Error in C header file. <built-in>:1: (column 0) [FATAL] Lexical error! The character '#' does not fit here. }}} when I compile it using locale POSIX, it succeed.

I can confirm c2hs fails like this with Serbian locale (sr_RS.UTF8) as well. I suppose c2hs fails to read unicode characters. To fix that I added a small wrapper script arount c2hs (just "LANG=C c2hs-bin $*") and moved the real c2hs to c2hs-bin. Maybe that could be included in c2hs as a quick fix until this is properly handled?

Best regards & keep up the good work Filip Brcic (brcha AT gna DOT org)

  Changed 3 months ago by duncan

The latest darcs version may fix this. It uses the latest language-c which when built with alex 3 may handle the unicode correctly. Worth someone trying and confirming.

Note: See TracTickets for help on using tickets.