On 12/01/2011 16:03, Giuseppe Penone wrote:
> Yes it's mozilla firefox.
> I tried with
> 
> input_string.decode("utf-16", "ignore")
> 
> but what I get is
> 
> 猼慰瑳汹㵥昢湯⵴楳敺›㌱┰∻㰾灳湡猠祴敬∽潣潬㩲爠摥∻㰾灳湡猠祴敬∽潣潬㩲戠慬正∻䐾㑅䡇‱❈ㅄ☧‹䥁✠❄⼵ㄧ✠ⱄ䨯
> 䔪✠䐵ⴧ⠠㘹✠㥄䑄䠠䔪㤠䑅⼼灳湡㰾猯慰㹮⼼灳湡

Never had a need for it myself, but I've stumbled over this a couple
of times: the tuple returned by clipboard.wait_for_targets() seems to
contain a hint to the encoding of the data. At least in the case where
you copied from a mozilla application (firefox/thunderbird/maybe
others).

hth,
Dieter
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to