[yunqa.de] Re: TDIHtmlParser.StartPos returns wrong value if a copyright symbol ((c)) is included

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Sun, 29 Apr 2012 11:26:14 +0200

On 27.04.2012 16:57, Edwin Yip wrote:

> So I think maybe you can just try parsing a unicodeString that contains
> the © copyright symbol, since I'm quite sure the content I pass
> to SetSourceBufferAsStr is correctly encoded into UnicodeString (i.e.
> string in D2010).

If you are passing from a UnicodeString you should use
TDIHtmlParser.SourceBufferAsStrW() to assign that string to the parser.

Other than that, I added tests to my test suite that show that the "©"
character is correctly counted into TDIHtmlParser.StartPos and
TDIHtmlParser.EndPos.

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



Other related posts: