I am posting the response you placed on StackOverFlow.com so that your question is not orphaned and I can help other people.
I found the solution, I did a class that convert unicode to
UTF8
function TForm1.DecodeUnicodeEscapes(EscapedString: String): String;
var
FoundPos: LongInt;
HexCode: String;
DecodedChars: String;
begin
Result := EscapedString;
FoundPos := Pos('\u', Result);
while (FoundPos <> 0) and (FoundPos < Length(Result) - 4) do begin
HexCode := Copy(Result, FoundPos + 2, 4);
DecodedChars := WideChar(StrToInt('$' + HexCode));
Result := AnsiReplaceStr(Result, '\u' + HexCode,
UTF8Encode(DecodedChars));
FoundPos := Pos('\u', Result);
end;
end;
Applying the class:
procedure TForm1.Button1Click(Sender: TObject);
var
s: String;
begin
s := '';
With TFPHttpClient.Create(Nil) do
try
s :=Get(Edit1.Text);
s := DecodeUnicodeEscapes(s);
finally
Free;
end;
Memo1.Lines.Text:=Trim(s);
end;