-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTF8 Error #33
Comments
I can't reproduce this behavior if I run your code (neither in XE nor in 10.1). Did you use the newest source code? |
JsonUTF8.zip And, if I edit the procedure " TUtf8JsonReader.LexString" line 5759: SetStringUtf8(FLook.S, P, EndP - P) // before edit to line 5759: SetStringUtf8(FLook.S, P, EndP - P + 1) //after edit after edit, my test run ok. |
Do you have XE Update 1 installed? I have and I don't see that bug with your test application. The only thing that could be different is Utf8ToUnicode. |
I run it in XE( with Update 1 ), the demo run OK. |
When I use JsonDataObjects,pas (in Delphi XE) like this:
procedure doParseUTF8();
var
aJson: TJsonObject;
aJsonStr: string;
aUTF8Str: UTF8String;
begin
aJsonStr := '{"123":{"abc":{"efg":"hij"}}}';
aUTF8Str := UTF8Encode(aJsonStr);
aJson := TJsonObject.Create;
try
aJson.FromUtf8JSON(aUTF8Str);
ShowMessage(aJson.ToJSON);
finally
aJson.Free;
end;
end;
I get message '{"12":{"ab":{"ef":"hi"}}}'.
The Key and The Value all have been cut.
this Error also in parse from UTF8 file.
The text was updated successfully, but these errors were encountered: