mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 06:41:00 +02:00
LCL: added conversion functions for windows codepages
git-svn-id: trunk@14899 -
This commit is contained in:
parent
e5afe6b193
commit
3e1f9d6859
File diff suppressed because it is too large
Load Diff
@ -47,6 +47,7 @@ begin
|
|||||||
Result:=Result+s[i];
|
Result:=Result+s[i];
|
||||||
if s[i]='''' then
|
if s[i]='''' then
|
||||||
Result:=Result+'''';
|
Result:=Result+'''';
|
||||||
|
RangeIsString:=true;
|
||||||
end else begin
|
end else begin
|
||||||
if RangeIsString then
|
if RangeIsString then
|
||||||
Result:=Result+'''';
|
Result:=Result+'''';
|
||||||
@ -158,7 +159,7 @@ begin
|
|||||||
|
|
||||||
// write table: unicode to char
|
// write table: unicode to char
|
||||||
writeln(' case Unicode of');
|
writeln(' case Unicode of');
|
||||||
writeln(' 0..127: Result:=chr(Unicode);');
|
writeln(' 0..127: Result:=Unicode;');
|
||||||
i:=0;
|
i:=0;
|
||||||
while i<256 do begin
|
while i<256 do begin
|
||||||
s:=SortedTable[i];
|
s:=SortedTable[i];
|
||||||
@ -186,18 +187,18 @@ begin
|
|||||||
dec(j);
|
dec(j);
|
||||||
if j=0 then
|
if j=0 then
|
||||||
writeln(' '+IntToStr(UniCode)
|
writeln(' '+IntToStr(UniCode)
|
||||||
+': Result:='+ToStringConstant(chr(StrToTableIndex(s)))+';')
|
+': Result:='+IntToStr(StrToTableIndex(s))+';')
|
||||||
else if UniCode=TableIndex then
|
else if UniCode=TableIndex then
|
||||||
writeln(' '+IntToStr(UniCode)+'..'+IntToStr(UniCode+j)
|
writeln(' '+IntToStr(UniCode)+'..'+IntToStr(UniCode+j)
|
||||||
+': Result:=chr(Unicode);')
|
+': Result:=Unicode;')
|
||||||
else
|
else
|
||||||
writeln(' '+IntToStr(UniCode)+'..'+IntToStr(UniCode+j)
|
writeln(' '+IntToStr(UniCode)+'..'+IntToStr(UniCode+j)
|
||||||
+': Result:=chr(Unicode-'+IntToStr(UniCode-TableIndex)+');');
|
+': Result:=Unicode-'+IntToStr(UniCode-TableIndex)+';');
|
||||||
inc(i,j);
|
inc(i,j);
|
||||||
end;
|
end;
|
||||||
inc(i);
|
inc(i);
|
||||||
end;
|
end;
|
||||||
writeln(' else Result:='''';');
|
writeln(' else Result:=-1;');
|
||||||
writeln(' end;');
|
writeln(' end;');
|
||||||
|
|
||||||
// create SortedTable
|
// create SortedTable
|
||||||
|
Loading…
Reference in New Issue
Block a user