Recent

Author Topic: html encoding into query  (Read 2594 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2259
    • Lazarus and Free Pascal italian community
html encoding into query
« on: July 14, 2016, 08:10:19 am »
Hello guys, my problem is as follows:

I find myself having to file on a DBGrid the result of a query, but these data are the result of a website. So I find myself in strings apostrophes replaced with & apos; for example

In your opinion what is the most elegant solution to avoid this annoying result?

Following link with all encodings to which I refer: http://www.web2generators.com/html-based-tools/online-html-entities-encoder-and-decoder
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

d.ioannidis

  • Full Member
  • ***
  • Posts: 233
    • Nephelae
Re: html encoding into query
« Reply #1 on: July 14, 2016, 08:23:03 am »
Hi,

  AFAIK you can try HTTPDecode or ResolveHTMLEntityReference from htmldefs. Don't know if all the html symbols are translated though.

regards,
« Last Edit: July 14, 2016, 09:30:41 am by Dimitrios Chr. Ioannidis »

 

TinyPortal © 2005-2018