#3309: getArgs should return Unicode on Unix
---------------------------------+------------------------------------------
Reporter: YitzGale | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.2.1
Component: libraries/base | Version: 6.11
Keywords: unicode | Testcase:
Blockedby: | Difficulty: Unknown
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by batterseapower):
I have a patch to add locale-awareness to the CString functions in
Foreign.C.String, which fixes this problem, but I have a problem: The
documentation for charIsRepresentable claims that unrepresentable
characters are replaced with ?, but the current code does not in fact do
this - you get a nonsense character instead. Furthermore, it is difficult
to fix the code to match the documentation in my new locale-aware
implementation because iconv only provides transliteration and ignore
modes for unrepresentable characters.
So there are two problems:
1. The documented behaviour on unrepresentable characters does not match
the implemented behaviour
2. The documented behaviour is difficult to implement
So we should probably change the documented behaviour. The easiest thing
to do is drop unrepresentable characters, which can be implemented easily
either using our code page decoder (on Win32) or iconv (on *nix).
Does this sound like a reasonable approach?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3309#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs