Bug with Char.isAlpha

Bulat Ziganshin bulat.ziganshin at gmail.com
Wed May 31 10:48:24 EDT 2006


Hello Simon,

Wednesday, May 31, 2006, 5:57:26 PM, you wrote:

> This looks like some kind of input problem: I get the same results as
> you when using a Windows command shell, but not when using an xterm or
Prelude>> '§'
> '\245'

> but '\245' is not the § character, it is the õ character.  So the 
> command shell has done some translation before GHCi even saw the character.

windows? :) it's the wisest system in the world about Char encodings.
once i counted that my console program use 5 (FIVE!) different
encodings. in particular, ANSI codepage for cmdline and filenames,
OEM codepage for console I/O. you should use "SetConsoleCodepage"
system call (afaik, this way you can even set UTF-8 encoding) to
switch console to using ANSI CP or you can translate your input&output
between OEM codepage and what you actually need

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com




More information about the Glasgow-haskell-bugs mailing list