问题
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
回答1:
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.
来源:https://stackoverflow.com/questions/1097163/is-there-some-functionality-in-for-delphi-that-converts-a-string-with-html-named