GNOME Bugzilla – Bug 574789
[PATCH] getwindowlist (and others?) don't handle utf8 well
Last modified: 2009-03-10 18:40:05 UTC
I was playing with getwindowlist with utf-8 window titles. I ran into an issue when the ldtp server responded with a <FILE> element. The file specified was short a few characters, making it invalid XML. To test this, open, say, http://en.wikipedia.org/wiki/D%C3%A9j%C3%A0_vu in a browser. Then run a simple python script that runs ldtp.getwindowlist(). I believe that the server provides a <FILE> element only if the list is big (looking at the code, over 512 bytes?). So you may need lots of windows open. I have a patch, but I haven't tested it yet. I will try tonight, but wanted to put it up while I had time. The problem is that client-handler.c seems to use g_utf8_strlen when it should use strlen. I've attached a patch that is more uniform about its use of strlen.
Created attachment 130416 [details] [review] Use strlen, not g_utf8_strlen
Thanks for the patch, its part of LDTP 1.5.1 release :)
That was fast! OK, but like I said, I did not test it yet. I trust you saw that it was the right thing to do and/or tested it?
Yes, I verified the basic test and it is working fine :) Thanks