unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Richard M. Stallman" <rms@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org, handa@m17n.org
Subject: Re: Unibyte characters
Date: Fri, 31 Oct 2008 15:30:57 -0400	[thread overview]
Message-ID: <E1Kvzhx-0005Lw-1V@fencepost.gnu.org> (raw)
In-Reply-To: <uljw5vxbh.fsf@gnu.org> (message from Eli Zaretskii on Fri, 31 Oct 2008 13:05:54 +0200)

	   In unibyte representation, each character occupies one byte and
	therefore the possible character codes range from 0 to 255.  Codes 0
	through 127 are ASCII characters; the codes from 128 through 255 are
	used for one non-ASCII character set [...]

    But I think this is inaccurate and even misleading.  For starters,
    unibyte buffers and strings can contain DBCS characters and UTF-8
    encoded text, where a character certainly does not ``occupy one
    byte''.

As far as Emacs is concerned, that UTF-8 sequence is multiple
characters and each of those characters is one byte.  The fact that
one might interpret that byte sequence some other way in another
context is not a part of the Emacs text representation.

So the text is correct.  But it could be useful to add something
to explain how this unibyte text relates to other interpretations
of the same byte sequence.




      parent reply	other threads:[~2008-10-31 19:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-31 11:05 Unibyte characters Eli Zaretskii
2008-10-31 11:18 ` Miles Bader
2008-10-31 11:27   ` Eli Zaretskii
2008-10-31 14:41     ` Stefan Monnier
2008-10-31 15:02       ` Juanma Barranquero
2008-10-31 18:44       ` Eli Zaretskii
2008-10-31 21:15         ` Stefan Monnier
2008-11-01 10:47           ` Stephen J. Turnbull
2008-11-02  1:59             ` Stefan Monnier
2008-10-31 19:30 ` Richard M. Stallman [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=E1Kvzhx-0005Lw-1V@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.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 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).