Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there some functionality in/for Delphi that converts a string with html named and numbered entities to unicode text?

I read data from a mysql database that has is filled by php scripts. All special characters are converted to named or numbered html entities (for example & a m p ; & # 2 8 6 ;). I know of no way to convert these characters back to the original ones in Delphi as unicode strings. Did anyone ever find or even create such a function? This would be very helpful to me. Thanks! Marc

like image 209
user133370 Avatar asked Jul 08 '09 10:07

user133370


1 Answers

In Delphi 2007 there is a unit called HTTPApp.pas (in [Delphi Folder]\Source\Win32\Internet) that has the functions HTMLEncode and HTMLDecode. They might be worth a look.

like image 131
Pauk Avatar answered Nov 15 '22 04:11

Pauk