From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: using empty_string as the only "" string Date: Wed, 25 Apr 2007 12:07:29 -0400 Message-ID: References: <462EE947.000007.15251@camay.yandex.ru> <462F561E.3030106@yandex.ru> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1177517270 27693 80.91.229.12 (25 Apr 2007 16:07:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Apr 2007 16:07:50 +0000 (UTC) Cc: emacs-devel@gnu.org, Kenichi Handa To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 25 18:07:43 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hgk1s-0001RT-Ef for ged-emacs-devel@m.gmane.org; Wed, 25 Apr 2007 18:07:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hgk7V-0000Fa-Ix for ged-emacs-devel@m.gmane.org; Wed, 25 Apr 2007 12:13:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hgk7R-0000F6-QN for emacs-devel@gnu.org; Wed, 25 Apr 2007 12:13:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hgk7P-0000Ea-Vf for emacs-devel@gnu.org; Wed, 25 Apr 2007 12:13:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hgk7P-0000EX-Ss for emacs-devel@gnu.org; Wed, 25 Apr 2007 12:13:23 -0400 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hgk1l-0003is-Fe for emacs-devel@gnu.org; Wed, 25 Apr 2007 12:07:33 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 676012CF029; Wed, 25 Apr 2007 12:07:32 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 7F5903FE0; Wed, 25 Apr 2007 12:07:29 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 592276C80A; Wed, 25 Apr 2007 12:07:29 -0400 (EDT) In-Reply-To: <462F561E.3030106@yandex.ru> (Dmitry Antipov's message of "Wed\, 25 Apr 2007 17\:22\:38 +0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:70113 Archived-At: > For example, if I want to make multibyte "=C0=C8", I would like to use > (string-to-multibyte (concat "\300" "\310")) =3D> "\xc0\xc8" (why ?) See the docstring of string-to-multibyte: it's basically equivalent to (decode-coding-string STRING 'binary). If you want your unibyte string interpreted as a latin-1 encoded text, then say so explicitly: (decode-coding-string (concat "\300" "\310") 'latin-1) =3D> "=C0=C8" > (concat (string-as-multibyte "\300") (string-as-multibyte "\310")) =3D> > "\xc0\xc8" (why ?) If you don't know, then please pretty please, stay away from string-as-multibyte. Stefan