LCL: added conversion functions for windows codepages

git-svn-id: trunk@14899 -
This commit is contained in:
mattias 2008-04-19 19:33:09 +00:00
parent e5afe6b193
commit 3e1f9d6859
2 changed files with 3393 additions and 22 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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