|
From: Sean E. <sea...@gm...> - 2007-01-28 05:53:13
|
On 1/27/07, James Lockie <bjl...@lo...> wrote:
> Does the python interface to:
> self.gaim.GaimSavedstatusSetMessage(self.status, message)
> require a UTF8 string?
The Gaim API requires that all strings be UTF-8. I'm not sure how
Python deals with strings, but if it has the concept of different
encodings (as you seem to imply), it would make sense that you would
need to use UTF-8 strings in Python.
> I am trying to modify the AmarokGaim plugin so that it works with
> non-utf8 strings like "Bj=F6rk".
> It calls "message =3D message.decode('utf8')" where message might be the
> string "Bj=F6rk".
> This works for utf8 strings but fails on strings that contain special
> characters.
"strings that contain special characters"? You mean "strings that
aren't in UTF-8." I'm sure Amarok provides a mechanism for knowing the
encoding of the strings it gives you, or there's a KDE convention "all
strings use X encoding"
-s.
|