[yunqa.de] Re: DIHtmlParser and Entities

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx,<yunqa@xxxxxxxxxxxxx>
  • Date: Thu, 09 Jul 2009 22:09:23 +0200

At 22:52 09.07.2009, Mike Dixon wrote:

>I added a CharSet Plugin and assigned it to my parser.
>
>I Added the following line:
>
>DIHtmlCharSetPlugin.RegisterCharSet_US_ASCII;
>
>And I still have the problem.

The charset plugin automatically detects the encoding of your INPUT source 
file. It can help to get the decoding right, but is not required to solve your 
problem.

You want to set the TDIHtmlWriterPlugin OUTPUT encoding. Change it to US-ASCII 
using this line of code:

  DIHtmlWriterPlugin1.Writer.WriteMethods := Write_US_ASCII;

>The use of this parser might be very familiar to you, but for someone who is
>just learning it, it's pretty confusing. For example, there are is a
>DIHtmlParser.ClearDecodingEntities method, but no CharSet Clear method.

That's why there is customer support!

>I guess I'll have to put together a sample program. 

Not needed. Look at the DIHtmlParser_WriterPlugin demo. Choose Writer Options 
-> Output Character Set -> US-ASCII to play with.

Ralf 

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: