Re: How about converting Webpage to UTF-8 before tidying process ?

Bjoern Hoehrmann <[email protected]> Mon, 18 Jul 2005 18:22:36 +0200
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
* Benfeng CHEN wrote:
>I am thinking that tidy can support more encodings if we make use of the GNU
>iconv lib.  We use iconv to convert any encoding of webpage into UTF-8 first
>and then do the tidying process. Finally, we convert the webpage back to its
>original encoding. 

Indeed, I do not think we should add another special transcoder to Tidy.
I wrote some code to interface with iconv some time ago, but it's quite
unfinished and the main problem that time (and probably still) is that
there is no easy way to plug transcoders into the processing chain, see
the list archives for details. The code for iconv is in iconvtc.c; there
is also code for using Internet Explorers transcoding facilities in
win32tc.c. IIRC, all one needs to do to turn the latter on is defining
the relevant macros; testing out the iconv transcoder is more difficult.
-- 
Björn Höhrmann · mailto:[email protected] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click