Ticket #3569 (new bug)
ghci can't handle utf-8 chinese char correctly when modify.
|Reported by:||guest||Owned by:||judah|
|Operating System:||Unknown/Multiple||Architecture:||x86_64 (amd64)|
|Type of failure:||None/Unknown||Difficulty:||Unknown|
|Test Case:||Blocked By:|
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:
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.