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: Jan Djärv
Subject: Re: Bug with UTF-8 string and dbus
Date: Wed, 09 Jun 2010 10:51:08 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4

2010-06-09 09:27, Eli Zaretskii skrev:
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.

That is not right, code_convert_string_norecord takes a Lisp_Object as first argument.

        Jan D.




reply via email to

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