mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 20:21:12 +02:00
fixed reading po files with c string MsgID
git-svn-id: trunk@9396 -
This commit is contained in:
parent
197af73cdf
commit
c8ded32146
@ -2149,12 +2149,13 @@ var
|
|||||||
SourceEnd: PChar;
|
SourceEnd: PChar;
|
||||||
CharLen: integer;
|
CharLen: integer;
|
||||||
|
|
||||||
// Copies from SourceStart to Source to Dest and updates Dest
|
// Copies from SourceStart till Source to Dest and updates Dest
|
||||||
procedure CopyPart; inline;
|
procedure CopyPart; inline;
|
||||||
var
|
var
|
||||||
CopyLength: SizeInt;
|
CopyLength: SizeInt;
|
||||||
begin
|
begin
|
||||||
CopyLength := Source - SourceStart;
|
CopyLength := Source - SourceStart;
|
||||||
|
if CopyLength=0 then exit;
|
||||||
move(SourceStart^ , Dest^, CopyLength);
|
move(SourceStart^ , Dest^, CopyLength);
|
||||||
inc(Dest, CopyLength);
|
inc(Dest, CopyLength);
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -304,7 +304,7 @@ begin
|
|||||||
if CompareMem(LineStart,sCommentIdentifier,3) then begin
|
if CompareMem(LineStart,sCommentIdentifier,3) then begin
|
||||||
Identifier:=copy(s,LineStart-p+4,LineLen-3);
|
Identifier:=copy(s,LineStart-p+4,LineLen-3);
|
||||||
end else if CompareMem(LineStart,sMsgID,7) then begin
|
end else if CompareMem(LineStart,sMsgID,7) then begin
|
||||||
MsgID:=copy(s,LineStart-p+8,LineLen-8);
|
MsgID:=UTF8CStringToUTF8String(LineStart+7,LineLen-8);
|
||||||
end else if CompareMem(LineStart,sMsgStr,8) then begin
|
end else if CompareMem(LineStart,sMsgStr,8) then begin
|
||||||
//MsgStr:=copy(s,LineStart-p+9,LineLen-9);
|
//MsgStr:=copy(s,LineStart-p+9,LineLen-9);
|
||||||
MsgStr:=UTF8CStringToUTF8String(LineStart+8,LineLen-9);
|
MsgStr:=UTF8CStringToUTF8String(LineStart+8,LineLen-9);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user