문제

Some of my wide strings contains characters escaped with &# For example: The wide string source looks like: '   ' The converted result must be ' ' (3 blank spaces).

Function should look like

function UriUnescape(const aSrc: WideString): WideString;
begin
  //Your code goes here
end;

Note: 1) I am using Delphi 7.

2) This wide string is part of a SOAP response not HTML.

3) In general this method should accept alphanumeric characters as part of the wide string: example input :='be @' result := 'be @'

도움이 되었습니까?

해결책

Your C# link is about URL unescaping but your source string looks more like HTML encoded. In that case, see HtmlDecode function in HttpApp unit.

If you want URL decoding you could try HttpDecode or Indy's TIdURL.URLDecode.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top