[pygtk] problem pasting clipboard content from arabic website (target text/html)
Giuseppe Penone
giuspen at gmail.com
Thu Jan 13 02:08:46 WST 2011
Great help, thank you very much.
Regards,
Giuseppe.
On Wed, Jan 12, 2011 at 8:00 PM, Dieter Verfaillie <
dieterv at optionexplicit.be> wrote:
> On 12/01/2011 16:24, Giuseppe Penone wrote:
> > Yes I also was thinking that, being the first two chars not valid (\0xff
> and
> > \0xfe)
>
> That would be the BOM (Byte Order Mark)...
>
> , the problem is that I cannot find a reference to understand what is
> > the encoding according to those chars.
>
> ... for UTF-16LE (or UTF-16 for short). You'll also want to be careful
> about NULL characters.
>
> The attached fragment accepts "html" pastes from firefox/thinderbird
> and correctly shows the Arabic fragment from your original message
> when copied from thunderbird.
>
> Hey, it even honors RTL, which is kinda neat :)
>
> mvg,
> Dieter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.daa.com.au/pipermail/pygtk/attachments/20110112/281bca9f/attachment.html>
More information about the pygtk
mailing list