unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29364: 27.0.50; Word Wrap doesn't support CJK
@ 2017-11-20 12:34 Chunyang Xu
  2017-11-20 18:22 ` Eli Zaretskii
  2021-02-04 14:05 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 3+ messages in thread
From: Chunyang Xu @ 2017-11-20 12:34 UTC (permalink / raw)
  To: 29364

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 文字文字文字文字文字文字文字文字文字
文字文字文字文字文字文字文字文字文字文字文字文字文
字。
-----------------------------------------------------

\f
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-04 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-20 12:34 bug#29364: 27.0.50; Word Wrap doesn't support CJK Chunyang Xu
2017-11-20 18:22 ` Eli Zaretskii
2021-02-04 14:05 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).