all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chunyang Xu <mail@xuchunyang.me>
To: 29364@debbugs.gnu.org
Subject: bug#29364: 27.0.50; Word Wrap doesn't support CJK
Date: Mon, 20 Nov 2017 20:34:48 +0800	[thread overview]
Message-ID: <m260a5nn6f.fsf@xuchunyang.me> (raw)

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

             reply	other threads:[~2017-11-20 12:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 12:34 Chunyang Xu [this message]
2017-11-20 18:22 ` bug#29364: 27.0.50; Word Wrap doesn't support CJK Eli Zaretskii
2021-02-04 14:05 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m260a5nn6f.fsf@xuchunyang.me \
    --to=mail@xuchunyang.me \
    --cc=29364@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.