Re: Parse a UTF-8 encoded string

"Arnaud Desitter" <[email protected]> Mon, 30 Jul 2007 10:38:05 +0100
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
On 30/07/07, Mike Hanna <[email protected]> wrote:
> Hi, I added tidy to my XCode(Mac OS X) project. It compiles without error.
> I'd like to pass tidy a UTF-8 encoded C-string of HTML and get back the
> tidied HTML in the same encoding. How do I do this?
>
> I see the interface:
>
> /** Parse markup in given string */
> TIDY_EXPORT int TIDY_CALL         tidyParseString( TidyDoc tdoc, ctmbstr
> content );
>
> but I'm not sure what a TidyDoc nor a ctmbstr is. I assume TidyDoc is my
> output. Do I have to allocate storage for a TidyDoc? How do I know ahead of
> time how much to allocate? is content where I pass in a char* ?
>
> Bit confused here ...
>
> Michael
>

Please, look at the example within "include/tidy.h".
This kind of questions is better asked on
https://sourceforge.net/tracker/?group_id=27659&atid=390964
Regards,

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/