Ticket #3569 (new bug)
ghci can't handle utf-8 chinese char correctly when modify.
| Reported by: | guest | Owned by: | judah |
|---|---|---|---|
| Priority: | normal | Milestone: | _|_ |
| Component: | GHCi | Version: | 6.10.4 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | x86_64 (amd64) |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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.

