Utf8toAnsi(source); solve the problem, thanks!

2017-08-04 15:56 GMT-03:00 Angus Robertson - Magenta Systems Ltd <
an...@magsys.co.uk>:

> > Do I have to decode the html after it gets it? Can not I set the
> > charset in the httpcli component?
>
> The component returns the a stream with the raw content, maybe a file,
> image or HTML text.
>
> You have to search the HTML text for the charset attribute and then use
> various functions to convert the raw stream into a string with the
> correct character set.
>
> Of course most of us are lazy and assume the content is ANSI text and
> so just copy it into a string, and that works 99.99% of the time.
>
> I wrote a new proxy component recently, that needs to edit HTML content,
> and being lazy I cheated and assume the content is ANSI.  The notes in
> the unit do say that UTF8 conversion is pending, which is exactly what
> you need, and I guess that should be added an option to the HTTP client
> so it returns HTML content as a string with the correct character set.
>
> Angus
>
>
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to