unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Zhu Zihao" <all_but_last@163.com>
Cc: emacs-devel@gnu.org
Subject: Re: Is copy_string_contents in emacs-module.h give us a proper UTF-8 string?
Date: Thu, 08 Oct 2020 10:38:13 +0300	[thread overview]
Message-ID: <83blhd88wq.fsf@gnu.org> (raw)
In-Reply-To: <79bc0bc2.1982.17506d48b4d.Coremail.all_but_last@163.com>

> Date: Thu, 8 Oct 2020 14:09:53 +0800 (CST)
> From: "Zhu Zihao" <all_but_last@163.com>
> 
>    To support this multitude of characters and scripts, Emacs closely
> follows the “Unicode Standard”.  The Unicode Standard assigns a unique
> number, called a “codepoint”, to each and every character.  The range of
> codepoints defined by Unicode, or the Unicode “codespace”, is
> ‘0..#x10FFFF’ (in hexadecimal notation), inclusive.  Emacs extends this
> range with codepoints in the range ‘#x110000..#x3FFFFF’, which it uses
> for representing characters that are not unified with Unicode and “raw
> 8-bit bytes” that cannot be interpreted as characters.  Thus, a
> character codepoint in Emacs is a 22-bit integer.
> 
> Will "copy_string_contents" always give us a proper UTF-8 string. Or it will give us a mix of bytevector and
> UTF8?

If the original string includes raw bytes, copy_string_contents will
signal an error.



  reply	other threads:[~2020-10-08  7:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08  6:09 Is copy_string_contents in emacs-module.h give us a proper UTF-8 string? Zhu Zihao
2020-10-08  7:38 ` Eli Zaretskii [this message]
2020-10-08  7:40 ` Robert Pluim

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=83blhd88wq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=all_but_last@163.com \
    --cc=emacs-devel@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 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).