Package: python-kde3
Version: 3.16.0-2
Severity: normal

Songs that contain unicode characters produce the following error when DCOP
unmarshalls the given string to a normal python string.
With the following code I try to read out some functions of the KDE music
player Amarok:

>>> from dcopext import DCOPClient, DCOPApp
>>> client = DCOPClient()
>>> client.attach()
True
>>> amarok = DCOPApp('amarok', client)
>>> print amarok.player.track()
(True, '1')
>>> print amarok.player.title()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/dcopext.py", line 591, in __call__
    return self.dcop_call(args)
  File "/usr/lib/python2.4/site-packages/dcopext.py", line 611, in dcop_call
    return ok, self.__unmarshall(replyData, replyType)
  File "/usr/lib/python2.4/site-packages/dcopext.py", line 719, in 
__unmarshall
    return str(dcop_next(s, type_))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: 
ordinal not in range(128)

The command line gives the following:

$ dcop amarok player title
有没有人告诉你

A posting "[PyKDE] QByteArray and unicode" from 2005 on the mailing list
stated that these functions ought to return a QString, they do not do so
though.


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.16 (PREEMPT)
Locale: [EMAIL PROTECTED], LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-kde3 depends on:
ii  kdelibs4c2a             4:3.5.7.dfsg.1-7 core libraries and binaries for al
ii  libc6                   2.6.1-4          GNU C Library: Shared libraries
ii  libgcc1                 1:4.2.1-5        GCC support library
ii  libqt3-mt               3:3.3.7-7        Qt GUI Library (Threaded runtime v
ii  libstdc++6              4.2.1-5          The GNU Standard C++ Library v3
ii  libx11-6                2:1.0.3-7        X11 client-side library
ii  libxext6                1:1.0.3-2        X11 miscellaneous extension librar
ii  python                  2.4.4-6          An interactive high-level object-o
ii  python-central          0.5.15           register and build utility for Pyt
ii  python-qt3              3.17.3-2         Qt3 bindings for Python

python-kde3 recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to