all messages for Emacs-related lists mirrored at yhetil.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.