[pygtk] problem pasting clipboard content from arabic website (target text/html)
Tomeu Vizoso
tomeu at sugarlabs.org
Wed Jan 12 21:17:10 WST 2011
On Wed, Jan 12, 2011 at 13:34, Giuseppe Penone <giuspen at gmail.com> wrote:
> 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".
What browser is it? I think Mozilla used to put utf-16 in "text/html".
Regards,
Tomeu
>
> 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;">' D E 4 G H 1 H ' D 1 ' & 9 A I ' D ' 5 / ' 1 ' D , /
> J / * E ' 5 D ' - ( 9 6 ' D 9 D D H * E 9 E D </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.
>
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
More information about the pygtk
mailing list