all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Julien Danjou <julien@danjou.info>
To: emacs-devel@gnu.org
Cc: Julien Danjou <julien@danjou.info>
Subject: [PATCH] Fix D-Bus string encoding.
Date: Wed,  9 Jun 2010 11:16:21 +0200	[thread overview]
Message-ID: <1276074981-8930-1-git-send-email-julien@danjou.info> (raw)
In-Reply-To: <87typdnr08.fsf@keller.adm.naquadah.org>

Signed-off-by: Julien Danjou <julien@danjou.info>
---

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  <julien@danjou.info>
+
+	* dbusbind.c (xd_append_arg): Fix string encoding: it has to be
+	valid UTF-8.
+
 2010-06-08  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* 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




  parent reply	other threads:[~2010-06-09  9:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08 21:39 Bug with UTF-8 string and dbus Julien Danjou
2010-06-09  0:43 ` Stefan Monnier
2010-06-09  1:17   ` Eli Zaretskii
2010-06-09  6:34     ` Julien Danjou
2010-06-09  7:27       ` Eli Zaretskii
2010-06-09  8:51         ` Jan Djärv
2010-06-09  9:30           ` Eli Zaretskii
2010-06-09  7:28       ` Jan Djärv
2010-06-09 14:08       ` Stefan Monnier
2010-06-09 14:24         ` Julien Danjou
2010-06-09 15:01         ` Andreas Schwab
2010-06-09 15:39           ` Michael Albinus
2010-06-09 18:11           ` Stefan Monnier
2010-06-09 19:45             ` Davis Herring
2010-06-09 20:30             ` Andreas Schwab
2010-06-09 20:42               ` David Kastrup
2010-06-09 22:19         ` Andreas Schwab
     [not found]           ` <19472.35590.940217.577634@uwakimon.sk.tsukuba.ac.jp>
2010-06-10  8:05             ` Andreas Schwab
2010-06-09  9:16 ` Julien Danjou [this message]
2010-06-10  0:20   ` [PATCH] Fix D-Bus string encoding Stefan Monnier
2010-06-10  1:56     ` Eli Zaretskii
2010-06-10  2:48       ` Miles Bader
2010-06-10  3:49         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1276074981-8930-1-git-send-email-julien@danjou.info \
    --to=julien@danjou.info \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.