[pygtk] problem pasting clipboard content from arabic website (target text/html)
Giuseppe Penone
giuspen at gmail.com
Wed Jan 12 20:34:22 WST 2011
Hi,
I have a problem with gtk.clipboard() and gtk.selectiondata() in my open
source app http://giuspen.com/cherrytree
when pasting clipboard content from arabic website taking data from the
target "text/html".
when printing the selectiondata.data I can see that the content is: (print
to terminal)
��<span style="font-size: 130%;"><span style="color: red;"><span
style="color: black;">'DE4GH1 H'D1'&9 AI 'D'5/'1
'D,/J/ *E '5D'- (96 'D9DD H*E
9ED</span></span></span>
where the first two chars are 255 and 254.
when I write to the textbuffer I see:
'DE4GH1 H'D1'&9 AI 'D'5/'1 'D,/J/ *E '5D'- (96 'D9DD H*E 9ED
instead of:
المشهور والرائع فى الاصدار الجديد تم اصلاح بعض العلل وتم عمل
I checked the source code of the website (http://ubuntu-c.blogspot.com/) and
the encoding is utf-8, so I don't have idea of how to behave.
Please if anybody can give me a clue help me.
Regards,
Giuseppe.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.daa.com.au/pipermail/pygtk/attachments/20110112/8531ab02/attachment.html>
More information about the pygtk
mailing list