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: Stefan Monnier
Subject: Re: Bug with UTF-8 string and dbus
Date: Wed, 09 Jun 2010 10:08:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> According to D-Bus spec[1]:

>           STRING
>           UTF-8 string (must be valid UTF-8). Must be nul terminated and
>           contain no other nul bytes.

>> Using unencoded SDATA would be wrong with eight-bit characters (aka
>> raw bytes).  I'd suggest to encode, to be on the safe side.

Since the spec says "must be valid UTF-8", I think that SDATA(object)
might even be better than encoding to utf-8 since encoding to utf-8 will
turn eight-bit-byte chars into raw bytes which will likely not make
a valid utf-8 output.


        Stefan



reply via email to

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