unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Leo Liu <sdl.web@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: How to use string-to/as-unibyte correctly?
Date: Wed, 22 Jun 2016 09:49:55 +0200	[thread overview]
Message-ID: <mvm1t3ppsrg.fsf@hawking.suse.de> (raw)
In-Reply-To: <m24m8lrj7k.fsf@gmail.com> (Leo Liu's message of "Wed, 22 Jun 2016 11:33:19 +0800")

Leo Liu <sdl.web@gmail.com> writes:

> I had two cases of string-to-unibyte to mean I am expecting unibyte
> string and will complain if given something else.

There should be very few places that need a unibyte string.  Basically
only where we are communicating with outside of Emacs, immediately
before decoding or after encoding the string.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



  reply	other threads:[~2016-06-22  7:49 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 [this message]
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
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=mvm1t3ppsrg.fsf@hawking.suse.de \
    --to=schwab@suse.de \
    --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).