Changing the console encoding to utf-8 on windows (#2407)

* Replaced `«` and `»` with `"`
upstream-master
Fabian Keßler 5 years ago committed by GitHub
parent 65c9c1173b
commit d2e9c6ff38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/enums/generated/ActionGroup.generated.cpp
  2. 2
      src/enums/generated/ActionType.generated.cpp
  3. 4
      src/gui/inputdevices/touchdisable/TouchDisableX11.cpp
  4. 4
      src/gui/toolbarMenubar/ToolMenuHandler.cpp
  5. 2
      src/gui/toolbarMenubar/model/ToolbarColorNames.cpp
  6. 2
      src/model/TexImage.cpp
  7. 14
      src/plugin/Plugin.cpp
  8. 4
      src/plugin/PluginController.cpp
  9. 2
      src/util/PlaceholderString.cpp

@ -116,7 +116,7 @@ auto ActionGroup_fromString(const string& value) -> ActionGroup {
return GROUP_ZOOM_FIT;
}
g_error("Invalid enum value for ActionGroup: «%s»", value.c_str());
g_error("Invalid enum value for ActionGroup: \"%s\"", value.c_str());
return GROUP_NOGROUP;
}

@ -592,7 +592,7 @@ auto ActionType_fromString(const string& value) -> ActionType {
return ACTION_NOT_SELECTED;
}
g_error("Invalid enum value for ActionType: «%s»", value.c_str());
g_error("Invalid enum value for ActionType: \"%s\"", value.c_str());
return ACTION_NONE;
}

@ -49,11 +49,11 @@ void TouchDisableX11::init() {
touchdev = XOpenDevice(display, touch->id);
if (!touchdev) {
g_warning("Failed to open touch device «%s»", touch->name);
g_warning("Failed to open touch device \"%s\"", touch->name);
return;
}
g_message("X11 Touch disabler active for device «%s»", touch->name);
g_message("X11 Touch disabler active for device \"%s\"", touch->name);
enabledAtom = XInternAtom(display, "Device Enabled", false);
}

@ -273,7 +273,7 @@ void ToolMenuHandler::signalConnectCallback(GtkBuilder* builder, GObject* object
ActionType action = ActionType_fromString(actionName);
if (action == ACTION_NONE) {
g_error("Unknown action name from glade file: «%s» / «%s»", signalName, handlerName);
g_error("Unknown action name from glade file: \"%s\" / \"%s\"", signalName, handlerName);
return;
}
@ -293,7 +293,7 @@ void ToolMenuHandler::signalConnectCallback(GtkBuilder* builder, GObject* object
// There is no toolbar item -> register the menu only
self->registerMenupoint(GTK_WIDGET(object), action, group);
} else {
g_error("Unsupported signal handler from glade file: «%s» / «%s»", signalName, handlerName);
g_error("Unsupported signal handler from glade file: \"%s\" / \"%s\"", signalName, handlerName);
}
}

@ -30,7 +30,7 @@ void save(fs::path const& file, GKeyFile* config) noexcept {
ofs.exceptions(std::ios::badbit | std::ios::failbit);
ofs.write(data, len);
} catch (std::ios_base::failure const& e) {
g_warning("Could not save color file «%s».\n%s with error code %d", file.u8string().c_str(), e.what(),
g_warning("Could not save color file \"%s\".\n%s with error code %d", file.u8string().c_str(), e.what(),
e.code().value());
}
g_free(data);

@ -87,7 +87,7 @@ auto TexImage::loadData(std::string&& bytes, GError** err) -> bool {
this->image = cairo_image_surface_create_from_png_stream(
reinterpret_cast<cairo_read_func_t>(&cairoReadFunction), this);
} else {
g_warning("Unknown Latex image type: «%s»", type.c_str());
g_warning("Unknown Latex image type: \"%s\"", type.c_str());
}
return true;

@ -47,12 +47,12 @@ void Plugin::registerToolbar() {
lua_getglobal(lua.get(), "initUi");
if (lua_isfunction(lua.get(), -1) == 1) {
if (callFunction("initUi")) {
g_message("Plugin «%s» UI initialized", name.c_str());
g_message("Plugin \"%s\" UI initialized", name.c_str());
} else {
g_warning("Plugin «%s» init failed!", name.c_str());
g_warning("Plugin \"%s\" init failed!", name.c_str());
}
} else {
g_message("Plugin «%s» has no UI init", name.c_str());
g_message("Plugin \"%s\" has no UI init", name.c_str());
}
inInitUi = false;
@ -192,7 +192,7 @@ void Plugin::loadScript() {
}
if (mainfile.find("..") != std::string::npos) {
g_warning("Plugin «%s» contains unsupported path «%s»", name.c_str(), mainfile.c_str());
g_warning("Plugin \"%s\" contains unsupported path \"%s\"", name.c_str(), mainfile.c_str());
this->valid = false;
return;
}
@ -212,7 +212,7 @@ void Plugin::loadScript() {
auto luafile = path / mainfile;
if (luaL_loadfile(lua.get(), luafile.string().c_str())) {
// Error out if file can't be read
g_warning("Could not run plugin Lua file: «%s»", luafile.string().c_str());
g_warning("Could not run plugin Lua file: \"%s\"", luafile.string().c_str());
this->valid = false;
return;
}
@ -232,7 +232,7 @@ void Plugin::loadScript() {
button.insert(std::pair<int, std::string>(0, _("OK")));
XojMsgBox::showPluginMessage(name, errMsg, button, true);
g_warning("Could not run plugin Lua file: «%s», error: «%s»", luafile.string().c_str(), errMsg);
g_warning("Could not run plugin Lua file: \"%s\", error: \"%s\"", luafile.string().c_str(), errMsg);
this->valid = false;
return;
}
@ -248,7 +248,7 @@ auto Plugin::callFunction(const std::string& fnc) -> bool {
button.insert(std::pair<int, std::string>(0, _("OK")));
XojMsgBox::showPluginMessage(name, errMsg, button, true);
g_warning("Error in Plugin: «%s», error: «%s»", name.c_str(), errMsg);
g_warning("Error in Plugin: \"%s\", error: \"%s\"", name.c_str(), errMsg);
return false;
}

@ -30,7 +30,7 @@ void PluginController::loadPluginsFrom(fs::path const& path) {
const auto& pluginPath = f.path();
auto plugin = std::make_unique<Plugin>(control, pluginPath.filename().string(), pluginPath);
if (!plugin->isValid()) {
g_warning("Error loading plugin «%s»", f.path().string().c_str());
g_warning("Error loading plugin \"%s\"", f.path().string().c_str());
continue;
}
@ -47,7 +47,7 @@ void PluginController::loadPluginsFrom(fs::path const& path) {
this->plugins.emplace_back(std::move(plugin));
}
} catch (fs::filesystem_error const& e) {
g_warning("Could not open plugin dir: «%s»", path.string().c_str());
g_warning("Could not open plugin dir: \"%s\"", path.string().c_str());
return;
}
#endif

@ -57,7 +57,7 @@ auto PlaceholderString::formatPart(std::string format) const -> std::string {
try {
index = std::stoi(format);
} catch (const std::exception& e) {
g_error("Could not parse «%s» as int, error: %s", format.c_str(), e.what());
g_error("Could not parse \"%s\" as int, error: %s", format.c_str(), e.what());
}
// Placeholder index starting at 1, vector at 0

Loading…
Cancel
Save