mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 15:25:07 +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];
|
||||
if s[i]='''' then
|
||||
Result:=Result+'''';
|
||||
RangeIsString:=true;
|
||||
end else begin
|
||||
if RangeIsString then
|
||||
Result:=Result+'''';
|
||||
@ -158,7 +159,7 @@ begin
|
||||
|
||||
// write table: unicode to char
|
||||
writeln(' case Unicode of');
|
||||
writeln(' 0..127: Result:=chr(Unicode);');
|
||||
writeln(' 0..127: Result:=Unicode;');
|
||||
i:=0;
|
||||
while i<256 do begin
|
||||
s:=SortedTable[i];
|
||||
@ -186,18 +187,18 @@ begin
|
||||
dec(j);
|
||||
if j=0 then
|
||||
writeln(' '+IntToStr(UniCode)
|
||||
+': Result:='+ToStringConstant(chr(StrToTableIndex(s)))+';')
|
||||
+': Result:='+IntToStr(StrToTableIndex(s))+';')
|
||||
else if UniCode=TableIndex then
|
||||
writeln(' '+IntToStr(UniCode)+'..'+IntToStr(UniCode+j)
|
||||
+': Result:=chr(Unicode);')
|
||||
+': Result:=Unicode;')
|
||||
else
|
||||
writeln(' '+IntToStr(UniCode)+'..'+IntToStr(UniCode+j)
|
||||
+': Result:=chr(Unicode-'+IntToStr(UniCode-TableIndex)+');');
|
||||
+': Result:=Unicode-'+IntToStr(UniCode-TableIndex)+';');
|
||||
inc(i,j);
|
||||
end;
|
||||
inc(i);
|
||||
end;
|
||||
writeln(' else Result:='''';');
|
||||
writeln(' else Result:=-1;');
|
||||
writeln(' end;');
|
||||
|
||||
// create SortedTable
|
||||
|
Loading…
Reference in New Issue
Block a user