From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.devel Subject: [PATCH] Fix D-Bus string encoding. Date: Wed, 9 Jun 2010 11:16:21 +0200 Message-ID: <1276074981-8930-1-git-send-email-julien@danjou.info> References: <87typdnr08.fsf@keller.adm.naquadah.org> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1276075032 30464 80.91.229.12 (9 Jun 2010 09:17:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Jun 2010 09:17:12 +0000 (UTC) Cc: Julien Danjou To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 09 11:17:10 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 1OMHPH-00033R-NB for ged-emacs-devel@m.gmane.org; Wed, 09 Jun 2010 11:17:08 +0200 Original-Received: from localhost ([127.0.0.1]:53738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMHPG-0003ik-IL for ged-emacs-devel@m.gmane.org; Wed, 09 Jun 2010 05:17:06 -0400 Original-Received: from [140.186.70.92] (port=45422 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMHOh-0003W2-O7 for emacs-devel@gnu.org; Wed, 09 Jun 2010 05:16:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMHOf-0003qm-Ii for emacs-devel@gnu.org; Wed, 09 Jun 2010 05:16:30 -0400 Original-Received: from coquelicot-s.easter-eggs.com ([213.215.37.94]:39108) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMHOf-0003qQ-E7 for emacs-devel@gnu.org; Wed, 09 Jun 2010 05:16:29 -0400 Original-Received: from cigue.easter-eggs.fr (cigue.easter-eggs.fr [10.0.0.33]) by rose.easter-eggs.fr (Postfix) with ESMTPS id 956051402D; Wed, 9 Jun 2010 11:16:24 +0200 (CEST) Original-Received: from jdanjou by cigue.easter-eggs.fr with local (Exim 4.72) (envelope-from ) id 1OMHOc-0002KY-Qq; Wed, 09 Jun 2010 11:16:26 +0200 X-Mailer: git-send-email 1.7.1 In-Reply-To: <87typdnr08.fsf@keller.adm.naquadah.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:125667 Archived-At: Signed-off-by: Julien Danjou --- This fix the problem described in <87typdnr08.fsf@keller.adm.naquadah.org> src/ChangeLog | 5 +++++ src/dbusbind.c | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 16e1b87..daa9ea7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-06-09 Julien Danjou + + * dbusbind.c (xd_append_arg): Fix string encoding: it has to be + valid UTF-8. + 2010-06-08 Dan Nicolaescu * lread.c (X_OK): Remove, unused. diff --git a/src/dbusbind.c b/src/dbusbind.c index a72a955..4a17fb4 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -489,7 +489,7 @@ xd_append_arg (dtype, object, iter) case DBUS_TYPE_OBJECT_PATH: case DBUS_TYPE_SIGNATURE: { - char *val = SDATA (Fstring_make_unibyte (object)); + char *val = SDATA (ENCODE_UTF_8 (object)); XD_DEBUG_MESSAGE ("%c %s", dtype, val); if (!dbus_message_iter_append_basic (iter, dtype, &val)) XD_SIGNAL2 (build_string ("Unable to append argument"), object); -- 1.7.1