-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
What steps will reproduce the problem?
1. Get JSON from
http://maps.googleapis.com/maps/api/distancematrix/json?origins=Vancouver+BC|Sea
ttle&destinations=San+Francisco|Victoria+BC&mode=bicycling&language=ru-RU&sensor
=false
2. Parse then with JSON
3. Get error "Unescaped symbol at position..."
What is the expected output? What do you see instead?
Need support for other charsets in "UnescapeString"
What version of the product are you using? On what operating system?
json-1.4. on WindowsXP SP3.
Please provide any additional information below.
Delphi unit code:
procedure TForm1.Button1Click(Sender: TObject);
var
sl: TStringList;
ja: TJSONarray;
s: String;
pac: PAnsiChar;
begin
ja := nil;
sl := TStringList.Create;
try
sl.LoadFromFile('json_ru');
s := Utf8ToAnsi(sl.Text);
pac := PAnsiChar(s);
ja := ParseJSON(pac);
finally
if Assigned(ja) then
ja.Free;
sl.Free;
end;
end;
Original issue reported on code.google.com by ruslan.p...@gmail.com on 26 Oct 2012 at 10:27