No Unicode-version HTML Tidy for Delphi?
I downloaded the latest version (TidyPas_Delphi2010.zip) from the official homepage (http://sourceforge.net/projects/curlpas/files/).
But to my surprise, there are full of AnsiString in the unit instead of string(UnicodeString).
Does anybody use this? 开发者_StackOverflowNo Unicode version?
Thanks
TidyPas is just a wrapper around the HTML Tidy library API. It does not provide a UnicodeString facade over that API, it exposes the API as-is.
As far as I can tell from the docs, HTML Tidy itself only supports a limited range of character sets, but these do include the UTF8 encoding of Unicode, which with a bit of care I think should be OK with ANSIString and ANSIChar types used by the API.
Any further inquiries about Unicode support in HTML Tidy other than with UTF8 would probably be best directed at the HTML Tidy community itself. It doesn't seem to have been updated for a while though (since 2008).
Yes, it does work in Delphi 2010 - I updated the code ;-) And yes, you need to convert the input from Unicode to UTF8 to handle it. You can find the (working) code I use at http://www.csinnovations.com/framework_delphi.htm
精彩评论