Browse Source

Merged revisions 556 via svnmerge from
/trunk

git-svn-id: branches/fixes_2_0@561 -

florian 20 years ago
parent
commit
2801071c2b
2 changed files with 7 additions and 1 deletions
  1. 6 1
      compiler/scanner.pas
  2. 1 0
      tests/test/tutf81.pp

+ 6 - 1
compiler/scanner.pas

@@ -2984,7 +2984,12 @@ implementation
                                  concatwidestringchar(patternw,tcompilerwidechar(c))
                              end
                            else if iswidestring then
-                             concatwidestringchar(patternw,asciichar2unicode(c))
+                             begin
+                               if aktsourcecodepage='utf8' then
+                                 concatwidestringchar(patternw,ord(c))
+                               else
+                                 concatwidestringchar(patternw,asciichar2unicode(c))
+                             end
                            else
                              begin
                                if len<255 then

+ 1 - 0
tests/test/tutf81.pp

@@ -3,4 +3,5 @@
 begin
   w:='äüö';
   writeln(w);
+  writeln('äa');
 end.