Project

General

Profile

Actions

Bug #2408

closed

CJK character width handled incorrectly in terminal emulators

Added by Ian Johnson about 12 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Normal
Category:
lib - userland libraries
Start date:
2012-03-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

On Illumos-based systems, CJK character width is not handled correctly in any terminal emulator. The terminal emulator is aware of the number of characters entered at the prompt, but when attempting to move the cursor through a CJK text string, each full-width character is counted as two characters, causing the cursor position to be reflected incorrectly and making the terminal unusable. This problem is specific to Illumos-based distributions and does not appear in Solaris 10, OpenSolaris, OpenIndiana 148, or Solaris 11.

Steps to reproduce: Type or paste some Japanese characters into a terminal emulator (gnome-terminal, xterm, and Xfce Terminal on OpenIndiana 151a2 tested). With the cursor at the end of the text string, begin pressing the left arrow key to move back through the text. It will take two keypresses to clear a single character, and the cursor will be unable to move further back once the number of keypresses matches the number of characters entered. Attempting to insert additional characters between those already entered will cause visual glitches.

Actions

Also available in: Atom PDF