all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Strange whitespaces.
@ 2021-09-30  9:37 Hongyi Zhao
  2021-09-30  9:56 ` Gregory Heytings
  2021-09-30 10:08 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 31+ messages in thread
From: Hongyi Zhao @ 2021-09-30  9:37 UTC (permalink / raw)
  To: help-gnu-emacs

[-- 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 --]

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

end of thread, other threads:[~2021-10-01 12:20 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-30  9:37 Strange whitespaces Hongyi Zhao
2021-09-30  9:56 ` 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

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.