From 3f81a4ed65045073c35e21e4c45ad14725a8691b Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 22 Sep 2007 20:54:49 +0000 Subject: [PATCH] * make code page name parsing case insensitive (mantis #8930) git-svn-id: trunk@8610 - --- .gitattributes | 1 + compiler/widestr.pas | 4 ++-- tests/webtbs/tw8930.pp | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 tests/webtbs/tw8930.pp diff --git a/.gitattributes b/.gitattributes index 462e5f1ac8..4fba2682b1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8415,6 +8415,7 @@ tests/webtbs/tw8861.pp svneol=native#text/plain tests/webtbs/tw8870.pp svneol=native#text/plain tests/webtbs/tw8883.pp svneol=native#text/plain tests/webtbs/tw8919.pp svneol=native#text/plain +tests/webtbs/tw8930.pp svneol=native#text/plain tests/webtbs/tw8935.pp svneol=native#text/plain tests/webtbs/tw8950.pp svneol=native#text/plain tests/webtbs/tw8975.pp svneol=native#text/plain diff --git a/compiler/widestr.pas b/compiler/widestr.pas index 5bddf2a0cd..1c0c0d634d 100644 --- a/compiler/widestr.pas +++ b/compiler/widestr.pas @@ -65,7 +65,7 @@ unit widestr; cp8859_1,cp850,cp437, { cyrillic code pages } cp1251,cp866,cp8859_5, - globals; + globals,cutils; procedure initwidestring(out r : pcompilerwidestring); @@ -263,7 +263,7 @@ unit widestr; function cpavailable(const s : string) : boolean; begin - cpavailable:=mappingavailable(s); + cpavailable:=mappingavailable(lower(s)); end; end. diff --git a/tests/webtbs/tw8930.pp b/tests/webtbs/tw8930.pp new file mode 100644 index 0000000000..3549cc68da --- /dev/null +++ b/tests/webtbs/tw8930.pp @@ -0,0 +1,6 @@ +{ %norun } + +{$codepage CP850} + +begin +end.