[Kde-bindings] Utf-8 bug

Richard Dale Richard_Dale at tipitina.demon.co.uk
Tue Jan 17 21:29:54 UTC 2006


On Tuesday 17 January 2006 20:18, Han Holl wrote:
> Hi there
>
> Consider the following:
> #!/usr/bin/ruby
>
> require 'Korundum'
>
> KDE::CmdLineArgs.init(KDE::AboutData.new("a", "", '', '', 0))
> KDE::Application.new
>
> dk = KDE::DCOPRef.new('kdesktop', 'KBackgroundIface')
> p = '/var/pictures/2005 Allgäu/img_0942.jpg'
> if ARGV[0]
>   dk.setWallpaper(p, 4)
> else
>   a = "dcop  --user han kdesktop KBackgroundIface setWallpaper \"#{p}\" 4"
>   system(a)
> end
> #### end-of-code
>
> The second variant works as expected, the first doesn't. Please note that
> the string p has an UTF-8 encoded a-umlaut in it (but my kmail composer
> just displays two tiny squares).
> With just ASCII characters the two metods both work.
Have you tried running it with a -Ku option for utf-8 strings - does it work 
then?

-- Richard



More information about the Kde-bindings mailing list