diff --git a/.gitattributes b/.gitattributes index 4100a99ac4..ef534cf480 100644 --- a/.gitattributes +++ b/.gitattributes @@ -14815,6 +14815,7 @@ tests/webtbs/tw28850.pp svneol=native#text/plain tests/webtbs/tw2886.pp svneol=native#text/plain tests/webtbs/tw2891.pp svneol=native#text/plain tests/webtbs/tw2892.pp svneol=native#text/plain +tests/webtbs/tw28934.pp svneol=native#text/plain tests/webtbs/tw2897.pp svneol=native#text/plain tests/webtbs/tw2899.pp svneol=native#text/plain tests/webtbs/tw2904.pp svneol=native#text/plain diff --git a/compiler/widestr.pas b/compiler/widestr.pas index eb20a25948..ce0e5dbcce 100644 --- a/compiler/widestr.pas +++ b/compiler/widestr.pas @@ -334,7 +334,7 @@ unit widestr; p : punicodemap; begin Result:=0; - p:=getmap(s); + p:=getmap(lower(s)); if (p<>nil) then Result:=p^.cp; end; @@ -345,7 +345,7 @@ unit widestr; var p2: pchar; i, chars, codepointlen: sizeint; - {$ENDIF FPC_HAS_CPSTRING} + {$ENDIF FPC_HAS_CPSRING} begin {$IFDEF FPC_HAS_CPSTRING} if len=0 then diff --git a/tests/webtbs/tw28934.pp b/tests/webtbs/tw28934.pp new file mode 100644 index 0000000000..493c36710c --- /dev/null +++ b/tests/webtbs/tw28934.pp @@ -0,0 +1,14 @@ +{ %norun } +{ %opt=-FcCP1252 } + +program project1; + +Type + WideArray = array [0..3] of Widechar; + +var + Test: WideArray; + +begin + Test := 'hmmm'; +end.