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: character encoding question Date: Wed, 20 Feb 2013 20:48:48 +0200 Message-ID: <83obfeom7j.fsf@gnu.org> References: <87mwuzze5s.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1361386138 19395 80.91.229.3 (20 Feb 2013 18:48:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2013 18:48:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 20 19:49:18 2013 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 1U8EjG-0004XV-5k for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Feb 2013 19:49:18 +0100 Original-Received: from localhost ([::1]:46989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Eiw-0006NR-1U for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Feb 2013 13:48:58 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Eil-0006N2-0Q for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 13:48:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8Eie-0001X4-GR for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 13:48:46 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:48473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Eie-0001Wl-6X for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 13:48:40 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MIJ0050084KXB00@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 20:48:38 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MIJ005WU88Y12K0@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 20:48:34 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89196 Archived-At: > From: Stefan Monnier > Date: Wed, 20 Feb 2013 09:42:49 -0500 >=20 > > Given a series of mystery bytes, can I test them against differen= t > > charsets, and see what gibberish Emacs comes up with? >=20 > (decode-coding-string "\344\270\255" 'utf-8) =3D=3D> "=E4= =B8=AD" I'd actually suggest decode-coding-region, because it doesn't require copying the "mystery bytes" into a string, something that might chang= e the bytes.