all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Encoding multibyte strings
Date: Fri, 08 Apr 2016 10:48:02 +0300	[thread overview]
Message-ID: <83twjck0ct.fsf@gnu.org> (raw)
In-Reply-To: <8737qwh7kg.fsf@ericabrahamsen.net> (message from Eric Abrahamsen on Fri, 08 Apr 2016 15:40:31 +0800)

> From: Eric Abrahamsen <eric@ericabrahamsen.net>
> Date: Fri, 08 Apr 2016 15:40:31 +0800
> 
> > Not sure what exactly are you looking for.  A wild guess is that
> 
> What I'm looking for, I guess, is this:
> 
> (mystery-function "陈”) --> "=E9=99=88"
> 
> >   (encode-coding-string 'utf-8 STRING)
> 
> (encode-coding-string "陈" 'utf-8) --> "\351\231\210"
> 
> So maybe what I need is a way to get from "\351\231\210" to "=E9=99=88"?
> 
> > and
> >
> >   (quoted-printable-encode-string STRING)
> 
> (quoted-printable-encode-string "陈")
> 
> Evalling the above gives me the message "Multibyte character in QP
> encoding region"

I said "and", didn't I?

  (quoted-printable-encode-string (encode-coding-string "陈" 'utf-8))
   --> "=E9=99=88"



  reply	other threads:[~2016-04-08  7:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-08  7:09 Encoding multibyte strings Eric Abrahamsen
2016-04-08  7:28 ` Eli Zaretskii
2016-04-08  7:40   ` Eric Abrahamsen
2016-04-08  7:48     ` Eli Zaretskii [this message]
2016-04-08  8:02       ` Eric Abrahamsen
     [not found] ` <mailman.31.1460100539.7477.help-gnu-emacs@gnu.org>
2016-04-08 18:53   ` B. T. Raven

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

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

  git send-email \
    --in-reply-to=83twjck0ct.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.