Browse Source

Fix tw3124 test for systems on pagecode 437.

 * Never modify the first half of LowerCaseTable:
   even if 'A' is the upper form of 'a' with an accent ('…'),
   that doesn't mean that the lowercase form of 'A' should be
   'a' with the accent ('…') instead of plain 'a'.

git-svn-id: trunk@34321 -
pierre 9 years ago
parent
commit
6f80a4cc29
1 changed files with 2 additions and 1 deletions
  1. 2 1
      rtl/go32v2/sysutils.pp

+ 2 - 1
rtl/go32v2/sysutils.pp

@@ -755,7 +755,8 @@ begin
     DosMemGet(CountryInfo.UpperCaseTable shr 16, 2 + CountryInfo.UpperCaseTable and 65535, UpperCaseTable[128], 128);
     DosMemGet(CountryInfo.UpperCaseTable shr 16, 2 + CountryInfo.UpperCaseTable and 65535, UpperCaseTable[128], 128);
     for i := 128 to 255 do
     for i := 128 to 255 do
        begin
        begin
-       if UpperCaseTable[i] <> chr(i) then
+       { Never modify the lowercase of any char if ord(char) < 127 }
+       if (UpperCaseTable[i] <> chr(i)) and (ord(UpperCaseTable[i])>=128) then
           LowerCaseTable[ord(UpperCaseTable[i])] := chr(i);
           LowerCaseTable[ord(UpperCaseTable[i])] := chr(i);
        end;
        end;
     end;
     end;