all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Strange whitespaces.
Date: Thu, 30 Sep 2021 17:37:20 +0800	[thread overview]
Message-ID: <CAGP6POLr3A_Gbfp6wG+MMP6CNJ6fr15K4q6Y9CaqWdAvncNNdQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2667 bytes --]

I've seen two strange whitespaces which shown as underscores in
scratch buffer, and `M-x describer-char RET' give the following
results:

The first one:

===============
           position: 146 of 148 (98%), column: 0
            character:   (displayed as  ) (codepoint 160, #o240, #xa0)
              charset: unicode (Unicode (ISO10646))
code point in charset: 0xA0
               script: latin
               syntax:       which means: whitespace
             category: .:Base, b:Arabic, j:Japanese, l:Latin
             to input: type "C-x 8 RET a0" or "C-x 8 RET NO-BREAK SPACE"
          buffer code: #xC2 #xA0
            file code: #xC2 #xA0 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    ftcrhb:-PfEd-DejaVuSansMono Nerd Font
Mono-normal-normal-normal-*-20-*-*-*-m-0-iso10646-1 (#x62)
       hardcoded face: nobreak-space

Character code properties: customize what to show
  name: NO-BREAK SPACE
  old-name: NON-BREAKING SPACE
  general-category: Zs (Separator, Space)
  decomposition: (noBreak 32) (noBreak ' ')

There are text properties here:
  fontified            t
  wrap-prefix          " "
  ws-butler-chg        delete


The second:

 ===============
           position: 148 of 148 (99%), column: 2
            character:   (displayed as  ) (codepoint 8194, #o20002, #x2002)
              charset: unicode (Unicode (ISO10646))
code point in charset: 0x2002
               script: symbol
               syntax:       which means: whitespace
             category: .:Base
             to input: type "C-x 8 RET 2002" or "C-x 8 RET EN SPACE"
          buffer code: #xE2 #x80 #x82
            file code: #xE2 #x80 #x82 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    ftcrhb:-PfEd-DejaVuSansMono Nerd Font
Mono-normal-normal-normal-*-20-*-*-*-m-0-iso10646-1 (#x712)
       hardcoded face: nobreak-space

Character code properties: customize what to show
  name: EN SPACE
  general-category: Zs (Separator, Space)
  decomposition: (compat 32) (compat ' ')

There are text properties here:
  fontified            t
  rear-nonsticky       t
  wrap-prefix          " "
  ws-butler-chg        chg


If I copy and paste these two characters into other editors, say,
Gmail web client or gedit, I will see nothing of them. OTOH, if I copy
them back to Emacs again, for the Gmail web client case, the first
character will be lost.

I am puzzled by this phenomenon: Why do people design so many
whitespace representations  and how to safely manipulate them between
different editors

Regards, HZ

[-- Attachment #2: whitespaces.png --]
[-- Type: image/png, Size: 158467 bytes --]

             reply	other threads:[~2021-09-30  9:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30  9:37 Hongyi Zhao [this message]
2021-09-30  9:56 ` Strange whitespaces Gregory Heytings
2021-09-30 10:11   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 10:19     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 13:44       ` Hongyi Zhao
2021-09-30 15:39         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 10:08 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 13:53   ` Hongyi Zhao
2021-09-30 15:20     ` [External] : " Drew Adams
2021-09-30 15:46       ` Hongyi Zhao
2021-09-30 16:26         ` Drew Adams
2021-09-30 16:06       ` tomas
2021-09-30 16:12       ` Eli Zaretskii
2021-09-30 16:32         ` Drew Adams
2021-09-30 16:45           ` Eli Zaretskii
2021-09-30 17:03             ` Drew Adams
2021-10-01  1:51         ` Hongyi Zhao
2021-10-01  2:03           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-01  6:34           ` Eli Zaretskii
2021-10-01  7:26             ` Hongyi Zhao
2021-10-01  7:56               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-01 10:10                 ` Hongyi Zhao
2021-10-01 10:24                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30 15:41     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-01  1:45       ` Hongyi Zhao
2021-10-01  1:56         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-01 10:15       ` Eric S Fraga
2021-10-01 10:28         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-01 10:57           ` Eric S Fraga
2021-10-01 11:18             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-01 12:20             ` Yuri Khan

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=CAGP6POLr3A_Gbfp6wG+MMP6CNJ6fr15K4q6Y9CaqWdAvncNNdQ@mail.gmail.com \
    --to=hongyi.zhao@gmail.com \
    --cc=help-gnu-emacs@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.