emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug with UTF-8 string and dbus


From: Eli Zaretskii
Subject: Re: Bug with UTF-8 string and dbus
Date: Wed, 09 Jun 2010 03:27:06 -0400

> From: Julien Danjou <address@hidden>
> Cc: Stefan Monnier <address@hidden>,  address@hidden
> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]