浏览代码

* fixed getting the current locale's ansi upper case table under i8086-msdos

git-svn-id: trunk@31904 -
nickysn 9 年之前
父节点
当前提交
12f49eb280
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      rtl/msdos/sysutils.pp

+ 3 - 2
rtl/msdos/sysutils.pp

@@ -696,6 +696,8 @@ end;
 
 
 procedure InitAnsi;
+type
+  PFarChar = ^char; far;
 var
   CountryInfo: TCountryInfo; i: integer;
 begin
@@ -728,10 +730,9 @@ begin
     and Offset:Segment word record (PM) }
     {  get the uppercase table from dosmemory  }
     GetExtendedCountryInfo(2, $FFFF, $FFFF, CountryInfo);
-    { TODO: implement }
-//    DosMemGet(CountryInfo.UpperCaseTable shr 16, 2 + CountryInfo.UpperCaseTable and 65535, UpperCaseTable[128], 128);
     for i := 128 to 255 do
        begin
+       UpperCaseTable[i] := PFarChar(CountryInfo.UpperCaseTable)[i+(2-128)];
        if UpperCaseTable[i] <> chr(i) then
           LowerCaseTable[ord(UpperCaseTable[i])] := chr(i);
        end;