[Kde-bindings] Utf-8 bug

Richard Dale Richard_Dale at tipitina.demon.co.uk
Thu Jan 19 10:29:12 UTC 2006


On Wednesday 18 January 2006 22:22, Han Holl wrote:
> On Wednesday 18 January 2006 11:24, Richard Dale wrote:
> > There are no known problems with utf-8 strings in QtRuby/Korundum, and I
> > would be surprised if it didn't work with a path containing umlauts.
>
> Hi Richard
>
> Well, it took me some time, and it's of course still possible that it's
> something completely different, but still.
> I've attached an archive of several jpegs, and a small script.
> Unpach in /tmp, goto the new directory (with the umlaut in it) and
> run ./dcop.rb.
> What happens here is that a silly picture is put on the background for 4
> seconds followed by 4 seconds of black screen and then the next silly
> picture.
>
> If I put them in a pathname without an umlaut nothing strange happens.
> Some pathnames with umlauts however work fine.
Well, I've just tried it and it works fine for me. I added a $KCODE = 'u' 
line, and commented out the call to the dcop command line tool as that isn't 
to do with korundum:

#!/usr/bin/ruby

require 'Korundum'

$KCODE = 'u'
KDE::CmdLineArgs.init(KDE::AboutData.new("a", "", '', '', 0))
KDE::Application.new
files = Dir["/tmp/allgäu/*.jpg"].sort
dk = KDE::DCOPRef.new('kdesktop', 'KBackgroundIface')
files.each_with_index do |file, i|
#  STDERR.puts "system #{file}"
#  a = "dcop  --user han kdesktop KBackgroundIface setWallpaper \"#{file}\" 4"
#  system(a)
  sleep 4
  STDERR.puts "dcop #{file}"
  dk.setWallpaper(file, 4)
  sleep 4
end

The four images all appeared in sequence at 4 second intervals as expected..

-- Richard



More information about the Kde-bindings mailing list