On Wed, Jan 12, 2011 at 16:03, Giuseppe Penone <gius...@gmail.com> wrote:
> Yes it's mozilla firefox.
> I tried with
>
> input_string.decode("utf-16", "ignore")

Reading this code helped me with fixing interoperability between Sugar
and Mozilla, but was a long time ago and don't remember the details:

http://mxr.mozilla.org/mozilla-central/source/widget/src/gtk2/nsClipboard.cpp#707

HTH,

Tomeu

> but what I get is
>
> 猼慰瑳汹㵥昢湯⵴楳敺›㌱┰∻㰾灳湡猠祴敬∽潣潬㩲爠摥∻㰾灳湡猠祴敬∽潣潬㩲戠慬正∻䐾㑅䡇‱❈ㅄ☧‹䥁✠❄⼵ㄧ✠ⱄ䨯 
> 䔪✠䐵ⴧ⠠㘹✠㥄䑄䠠䔪㤠䑅⼼灳湡㰾猯慰㹮⼼灳湡
>
> Regards,
> Giuseppe.
>
>
> On Wed, Jan 12, 2011 at 3:17 PM, Tomeu Vizoso <to...@sugarlabs.org> wrote:
>>
>> On Wed, Jan 12, 2011 at 13:34, Giuseppe Penone <gius...@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@daa.com.au
>> > http://www.daa.com.au/mailman/listinfo/pygtk
>> > Read the PyGTK FAQ: http://faq.pygtk.org/
>> >
>
>
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to