From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Encoding multibyte strings Date: Fri, 08 Apr 2016 15:09:55 +0800 Message-ID: <87egagh8zg.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 1460099428 16266 80.91.229.3 (8 Apr 2016 07:10:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Apr 2016 07:10:28 +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:10:24 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 1aoQYi-00011M-5M for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Apr 2016 09:10:24 +0200 Original-Received: from localhost ([::1]:54495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoQYh-0004Fi-ED for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Apr 2016 03:10:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoQYW-0004EY-Rh for help-gnu-emacs@gnu.org; Fri, 08 Apr 2016 03:10:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoQYS-0000hk-RQ for help-gnu-emacs@gnu.org; Fri, 08 Apr 2016 03:10:12 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoQYS-0000gm-LK for help-gnu-emacs@gnu.org; Fri, 08 Apr 2016 03:10:08 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aoQYQ-0000qQ-5K for help-gnu-emacs@gnu.org; Fri, 08 Apr 2016 09:10:06 +0200 Original-Received: from 114.248.29.184 ([114.248.29.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 08 Apr 2016 09:10:06 +0200 Original-Received: from eric by 114.248.29.184 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 08 Apr 2016 09:10:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 114.248.29.184 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:R5utd7T6WOwgUqshhMDFT+dl/LI= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:109734 Archived-At: Hi there. I'm trying to get from this: 陈冬梅 to this: CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E9=99=88=E5=86=AC=E6=A2=85 Assuming that the original characters were in utf-8, of course. So that 陈 is =E9=99=88, and so on. I got this string by looking at a Vcard export from the Contacts app on my Android phone. I'm trying to take an Emacs buffer and turn it into a *.vcf card file to import into the same app -- basically I'm trying to reverse-engineer the VCard encoding format so I can create a file to feed to my phone. I'm 99.9% sure that Emacs already comes with functions that will produce my escaped coded string, but after many adventures with C-h f (during which I learned quite a few unrelated tricks) I haven't found it. Can someone enlighten me as to what the simplest way to do this is? Thanks! E