From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Encoding multibyte strings Date: Fri, 08 Apr 2016 10:48:02 +0300 Message-ID: <83twjck0ct.fsf@gnu.org> References: <87egagh8zg.fsf@ericabrahamsen.net> <83wpo8k195.fsf@gnu.org> <8737qwh7kg.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1460101731 19713 80.91.229.3 (8 Apr 2016 07:48:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Apr 2016 07:48:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 08 09:48:45 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aoR9k-0005mt-Vr for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Apr 2016 09:48:41 +0200 Original-Received: from localhost ([::1]:54654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoR9k-0003Mq-0k for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Apr 2016 03:48:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoR9R-0003Ie-BE for help-gnu-emacs@gnu.org; Fri, 08 Apr 2016 03:48:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoR9O-0002f5-6B for help-gnu-emacs@gnu.org; Fri, 08 Apr 2016 03:48:21 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoR9O-0002f1-32 for help-gnu-emacs@gnu.org; Fri, 08 Apr 2016 03:48:18 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3874 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aoR9M-0007jq-QR for help-gnu-emacs@gnu.org; Fri, 08 Apr 2016 03:48:17 -0400 In-reply-to: <8737qwh7kg.fsf@ericabrahamsen.net> (message from Eric Abrahamsen on Fri, 08 Apr 2016 15:40:31 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:109738 Archived-At: > From: Eric Abrahamsen > 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"