diff --git a/NEWS.md b/NEWS.md index a1eec31b..4671886f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,7 @@ Red Panda C++ Version 1.4 - fix: can't open text project file in the editor - change: when create non-text project file, don't auto open it - fix: the project compiler options is not correctly read when open old dev-c++ project + - fix: astyle.exe can't correctly format files that using non-ascii identifier Red Panda C++ Version 1.3 diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 3f993f80..0def8d35 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -4291,6 +4291,7 @@ void Editor::reformat() onLinesDeleted(1,document()->count()); QByteArray content = text().toUtf8(); QStringList args = pSettings->codeFormatter().getArguments(); + qDebug()<dirs().appDir(), diff --git a/tools/astyle/ASResource.cpp b/tools/astyle/ASResource.cpp index e16561ae..9c190cb0 100644 --- a/tools/astyle/ASResource.cpp +++ b/tools/astyle/ASResource.cpp @@ -714,8 +714,10 @@ bool ASBase::isLegalNameChar(char ch) const { if (isWhiteSpace(ch)) return false; - if ((unsigned char) ch > 127) - return false; +// if ((unsigned char) ch > 127) +// return false; + if ((unsigned char) ch > 127) + return true; return (isalnum((unsigned char) ch) || ch == '.' || ch == '_' || (isJavaStyle() && ch == '$')