Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • FPC Source FPC Source
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1,255
    • Issues 1,255
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 46
    • Merge requests 46
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

GitLab 15.0 is launching on May 22! This version brings many exciting improvements, but also removes deprecated features and introduces breaking changes that may impact your workflow. To see what is being deprecated and removed, please visit Breaking changes in 15.0 and Deprecations.

  • FPC
  • FPC
  • FPC SourceFPC Source
  • Issues
  • #38618
Closed
Open
Created Mar 13, 2021 by FPC Admin account@fpc_adminOwner

Not processing "\u" characters in JSON String correctly.

Original Reporter info from Mantis: nicrosoft
  • Reporter name: Shen Min

Description:

The fpjson unit has a bug for processing "\u" characters in JSON String.

Steps to reproduce:

I have made a demo project to show the bug at:
https://github.com/shenmin/fpjson-bug-demo

The fpjson unit processes the "\u" characters in json string incorrect.

uses fpjson;

procedure TForm1.Button1Click(Sender : TObject);
var
    str : String;
    json : TJsonObject;
begin
    str := '{"name":"\u95e8\u88ab\u8111\u5b50\u6324\u574f\u4e86"}';
    json := GetJson(str) as TJsonObject;
    ShowMessage(json.Get('name', ''));
    json.Free;
end;

Mantis conversion info:

  • Mantis ID: 38618
  • Version: 2.0.12
  • Fixed in version: 3.3.1
  • Fixed in revision: 48965 (#0d1fb419)
  • Target version: 4.0.0
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking