bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29364: 27.0.50; Word Wrap doesn't support CJK


From: Chunyang Xu
Subject: bug#29364: 27.0.50; Word Wrap doesn't support CJK
Date: Mon, 20 Nov 2017 20:34:48 +0800

Hello.

For example, here is some Chinese text:

文字文字 English 文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字。

in Emacs, turn on Word Wrap via M-x visual-line-mode and adjust window
width (e.g., 87), Emacs displays it as:

---------------------------------------------------------------------------------------
文字文字 English
文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文
字。
---------------------------------------------------------------------------------------

but it should display:

---------------------------------------------------------------------------------------
文字文字 English 文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文字文
字文字文字文字文字。
---------------------------------------------------------------------------------------

the point is, Chinese doesn't have to rely on space to break, it can
break at anywhere but with some exceptions, such as, after breaking, the
punctuation mark can not be at the beginning of the line, so the
following is also incorrect:

-----------------------------------------------------
文字文字 English 文字文字文字文字文字文字文字文字文字
文字文字文字文字文字文字文字文字文字文字文字文字文字
。
-----------------------------------------------------

for this width, it should display:

-----------------------------------------------------
文字文字 English 文字文字文字文字文字文字文字文字文字
文字文字文字文字文字文字文字文字文字文字文字文字文
字。
-----------------------------------------------------


Some applications such as Chrome (web browser) and Atom (text edit) can
wrap CJK text, and Atom added CJK wrapping support by this patch:

- https://github.com/atom/atom/pull/9162

There is an article from Wikipedia explaining how to break CJK text:

- https://en.wikipedia.org/wiki/Line_breaking_rules_in_East_Asian_languages

reply via email to

[Prev in Thread] Current Thread [Next in Thread]