unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Unibyte characters
Date: Fri, 31 Oct 2008 13:05:54 +0200	[thread overview]
Message-ID: <uljw5vxbh.fsf@gnu.org> (raw)

The ELisp manual has (in node "Text Representation") this explanation
of what is a "unibyte character":

       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''.

More generally, I think it is better to say that unibyte buffers and
strings hold raw 8-bit bytes, and that for 8859-x and single-byte
Windows codepages, each such byte represents a single character.

Am I missing something?




             reply	other threads:[~2008-10-31 11:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-31 11:05 Eli Zaretskii [this message]
2008-10-31 11:18 ` Unibyte characters 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

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=uljw5vxbh.fsf@gnu.org \
    --to=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).