You are not logged in.
Pages: 1
my code is
program UTF8Test;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
SynCommons;
var
AJSON: TJSONWriter;
AUTF8Text,
AUTF8Result: RawUTF8;
begin
try
AJSON := TJSONWriter.CreateOwnedStream;
try
AUTF8Text := '한글(Korean), 日本語(Japanese) Test';
AJSON.Add('{');
AJSON.AddFieldName('utf8');
AJSON.AddJSONEscape(Pointer(AUTF8Text));
AJSON.Add('}');
AUTF8Result := AJSON.Text;
finally
AJSON.Free;
end;
Writeln(AUTF8Result);
Readln;
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.
result:
{"utf8":﨑懋ク'#$80'(Korean), 譌・譛ャ隱・Japanese) Test}
how can i do?
mORMoti18n.pas
original
procedure CRLF(P: PChar); // PChar = either PAnsiChar either PWideChar
begin
repeat
case P^ of
#0: exit;
'|': P^ := #13;
'¤': P^ := #10;
end;
inc(P);
until false;
end;
modified
procedure CRLF(P: PChar); // PChar = either PAnsiChar either PWideChar
begin
repeat
case P^ of
#0: exit;
'|': P^ := #13;
#164 : P^ := #10; // ¤
end;
inc(P);
until false;
end;
sorry my english...
FDBClient := TSQLIte3HttpClient.Create('localhost', '8080', FSQLModel);
ASessionID := GetCurrentThreadID;
FDBClient.TransactionBegin(TAPM_STRING_DATA, ASessionID);
try
…
…
FDBClient.Commit(ASessionID); // <-- it dosen't work!!! TSQLite3HttpClient.TransactionBegin accept session id only "1"!!!
except
FDBClient.Rollback(ASessionID); // <-- it dosen't work!!! TSQLite3HttpClient.TransactionBegin accept session id only "1"!!!
end;
fixed code
procedure TSQLRestClientURI.RollBack(SessionID: cardinal);
begin
// inherited Rollback(SessionID); // reset fTransactionActive flag
inherited Rollback(CONST_AUTHENTICATION_NOT_USED); // <-- fixed
URI(Model.Root,'ABORT');
end;
procedure TSQLRestClientURI.Commit(SessionID: cardinal);
begin
// inherited Commit(SessionID); // reset fTransactionActive flag
inherited Commit(CONST_AUTHENTICATION_NOT_USED); // <-- fixed
URI(Model.Root,'END');
end;
Pages: 1