logo       

Re[2]: Bug with Char.isAlpha: msg#00129

lang.haskell.glasgow.bugs

Subject: Re[2]: Bug with Char.isAlpha

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@xxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise