unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Leo Liu <sdl.web@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: How to use string-to/as-unibyte correctly?
Date: Tue, 21 Jun 2016 05:36:28 +0300	[thread overview]
Message-ID: <83oa6v6zf7.fsf@gnu.org> (raw)
In-Reply-To: <m1a8ifctu8.fsf@zeuss-MBP.lan> (message from Leo Liu on Tue, 21 Jun 2016 07:40:31 +0800)

> From: Leo Liu <sdl.web@gmail.com>
> Date: Tue, 21 Jun 2016 07:40:31 +0800
> 
> As part of discussion on bug http://debbugs.gnu.org/23750, I am
> wondering what is the deal with string-to/as-unibyte? How to use them
> correctly or are they in their way out (obsolete)?

Don't use them, period.  They are remnants from the era long gone,
before Emacs used Unicode and UTF-8 as the basis for its internal
representation of characters.  Nowadays the only place where such
conversions are sometimes needed are on the C level, deep within Emacs
internals.  Applications should never use them.

I'm okay with declaring them obsolete, if it helps.



  parent reply	other threads:[~2016-06-21  2:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20 23:40 How to use string-to/as-unibyte correctly? Leo Liu
2016-06-21  0:56 ` Stefan Monnier
2016-06-22  3:33   ` Leo Liu
2016-06-22  7:49     ` Andreas Schwab
2016-06-26  2:02       ` Leo Liu
2016-06-22 14:59     ` Eli Zaretskii
2016-06-25  1:57       ` Leo Liu
2016-06-25  8:01         ` Eli Zaretskii
2016-06-21  2:36 ` Eli Zaretskii [this message]
2016-06-26  2:01 ` Leo Liu

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=83oa6v6zf7.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=sdl.web@gmail.com \
    /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).