diff --git a/docs/reference/changelog-r2023.md b/docs/reference/changelog-r2023.md index 52cc97febfc..e8dd42c3fec 100644 --- a/docs/reference/changelog-r2023.md +++ b/docs/reference/changelog-r2023.md @@ -44,6 +44,7 @@ Released on ?? - Added `proto_formatter.py` script to automatically indent PROTO files ([#6167](https://github.com/cyberbotics/webots/pull/6167)). - Disabled the computation of shadow reception on meshes when shadows are globally disabled([#6201](https://github.com/cyberbotics/webots/pull/6201)). - Bug Fixes + - Windows: fixed compilation of controller programs located in paths with non-ASCII characters ([#6235](https://github.com/cyberbotics/webots/pull/6235)). - Fixed the size of the Kondo [KHR-3HV](https://webots.cloud/run?url={{ url.github_tree }}/projects/robots/kondo/khr-3hv/protos/Khr3hv.proto) robot which was twice too large ([#6228](https://github.com/cyberbotics/webots/pull/6228)). - Fixed random crashes while creating [Skin](skin.md) and Mesh(mesh.md) nodes ([#6218](https://github.com/cyberbotics/webots/pull/6218)). - Fixed the MATLAB `wb_camera_recognition_get_objects` API function ([#6172](https://github.com/cyberbotics/webots/pull/6172)). diff --git a/src/webots/editor/WbBuildEditor.cpp b/src/webots/editor/WbBuildEditor.cpp index 2663b3cb307..04fb6230071 100644 --- a/src/webots/editor/WbBuildEditor.cpp +++ b/src/webots/editor/WbBuildEditor.cpp @@ -304,12 +304,14 @@ void WbBuildEditor::make(const QString &target) { // find out compilation directory QString compilePath = compileDir().absolutePath(); - // On Windows, make won't work if the Makefile file is located in a path with UTF-8 characters (e.g., Chinese) + + // On Windows, gcc won't work if the source file contains UTF-8 characters (e.g., Chinese) #ifdef _WIN32 - if (!isJavaProgram && QString(compilePath.toUtf8()) != QString::fromLocal8Bit(compilePath.toLocal8Bit())) { - WbMessageBox::warning(tr("\'%1\'\n\nThe path to this Webots project contains non 8-bit characters. " - "Webots won't be able to compile any C/C++ controller in this path. " - "Please move this Webots project into a folder with only 8-bit characters.") + const QString controllerName = QFileInfo(compilePath).baseName(); + if (!isJavaProgram && QString(controllerName.toUtf8()) != QString::fromLocal8Bit(controllerName.toLocal8Bit())) { + WbMessageBox::warning(tr("\'%1\'\n\nThe robot controller name contains non 8-bit characters. " + "Webots won't be able to compile any C/C++ controller with such a name. " + "Please rename this robot controller with only 8-bit characters.") .arg(compilePath), this); return; @@ -425,8 +427,8 @@ void WbBuildEditor::make(const QString &target) { QStringList WbBuildEditor::getJavaCommandLine(const QString &target) const { QDir controllerDir = compileDir(); - QString controllerPath = controllerDir.absolutePath(); - QString controllerName = QFileInfo(controllerPath).baseName(); + const QString controllerPath = controllerDir.absolutePath(); + const QString controllerName = QFileInfo(controllerPath).baseName(); QStringList commandLine; if (target == "clean")