Forráskód Böngészése

Merged revisions 556 via svnmerge from
/trunk

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

florian 20 éve
szülő
commit
2801071c2b
2 módosított fájl, 7 hozzáadás és 1 törlés
  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))
                                  concatwidestringchar(patternw,tcompilerwidechar(c))
                              end
                              end
                            else if iswidestring then
                            else if iswidestring then
-                             concatwidestringchar(patternw,asciichar2unicode(c))
+                             begin
+                               if aktsourcecodepage='utf8' then
+                                 concatwidestringchar(patternw,ord(c))
+                               else
+                                 concatwidestringchar(patternw,asciichar2unicode(c))
+                             end
                            else
                            else
                              begin
                              begin
                                if len<255 then
                                if len<255 then

+ 1 - 0
tests/test/tutf81.pp

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