NetTalk Central

Author Topic: Any simple way to clean a string from non xHtml characters?  (Read 2738 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
If you are showing a simple web browse with Name and Address and this data is comming from a ws reading, that is, its not entered manually, then you can found any kind of characters inside those fields and if any of this is not xHTML compatible then suddenly the browse does not refresh.
This happened to me, suddenly some Addresses comes with #xxx; coded characters. so in addition to the conversion from utf to ansi I need to use DecEntityToChar() in all the string fields, so...

Is there any st method or combination that cleans all the possible non xHTML characters from a string? no matter if you loose data?

Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Any simple way to clean a string from non xHtml characters?
« Reply #1 on: July 31, 2023, 04:16:30 AM »
I'm not sure what you are asking, but I think the StringTheory method XMLEncode is what you are looking for.