* Patch from Bart Broersma for issue ID #38622

git-svn-id: trunk@48962 -
This commit is contained in:
michael 2021-03-14 14:16:16 +00:00
parent d399df83ba
commit 2aab9b1f9b
2 changed files with 4 additions and 0 deletions

View File

@ -1014,6 +1014,7 @@ begin
if (U1<>0) then
begin
App:={$IFDEF FPC_HAS_CPSTRING}UTF8Encode({$ENDIF}WideChar(U1)+WideChar(U2){$IFDEF FPC_HAS_CPSTRING}){$ENDIF};
U1:=0;
U2:=0;
end
else

View File

@ -4077,6 +4077,9 @@ begin
TestFrom('\u00f8','ø'); // this is ø
TestFrom('\u00f8\"','ø"'); // this is ø"
TestFrom('\ud83c\udf1f',GlowingStar);
TestFrom('\u0041\u0042','AB'); //issue #0038622
TestFrom('\u0041\u0042\u0043','ABC');
TestFrom('\u0041\u0042\u0043\u0044','ABCD');
end;
procedure TTestJSONString.TestStringToJSONString;