From cefa8ce9b9faba60ba19182f350547599337a504 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 2 Jul 2005 12:03:47 +0000 Subject: [PATCH] * utf-8 fix from Rimgaudas Laucius git-svn-id: trunk@556 - --- compiler/scanner.pas | 7 ++++++- tests/test/tutf81.pp | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/scanner.pas b/compiler/scanner.pas index e3917e6562..230910a1a6 100644 --- a/compiler/scanner.pas +++ b/compiler/scanner.pas @@ -2996,7 +2996,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 diff --git a/tests/test/tutf81.pp b/tests/test/tutf81.pp index d5b3559938..08ed278968 100644 --- a/tests/test/tutf81.pp +++ b/tests/test/tutf81.pp @@ -3,4 +3,5 @@ begin w:='äüö'; writeln(w); + writeln('äa'); end.