How to decode XML? Need to get something like this 𞉀




procedure TForm1.Button1Click(Sender: TObject);
var
Doc: IXMLDocument;
s : AnsiString;
sw : WideString;
i : integer;
begin
Doc := TXMLDocument.Create(nil);
Doc.LoadFromFile('example.xml');
sw := Doc.DocumentElement.ChildNodes['center'].ChildNodes['b'].NodeValue;
s := '';
for i := 1 to Length(sw) do begin
if ord(sw[i])> $04FF
then s := s + IntToHex( ord(sw[i]),4)+' '
else s := s + sw[i]
end;
Memo1.Text := s;
end;


it's UTF-16, it's good and gives me D83DDE09 but i need to get 😉 (without symbol) how to decode it? i was searching a lot, but, nothing there, sorry for my bad english, hope you will understand me, thank you.


here is some help http://ift.tt/1rGxket (not spam)


No comments:

Post a Comment