#3569: ghci can't handle utf-8 chinese char correctly when modify.
-----------------------------+----------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Component: GHCi
Version: 6.10.4 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: x86_64 (amd64)
-----------------------------+----------------------------------------------
ubuntu 8.04, ghc 6.10.4,gnome-terminal
if you can't display chinese char and under ubuntu, may be you can use
ubuntu's language support.
=======================================================
Using chinese string inside ghci such as:
Prelude> "大家好,这是一段中文"
when use backspace, left arrow or any other action cause the cursor
relocate.Will find out that the cursor can't relocate correctly,
i.e.
i use backspace to delete the whole string, ghci still display thing like
below:
Prelude> "大家好,这
if now use <Enter> to execute, resault just "Prelude>"
After several test i find out that, ghci "display part" treat every
chinese char as two chars/bytes(or maybe longer), but ghci "inside" treat
chinese char as one unicode char correctly.
Chinese can encode 2 to 4 bytes long, under Linux 2 to 4 bytes under
diffrent locale setting, under Windows 2 bytes long.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3569>
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