From d33139b2c781d1c4eda1b8ab56212aef5fb1cf42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 30 May 2009 14:24:55 +0200 Subject: [PATCH] Preprocessor: Added todos for better handling of UTF / extended ASCII http://apps.sourceforge.net/trac/cppcheck/ticket/343 --- src/preprocessor.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/preprocessor.cpp b/src/preprocessor.cpp index 3936180fc..d70bcabb6 100644 --- a/src/preprocessor.cpp +++ b/src/preprocessor.cpp @@ -67,9 +67,17 @@ void Preprocessor::writeError(const std::string &fileName, const std::string &co char ch = code[codePos]; - // We are not handling UTF and stuff like that. Code is supposed to plain simple text. + // UTF / extended ASCII => The output from the preprocessor should only be standard ASCII if (ch < 0) - continue; + { + // TODO: Remove characters that are redundant + + // TODO: Convert characters that are needed to standard ASCII + + // Not sure how to handle this character. Bailing out. + if (ch < 0) + continue; + } // char/string.. if (ch == '\'' || ch == '\"')