ghci can't handle utf-8 chinese char correctly when modify.
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.
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.4 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |