From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: Bug with UTF-8 string and dbus Date: Wed, 09 Jun 2010 10:51:08 +0200 Message-ID: <4C0F55FC.8060001@swipnet.se> References: <87typdnr08.fsf@keller.adm.naquadah.org> <87r5kgg1ee.fsf@keller.adm.naquadah.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1276073581 25153 80.91.229.12 (9 Jun 2010 08:53:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Jun 2010 08:53:01 +0000 (UTC) Cc: Julien Danjou , monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 09 10:52:59 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OMH1u-0004dq-KU for ged-emacs-devel@m.gmane.org; Wed, 09 Jun 2010 10:52:58 +0200 Original-Received: from localhost ([127.0.0.1]:54429 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMH1t-0007TL-Kw for ged-emacs-devel@m.gmane.org; Wed, 09 Jun 2010 04:52:57 -0400 Original-Received: from [140.186.70.92] (port=51182 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMH0I-0006TO-G7 for emacs-devel@gnu.org; Wed, 09 Jun 2010 04:51:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMH0H-0008Al-Aq for emacs-devel@gnu.org; Wed, 09 Jun 2010 04:51:18 -0400 Original-Received: from smtprelay-h11.telenor.se ([62.127.194.4]:58768) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMH0B-00088w-3D; Wed, 09 Jun 2010 04:51:11 -0400 Original-Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-h11.telenor.se (Postfix) with ESMTP id 88AC5C9C0; Wed, 9 Jun 2010 10:51:09 +0200 (CEST) X-SENDER-IP: [85.225.45.35] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnJEABrzDkxV4S0jPGdsb2JhbACHcJZUDAEBAQE1Lb0EhRgE X-IronPort-AV: E=Sophos;i="4.53,390,1272837600"; d="scan'208";a="88100514" Original-Received: from c-232de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.35]) by ipb2.telenor.se with ESMTP; 09 Jun 2010 10:51:09 +0200 Original-Received: from [172.20.199.2] (gaffa [172.20.199.2]) by coolsville.localdomain (Postfix) with ESMTP id 545167FA05A; Wed, 9 Jun 2010 10:51:08 +0200 (CEST) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:125665 Archived-At: 2010-06-09 09:27, Eli Zaretskii skrev: >> From: Julien Danjou >> Cc: Stefan Monnier, emacs-devel@gnu.org >> Date: Wed, 09 Jun 2010 08:34:17 +0200 >> >>> Using unencoded SDATA would be wrong with eight-bit characters (aka >>> raw bytes). I'd suggest to encode, to be on the safe side. >> >> Any hint on how to do that ? > > Here's one way: > > code_convert_string_norecord (SDATA (object), Qutf_8, 1); > > (Make sure you include coding.h, to have Qutf_8 declared.) > > You will see quite a few other places we use this in the sources. That is not right, code_convert_string_norecord takes a Lisp_Object as first argument. Jan D.