[Scummvm-git-logs] scummvm master -> 03f3f01740a81acfd64820468826a19695085069

sev- sev at scummvm.org
Sun Aug 30 12:45:12 UTC 2020


This automated email contains information about 140 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
20e21ba79d GUI: U32: Temporarily overload drawString
2745d51fe7 GUI: U32: make convertBidiString take in and return u32strings
aafade4507 GUI: U32: Shift most widgets to draw with u32
a1a4e0c2d7 GUI: U32: Overload getStringWidth to accept U32 strings as params
4ea2b46ce8 GUI: U32: Add asuint64 helper to ustr
5f2af6b93e GUI: U32: Add u32 support to Editables and Dialogs
ad78777bc6 GUI: Handle ellipsis shortening of text when drawing u32 strings
aa33fc2354 GRAPHICS: Use template for handleEllipsis
f800ca4ada GUI: U32: Convert majority of code to use U32
96912f4adb GUI: U32: Rename some references of strings to use U32() & not helper method
160a1320cc GUI: U32: Rename more temp code and fix issues
b9a449480b GUI: U32: Remove u32::format references
3641e24daa JANITORIAL: Add missing space
c0458adec2 GUI: U32: Use u32 for about dialog
cbc83065c0 GUI: U32: Fix warnings with printf statements
49c36c2b45 GUI: U32: Begin converting texts in clipboards to u32strings
fd763b61e5 GUI: U32: Add U32String conversion helpers to str.cpp
bed05ea134 GUI: U32: Fix compilation errors across entire project
d4d5b8906e GUI: U32: Begin making TTS take in U32Strings for saying
ef7ec444d3 GUI: U32: Enable u32 for tts (Windows)
bcbe2fe2ea GUI: U32: Enable u32 for tts (Linux)
0118839c59 GUI: U32: Use u32 for tts (MacOS)
1ca1712b4d GUI: U32: Fix problems with u32strings formatting
e22b32abfe GUI: U32: Use Common::U32String::format where necessary and GUIError to u32
ba0d57f350 GUI: Compare iterator condition properly for about dialog
6987d1a674 GUI: U32: Use u32 for KeysDialog.
b9e1ac102d GUI: U32: properly cleanupHotkey with u32 const iterators
4506bcd9f3 GUI: U32: Fix compilation errors
521acaf459 GUI: RTL: Fix 1-off issue for drawing u32 strings
da380a9002 GUI: U32: Fix issues with ustr formatting
a9bfe35216 GUI: U32: More issue fixes and general improvements
c142360bf4 GUI: U32: Add minimal implementation for itoa (base 10)
a9a816e7fe GUI: U32: Improve U32String::format
4bcac1df17 GUI: U32: Use u32 in clipboards for MacOS
8cfa8a5589 GUI: U32: Use u32 for menu items in mac
e91f968992 GUI: U32: encode and use c strings for translations in macos dialogs
79c518e9c1 GUI: U32: I18N: Remove codepages from create_translations tool
085f375c98 GUI: U32: Store messages as U32Strings and remove codepages reading from .dat
dc1c82b74e GUI: U32: Define new translation version "4"
6747e354b8 GUI: U32: Load translation info correctly
fc91436ea6 GUI: U32: Remove charsets being written to .dat
546fe374df GRAPHICS: Properly assign chars in handleEllipsis according to stringtype
810b7cfccc GUI: U32: Write block sizes as Uint32BE
3d97be2559 GUI: U32: Remove redundant code
77937f3e2b GUI: U32: Remove more redundant code, and add UTF-8 check
9573f1e515 GUI: U32: Remove useless check when converting bidiString
b6278f3400 GUI: U32: Write translation description and size for english language also as uint32BE.
cec0985d5a GUI: U32: Update credits.pl script to not write ascii string
22ef76638c GUI: U32: Return visual from convertBiDiU32String
185fb72783 GUI: U32: Improve U32 code
d12c6c4338 GUI: U32: Code cleanup
d3e64b2df4 GUI: U32: Use const-references for tooltips
f46be5c766 GUI: U32: Improve splitting osd messages
bd19eaa5bf GUI: U32: More code improvements in engines and misc fixes
ffc89d1a2b GUI: U32: SCUMM: Make variables in help to use U32
4b6976c558 GUI: U32: Reduce number of files changed and fixes
7a19c7ffee I18N: Update POTFILES
cbff58200f GUI: U32: Use u32 for EditRecordDialog and RecorderDialog
68d01321d6 GUI: U32: Downscale changes of U32, fix review issues
12e4f871a3 GUI: U32: Improve u32 in all engine subsystems
56911beea2 GUI: U32: Add and use a U32Tokenizer
2ca907b4a2 GUI: U32: Use game-list filters with u32
9bf3f73d8a GUI: U32: Use U32Strings for native dialogs
93cb408c05 BACKENDS: WIN32: Add UTF8ToUnicode for Win32wrapper
f95762881e GUI: U32: Use unicode strings for native Windows dialogs
01176e43f7 GUI: U32: Use unicode based generateGameReport correctly in all places
95aae12527 GUI: ULTIMA: Use u32 strings for keymap description
9737b0d300 I18N: Add missing EOL in create_translations error message
1e5788d048 I18N: Improve utf-8 check in create_translations
0ca5a40d85 TTS: ALL: Improve u32-ity
f9b05f5e5a BACKENDS: DIALOGS: MACOS: Improve readability and remove redundant code.
58203e09fd COMMON: Fix encoding conversion using iconv
733df0bfa1 MACOSX: Fix getting text from clipboard
94035cf7aa COMMON: Fix creating a String from a U32String
dc977ffd85 GLK: Avoid back and forth conversion between UTF-32 and UTF-8 for TTS
66342fb89c TTS: Fix conversion to UTF-32 for text to speak
35386aab4c TTS: Remove more redundant code
f0ad817716 SDL: Fix clipboard fetching internally
a9c5e930f0 ANDROID: Make clipboards work with U32Strings.
a54b5826ea UPDATES: Fix compilation with U32 strings
1950e38154 ANDROID: Support OSD Messages for U32.
3c79c2a519 GUI: U32: Fix incorrect format specifier for aspect ratio message.
388473656e GUI: U32: Add contains utility for string, which takes in a uint.
3fc336300f 3DS: Use U32Strings for displaying OSD Messages
a647812bfb iOS: Use U32 for clipboards.
1d85a3d8e1 GUI: U32: Fix incorrect type for single char in U32::vformat
6fa5d7ee2f CRYOMNI3D: Assign char outside if condition to avoid ambiguity with new contains utility
140eddf90a GUI: U32: Allow vformat to take in a pointer to a translated string
d48453693c GUI: U32: Use translated strings as arguments for formatting function usage.
caa8a5d7bb MACOSX: Fix memory leak in copy to clipboard
1e8cb29a54 IOS7: Fix memory leak and compilation for copy to clipboard
8c5611c3ca GUI: U32: Fix unused u32format where translations are used.
c87d0d6834 BACKENDS: NETWORKING: Remove unused toUtf8 helper
bc8ead4a7c AGOS: GUI: U32: Remove redundant code
87df975686 GUI: U32: Wrap string in U32 if not using translations.
e29e5f1156 GUI: TTS: Fix compilation
edec55cf64 GLK: SCOTT: Add new helpers to use translated strings.
840f08d537 GUI: U32: Code cleanup & misc fixes
e3c1fece97 IOS7: Fix compilation
58d13fb863 IPHONE: Fix compilation
6b7c646ba4 WII: Use U32Strings for options dialog.
ad20df4b27 SYMBIAN: Properly return U32String when get action name.
f295d642a1 DS: Use U32Strings for Options dialog.
dfc53b60e3 3DS: Use U32Strings for options dialog.
dd31b45be3 GLK: SCOTT: Fix unsafe memory usage
d2da98d3b0 GLK: More usage of translations
d4a280ef29 BACKENDS: DIALOGS: GTK: Fix incorrect memory usage & replace unsafe code.
b709e2f40c GLK: SCOTT: Improve usage of translations when looking.
495921b100 DEVTOOLS: Increase buffer size for po parser to avoid stack overflow errors
d41d0e9b22 JANITORIAL: Fix formatting issues
29b6274e67 BACKENDS: CLIPBOARD: Improve usage for SDL & Android.
a9a63ec931 DEVTOOLS: CREATE_TRANSLATIONS: Remove useless const return value for useUTF8 member function.
44230b6c8a GUI: U32: Return a string from FileBrowserDialog::getResult
579b370183 ILLUSIONS: Fix conversion to string
277d7dc64c MOHAWK: I18N: Move new translation filename to root dir POTFILES of Mohawk
c855f6259a GUI: U32: Fix incorrect code for redirecting constructors.
219646378c SCUMM: GUI: U32: Remove redundant code
df03b319fb SCUMM: GUI: U32: Use more translations
5ab12afd2a JANITORIAL: Spacing issues in gui/about.
1612b6845a ENGINES: GUI: U32: Improve translation message usage
4cef06d7a8 BACKENDS: WIN32: Use calloc to allocate memory for UTF8ToUnicode wrapper.
24151a6d31 DEVTOOLS: CREDITS: Update script to not write ascii descriptions when adding person.
e00e453489 GUI: CREDITS: Regenerate credits.h file
455a05b059 BACKENDS: SDL: Remove redundant code when set text in clipboard.
984e7fae99 BACKENDS: DIALOGS: Remove redundant code for GTK Dialogs.
a089fe47e7 BACKENDS: Display messages on OSD takes in U32Strings for modular backend.
2fa7703206 GLK: Use U32Strings properly for clipboards.
86055761e8 KYRA: Use U32Strings when EoBCoreEngine::initKeymaps adds keymap actions.
67daa0fa96 GUI: Add missing parameter in MessageDialog
71fb3b4dbb SCI: Use U32Strings when creating options widget.
8309b98e66 PARALLACTION: Create saveload dialogs & message dialogs with U32.
08e9eb3f18 SCI: Use Strings for SaveGameDescription
2eeb0cb859 GUI: Use U32Strings for MessageDialogWithURL.
f72a98c799 GUI: Return Strings from createDefaultSaveDesc
86b8c23f78 SCUMM: DIALOGS: Return U32 for queryResString.
20d661947b SCI: Fix typo for showScummVMDialog
e206c513bb ENGINES: Proper usage of Saveload/SaveState for U32Strings.
e5445fb901 GUI: U32: Small improvements/fixes
d158866505 BACKENDS: Fix discord presence compilation with U32String
03f3f01740 GUI: Simplify code for UnknownGameDialogs when generating bug tracker URL.


Commit: 20e21ba79d9accd2f7975da3b1583fab13c4575c
    https://github.com/scummvm/scummvm/commit/20e21ba79d9accd2f7975da3b1583fab13c4575c
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Temporarily overload drawString

- To accept u32 string as a parameter
- To draw everything else normally until fully converted to drawing u32

Changed paths:
    graphics/VectorRenderer.h
    graphics/VectorRendererSpec.cpp
    graphics/VectorRendererSpec.h


diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index 14d3532b0c..0efa199926 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -529,6 +529,9 @@ public:
 	virtual void drawString(const Graphics::Font *font, const Common::String &text,
 	                        const Common::Rect &area, Graphics::TextAlign alignH,
 	                        GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool useEllipsis, const Common::Rect &textDrawableArea) = 0;
+	virtual void drawString(const Graphics::Font *font, const Common::U32String &text,
+	                        const Common::Rect &area, Graphics::TextAlign alignH,
+	                        GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool useEllipsis, const Common::Rect &textDrawableArea) = 0;
 
 	/**
 	 * Allows to temporarily enable/disable all shadows drawing.
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index e44ccd6328..d10b10df2a 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -1075,6 +1075,50 @@ drawString(const Graphics::Font *font, const Common::String &text, const Common:
 	}
 }
 
+template<typename PixelType>
+void VectorRendererSpec<PixelType>::
+drawString(const Graphics::Font *font, const Common::U32String &text, const Common::Rect &area,
+			Graphics::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool ellipsis, const Common::Rect &textDrawableArea) {
+
+	int offset = area.top;
+
+	if (font->getFontHeight() < area.height()) {
+		switch (alignV) {
+		case GUI::ThemeEngine::kTextAlignVCenter:
+			offset = area.top + ((area.height() - font->getFontHeight()) >> 1);
+			break;
+		case GUI::ThemeEngine::kTextAlignVBottom:
+			offset = area.bottom - font->getFontHeight();
+			break;
+		default:
+			break;
+		}
+	}
+
+	Common::Rect drawArea;
+	if (textDrawableArea.isEmpty()) {
+		// In case no special area to draw to is given we only draw in the
+		// area specified by the user.
+		drawArea = area;
+		// warning("there is no text drawable area. Please set this area for clipping");
+	} else {
+		// The area we can draw to is the intersection between the allowed
+		// drawing area (textDrawableArea) and the area where we try to draw
+		// the text (area).
+		drawArea = textDrawableArea.findIntersectingRect(area);
+	}
+
+	// Better safe than sorry. We intersect with the actual surface boundaries
+	// to avoid any ugly clipping in _activeSurface->getSubArea which messes
+	// up the calculation of the x and y coordinates where to draw the string.
+	drawArea = drawArea.findIntersectingRect(Common::Rect(0, 0, _activeSurface->w, _activeSurface->h));
+
+	if (!drawArea.isEmpty()) {
+		Surface textAreaSurface = _activeSurface->getSubArea(drawArea);
+		font->drawString(&textAreaSurface, text, area.left - drawArea.left, offset - drawArea.top, area.width() - deltax, _fgColor, alignH, deltax);
+	}
+}
+
 template<typename PixelType>
 void VectorRendererSpec<PixelType>::
 drawLine(int x1, int y1, int x2, int y2) {
diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h
index 9145d2b54e..057fb1f2da 100644
--- a/graphics/VectorRendererSpec.h
+++ b/graphics/VectorRendererSpec.h
@@ -68,6 +68,9 @@ public:
 	void drawString(const Graphics::Font *font, const Common::String &text,
 		const Common::Rect &area, Graphics::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV,
 		int deltax, bool elipsis, const Common::Rect &textDrawableArea = Common::Rect(0, 0, 0, 0)) override;
+	void drawString(const Graphics::Font *font, const Common::U32String &text,
+		const Common::Rect &area, Graphics::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV,
+		int deltax, bool elipsis, const Common::Rect &textDrawableArea = Common::Rect(0, 0, 0, 0)) override;
 
 	void setFgColor(uint8 r, uint8 g, uint8 b) override { _fgColor = _format.RGBToColor(r, g, b); }
 	void setBgColor(uint8 r, uint8 g, uint8 b) override { _bgColor = _format.RGBToColor(r, g, b); }


Commit: 2745d51fe70a9457a64492af5c4678968f1f74dd
    https://github.com/scummvm/scummvm/commit/2745d51fe70a9457a64492af5c4678968f1f74dd
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: make convertBidiString take in and return u32strings

Changed paths:
    common/translation.cpp
    common/translation.h


diff --git a/common/translation.cpp b/common/translation.cpp
index 4290b163a1..6f1029fa0b 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -463,6 +463,17 @@ String TranslationManager::convertBiDiString(const String &input) {
 	return Common::convertBiDiString(input, HE_ISR);
 }
 
+U32String TranslationManager::convertBiDiString(const U32String &input) {
+	if (getCurrentLanguage() != "he")		//TODO: modify when we'll support other RTL languages, such as Arabic and Farsi
+		return input;
+
+	if (getCurrentCharset() != "iso-8859-8") {
+		warning("convertBiDiString: Unexpected charset is used with %s language: %s", getCurrentLanguage().c_str(), getCurrentCharset().c_str());
+		return input;
+	};
+
+	return Common::convertBiDiU32String(input);
+}
 
 } // End of namespace Common
 
diff --git a/common/translation.h b/common/translation.h
index f711316d70..eab0b8705f 100644
--- a/common/translation.h
+++ b/common/translation.h
@@ -181,6 +181,7 @@ public:
 	 * For RTL (Right To Left) languages, returns visual representation of a logical single-line input
 	 */
 	String convertBiDiString(const String &input);
+	U32String convertBiDiString(const U32String &input);
 
 private:
 	/**


Commit: aafade4507195de1ab3718f5d907f7441fc9df8d
    https://github.com/scummvm/scummvm/commit/aafade4507195de1ab3718f5d907f7441fc9df8d
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Shift most widgets to draw with u32

- ButtonWidgets (Button, Radio, Checkbox, dropdown)
- StaticTextWidgets
- PopUpWidgets
- Tabs
- Add a temporary overloaded drawDDText function to make other widgets draw normally

Changed paths:
    backends/keymapper/remap-widget.cpp
    engines/dialogs.cpp
    gui/ThemeEngine.cpp
    gui/ThemeEngine.h
    gui/about.cpp
    gui/browser.cpp
    gui/chooser.cpp
    gui/downloaddialog.cpp
    gui/editgamedialog.cpp
    gui/filebrowser-dialog.cpp
    gui/launcher.cpp
    gui/massadd.cpp
    gui/message.cpp
    gui/options.cpp
    gui/predictivedialog.cpp
    gui/remotebrowser.cpp
    gui/saveload-dialog.cpp
    gui/themebrowser.cpp
    gui/unknown-game-dialog.cpp
    gui/widget.cpp
    gui/widget.h
    gui/widgets/popup.cpp
    gui/widgets/popup.h
    gui/widgets/tab.cpp
    gui/widgets/tab.h


diff --git a/backends/keymapper/remap-widget.cpp b/backends/keymapper/remap-widget.cpp
index 92ff46ee79..c40ee94f99 100644
--- a/backends/keymapper/remap-widget.cpp
+++ b/backends/keymapper/remap-widget.cpp
@@ -219,7 +219,7 @@ void RemapWidget::startRemapping(uint actionIndex) {
 	_remapTimeout = g_system->getMillis() + kRemapTimeoutDelay;
 	_remapInputWatcher->startWatching();
 
-	_actions[actionIndex].keyButton->setLabel("...");
+	_actions[actionIndex].keyButton->setLabel(Common::convertToU32String("..."));
 	_actions[actionIndex].keyButton->setTooltip("");
 	_actions[actionIndex].keyButton->markAsDirty();
 
@@ -278,12 +278,12 @@ void RemapWidget::refreshKeymap() {
 		ActionRow &row = _actions[i];
 
 		if (!row.actionText) {
-			row.actionText = new GUI::StaticTextWidget(widgetsBoss(), 0, 0, 0, 0, "", Graphics::kTextAlignStart, nullptr, GUI::ThemeEngine::kFontStyleNormal);
+			row.actionText = new GUI::StaticTextWidget(widgetsBoss(), 0, 0, 0, 0, Common::convertToU32String(""), Graphics::kTextAlignStart, nullptr, GUI::ThemeEngine::kFontStyleNormal);
 			row.actionText->setLabel(row.action->description);
 
-			row.keyButton = new GUI::DropdownButtonWidget(widgetsBoss(), 0, 0, 0, 0, "", nullptr, kRemapCmd + i);
-			row.keyButton->appendEntry(_("Reset to defaults"), kResetActionCmd + i);
-			row.keyButton->appendEntry(_("Clear mapping"), kClearCmd + i);
+			row.keyButton = new GUI::DropdownButtonWidget(widgetsBoss(), 0, 0, 0, 0, Common::convertToU32String(""), nullptr, kRemapCmd + i);
+			row.keyButton->appendEntry(Common::convertToU32String(_("Reset to defaults")), kResetActionCmd + i);
+			row.keyButton->appendEntry(Common::convertToU32String(_("Clear mapping")), kClearCmd + i);
 		}
 
 		Array<HardwareInput> mappedInputs = row.keymap->getActionMapping(row.action);
@@ -301,17 +301,17 @@ void RemapWidget::refreshKeymap() {
 			row.keyButton->setLabel(keysLabel);
 			row.keyButton->setTooltip(keysLabel);
 		} else {
-			row.keyButton->setLabel("-");
+			row.keyButton->setLabel(Common::convertToU32String("-"));
 			row.keyButton->setTooltip("");
 		}
 
 		KeymapTitleRow &keymapTitle = _keymapSeparators[row.keymap];
 		if (!keymapTitle.descriptionText) {
 			keymapTitle.descriptionText = new GUI::StaticTextWidget(widgetsBoss(), 0, 0, 0, 0, row.keymap->getDescription(), Graphics::kTextAlignStart);
-			keymapTitle.resetButton = new GUI::ButtonWidget(widgetsBoss(), 0, 0, 0, 0, "", nullptr, kResetKeymapCmd + i);
+			keymapTitle.resetButton = new GUI::ButtonWidget(widgetsBoss(), 0, 0, 0, 0, Common::convertToU32String(""), nullptr, kResetKeymapCmd + i);
 
 			// I18N: Button to reset keymap mappings to defaults
-			keymapTitle.resetButton->setLabel(_("Reset"));
+			keymapTitle.resetButton->setLabel(Common::convertToU32String(_("Reset")));
 			keymapTitle.resetButton->setTooltip(_("Reset to defaults"));
 		}
 	}
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 477c0bd20e..7455c6f52e 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -59,7 +59,7 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
 		_logo->useThemeTransparency(true);
 		_logo->setGfx(g_gui.theme()->getImageSurface(GUI::ThemeEngine::kImageLogoSmall));
 	} else {
-		GUI::StaticTextWidget *title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
+		GUI::StaticTextWidget *title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", Common::convertToU32String("ScummVM"));
 		title->setAlign(Graphics::kTextAlignCenter);
 	}
 #else
@@ -67,36 +67,36 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
 	title->setAlign(Graphics::kTextAlignCenter);
 #endif
 
-	GUI::StaticTextWidget *version = new GUI::StaticTextWidget(this, "GlobalMenu.Version", gScummVMVersionDate);
+	GUI::StaticTextWidget *version = new GUI::StaticTextWidget(this, "GlobalMenu.Version", Common::convertToU32String(gScummVMVersionDate));
 	version->setAlign(Graphics::kTextAlignCenter);
 
-	new GUI::ButtonWidget(this, "GlobalMenu.Resume", _("~R~esume"), 0, kPlayCmd, 'P');
+	new GUI::ButtonWidget(this, "GlobalMenu.Resume", Common::convertToU32String(_("~R~esume")), 0, kPlayCmd, 'P');
 
-	_loadButton = new GUI::ButtonWidget(this, "GlobalMenu.Load", _("~L~oad"), 0, kLoadCmd);
+	_loadButton = new GUI::ButtonWidget(this, "GlobalMenu.Load", Common::convertToU32String(_("~L~oad")), 0, kLoadCmd);
 	_loadButton->setVisible(_engine->hasFeature(Engine::kSupportsLoadingDuringRuntime));
 	_loadButton->setEnabled(_engine->hasFeature(Engine::kSupportsLoadingDuringRuntime));
 
-	_saveButton = new GUI::ButtonWidget(this, "GlobalMenu.Save", _("~S~ave"), 0, kSaveCmd);
+	_saveButton = new GUI::ButtonWidget(this, "GlobalMenu.Save", Common::convertToU32String(_("~S~ave")), 0, kSaveCmd);
 	_saveButton->setVisible(_engine->hasFeature(Engine::kSupportsSavingDuringRuntime));
 	_saveButton->setEnabled(_engine->hasFeature(Engine::kSupportsSavingDuringRuntime));
 
-	new GUI::ButtonWidget(this, "GlobalMenu.Options", _("~O~ptions"), 0, kOptionsCmd);
+	new GUI::ButtonWidget(this, "GlobalMenu.Options", Common::convertToU32String(_("~O~ptions")), 0, kOptionsCmd);
 
 	// The help button is disabled by default.
 	// To enable "Help", an engine needs to use a subclass of MainMenuDialog
 	// (at least for now, we might change how this works in the future).
-	_helpButton = new GUI::ButtonWidget(this, "GlobalMenu.Help", _("~H~elp"), 0, kHelpCmd);
+	_helpButton = new GUI::ButtonWidget(this, "GlobalMenu.Help", Common::convertToU32String(_("~H~elp")), 0, kHelpCmd);
 
-	new GUI::ButtonWidget(this, "GlobalMenu.About", _("~A~bout"), 0, kAboutCmd);
+	new GUI::ButtonWidget(this, "GlobalMenu.About", Common::convertToU32String(_("~A~bout")), 0, kAboutCmd);
 
 	if (g_system->getOverlayWidth() > 320)
-		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", _("~R~eturn to Launcher"), 0, kLauncherCmd);
+		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", Common::convertToU32String(_("~R~eturn to Launcher")), 0, kLauncherCmd);
 	else
-		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", _c("~R~eturn to Launcher", "lowres"), 0, kLauncherCmd);
+		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", Common::convertToU32String(_c("~R~eturn to Launcher", "lowres")), 0, kLauncherCmd);
 	_returnToLauncherButton->setEnabled(_engine->hasFeature(Engine::kSupportsReturnToLauncher));
 
 	if (!g_system->hasFeature(OSystem::kFeatureNoQuit))
-		new GUI::ButtonWidget(this, "GlobalMenu.Quit", _("~Q~uit"), 0, kQuitCmd);
+		new GUI::ButtonWidget(this, "GlobalMenu.Quit", Common::convertToU32String(_("~Q~uit")), 0, kQuitCmd);
 
 	_aboutDialog = new GUI::AboutDialog();
 	_loadDialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false);
@@ -166,9 +166,9 @@ void MainMenuDialog::reflowLayout() {
 	// FIXME: it might be better to declare GUI::StaticTextWidget::setLabel() virtual
 	// and to reimplement it in GUI::ButtonWidget to handle the hotkey.
 	if (g_system->getOverlayWidth() > 320)
-		_returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(_("~R~eturn to Launcher")));
+		_returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(Common::convertToU32String(_("~R~eturn to Launcher"))));
 	else
-		_returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(_c("~R~eturn to Launcher", "lowres")));
+		_returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(Common::convertToU32String(_c("~R~eturn to Launcher", "lowres"))));
 
 #ifndef DISABLE_FANCY_THEMES
 	if (g_gui.xmlEval()->getVar("Globals.ShowGlobalMenuLogo", 0) == 1 && g_gui.theme()->supportsImages()) {
@@ -186,7 +186,7 @@ void MainMenuDialog::reflowLayout() {
 	} else {
 		GUI::StaticTextWidget *title = (GUI::StaticTextWidget *)findWidget("GlobalMenu.Title");
 		if (!title) {
-			title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
+			title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", Common::convertToU32String("ScummVM"));
 			title->setAlign(Graphics::kTextAlignCenter);
 		}
 
@@ -282,7 +282,7 @@ ConfigDialog::ConfigDialog() :
 	// The game specific options tab
 	//
 
-	int tabId = tab->addTab(_("Game"), "GlobalConfig_Engine");
+	int tabId = tab->addTab(Common::convertToU32String(_("Game")), "GlobalConfig_Engine");
 
 	if (g_engine->hasFeature(Engine::kSupportsChangingOptionsDuringRuntime)) {
 		_engineOptions = metaEngine.buildEngineOptionsWidget(tab, "GlobalConfig_Engine.Container", gameDomain);
@@ -298,7 +298,7 @@ ConfigDialog::ConfigDialog() :
 	// The Audio / Subtitles tab
 	//
 
-	tab->addTab(_("Audio"), "GlobalConfig_Audio");
+	tab->addTab(Common::convertToU32String(_("Audio")), "GlobalConfig_Audio");
 
 	//
 	// Sound controllers
@@ -323,7 +323,7 @@ ConfigDialog::ConfigDialog() :
 
 	Common::KeymapArray keymaps = metaEngine.initKeymaps(gameDomain.c_str());
 	if (!keymaps.empty()) {
-		tab->addTab(_("Keymaps"), "GlobalConfig_KeyMapper");
+		tab->addTab(Common::convertToU32String(_("Keymaps")), "GlobalConfig_KeyMapper");
 		addKeyMapperControls(tab, "GlobalConfig_KeyMapper.", keymaps, gameDomain);
 	}
 
@@ -332,7 +332,7 @@ ConfigDialog::ConfigDialog() :
 	//
 	Common::AchievementsInfo achievementsInfo = metaEngine.getAchievementsInfo(gameDomain);
 	if (achievementsInfo.descriptions.size() > 0) {
-		tab->addTab(_("Achievements"), "GlobalConfig_Achievements");
+		tab->addTab(Common::convertToU32String(_("Achievements")), "GlobalConfig_Achievements");
 		addAchievementsControls(tab, "GlobalConfig_Achievements.", achievementsInfo);
 	}
 
@@ -343,8 +343,8 @@ ConfigDialog::ConfigDialog() :
 	// Add the buttons
 	//
 
-	new GUI::ButtonWidget(this, "GlobalConfig.Ok", _("~O~K"), 0, GUI::kOKCmd);
-	new GUI::ButtonWidget(this, "GlobalConfig.Cancel", _("~C~ancel"), 0, GUI::kCloseCmd);
+	new GUI::ButtonWidget(this, "GlobalConfig.Ok", Common::convertToU32String(_("~O~K")), 0, GUI::kOKCmd);
+	new GUI::ButtonWidget(this, "GlobalConfig.Cancel", Common::convertToU32String(_("~C~ancel")), 0, GUI::kCloseCmd);
 
 #ifdef GUI_ENABLE_KEYSDIALOG
 	new GUI::ButtonWidget(this, "GlobalConfig.Keys", _("~K~eys"), 0, kKeysCmd);
@@ -408,7 +408,7 @@ ExtraGuiOptionsWidget::ExtraGuiOptionsWidget(GuiObject *containerBoss, const Com
 	for (iter = _options.begin(); iter != _options.end(); ++iter, ++i) {
 		Common::String id = Common::String::format("%d", i);
 		_checkboxes.push_back(new CheckboxWidget(widgetsBoss(),
-			_dialogLayout + ".customOption" + id + "Checkbox", _(iter->label), _(iter->tooltip)));
+			_dialogLayout + ".customOption" + id + "Checkbox", Common::convertToU32String(_(iter->label)), _(iter->tooltip)));
 	}
 }
 
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index cb48ce3d4a..4121dad173 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -940,10 +940,44 @@ void ThemeEngine::drawDDText(TextData type, TextColor color, const Common::Rect
 	addDirtyRect(dirty);
 }
 
+void ThemeEngine::drawDDText(TextData type, TextColor color, const Common::Rect &r, const Common::U32String &text,
+	bool restoreBg, bool ellipsis, Graphics::TextAlign alignH, TextAlignVertical alignV,
+	int deltax, const Common::Rect &drawableTextArea) {
+
+	if (type == kTextDataNone || !_texts[type] || _layerToDraw == kDrawLayerBackground)
+		return;
+
+	Common::Rect area = r;
+	area.clip(_screen.w, _screen.h);
+
+	Common::Rect dirty = drawableTextArea;
+	if (dirty.isEmpty()) dirty = area;
+	else dirty.clip(area);
+
+	if (!_clip.isEmpty()) {
+		dirty.clip(_clip);
+	}
+
+	// HACK: One small pixel should be invisible enough
+	if (dirty.isEmpty()) dirty = Common::Rect(0, 0, 1, 1);
+
+	if (restoreBg)
+		restoreBackground(dirty);
+
+	_vectorRenderer->setFgColor(_textColors[color]->r, _textColors[color]->g, _textColors[color]->b);
+#ifdef USE_TRANSLATION
+	_vectorRenderer->drawString(_texts[type]->_fontPtr, TransMan.convertBiDiString(text), area, alignH, alignV, deltax, ellipsis, dirty);
+#else
+	_vectorRenderer->drawString(_texts[type]->_fontPtr, text, area, alignH, alignV, deltax, ellipsis, dirty);
+#endif
+
+	addDirtyRect(dirty);
+}
+
 /**********************************************************
  * Widget drawing functions
  *********************************************************/
-void ThemeEngine::drawButton(const Common::Rect &r, const Common::String &str, WidgetStateInfo state, uint16 hints) {
+void ThemeEngine::drawButton(const Common::Rect &r, const Common::U32String &str, WidgetStateInfo state, uint16 hints) {
 	if (!ready())
 		return;
 
@@ -963,7 +997,7 @@ void ThemeEngine::drawButton(const Common::Rect &r, const Common::String &str, W
 	           _widgets[dd]->_textAlignV);
 }
 
-void ThemeEngine::drawDropDownButton(const Common::Rect &r, uint32 dropdownWidth, const Common::String &str,
+void ThemeEngine::drawDropDownButton(const Common::Rect &r, uint32 dropdownWidth, const Common::U32String &str,
                                      ThemeEngine::WidgetStateInfo buttonState, bool inButton, bool inDropdown, bool rtl) {
 	if (!ready())
 		return;
@@ -1000,7 +1034,7 @@ void ThemeEngine::drawLineSeparator(const Common::Rect &r) {
 	drawDD(kDDSeparator, r);
 }
 
-void ThemeEngine::drawCheckbox(const Common::Rect &r, const Common::String &str, bool checked, WidgetStateInfo state, bool rtl) {
+void ThemeEngine::drawCheckbox(const Common::Rect &r, const Common::U32String &str, bool checked, WidgetStateInfo state, bool rtl) {
 	if (!ready())
 		return;
 
@@ -1035,7 +1069,7 @@ void ThemeEngine::drawCheckbox(const Common::Rect &r, const Common::String &str,
 	}
 }
 
-void ThemeEngine::drawRadiobutton(const Common::Rect &r, const Common::String &str, bool checked, WidgetStateInfo state, bool rtl) {
+void ThemeEngine::drawRadiobutton(const Common::Rect &r, const Common::U32String &str, bool checked, WidgetStateInfo state, bool rtl) {
 	if (!ready())
 		return;
 
@@ -1161,7 +1195,7 @@ void ThemeEngine::drawCaret(const Common::Rect &r, bool erase) {
 		drawDD(kDDCaret, r);
 }
 
-void ThemeEngine::drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax, WidgetStateInfo state, bool rtl) {
+void ThemeEngine::drawPopUpWidget(const Common::Rect &r, const Common::U32String &sel, int deltax, WidgetStateInfo state, bool rtl) {
 	if (!ready())
 		return;
 
@@ -1228,7 +1262,7 @@ void ThemeEngine::drawWidgetBackground(const Common::Rect &r, WidgetBackground b
 }
 
 void ThemeEngine::drawTab(const Common::Rect &r, int tabHeight, const Common::Array<int> &tabWidths,
-                          const Common::Array<Common::String> &tabs, int active, bool rtl) {
+                          const Common::Array<Common::U32String> &tabs, int active, bool rtl) {
 	if (!ready())
 		return;
 
@@ -1279,7 +1313,7 @@ void ThemeEngine::drawTab(const Common::Rect &r, int tabHeight, const Common::Ar
 	}
 }
 
-void ThemeEngine::drawText(const Common::Rect &r, const Common::String &str, WidgetStateInfo state,
+void ThemeEngine::drawText(const Common::Rect &r, const Common::U32String &str, WidgetStateInfo state,
                            Graphics::TextAlign align, TextInversionState inverted, int deltax, bool useEllipsis,
                            FontStyle font, FontColor color, bool restore, const Common::Rect &drawableTextArea) {
 	if (!ready())
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 44c35f7e80..5f0d63fcd0 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -416,28 +416,28 @@ public:
 
 	void drawWidgetBackground(const Common::Rect &r, WidgetBackground background);
 
-	void drawButton(const Common::Rect &r, const Common::String &str, WidgetStateInfo state = kStateEnabled,
+	void drawButton(const Common::Rect &r, const Common::U32String &str, WidgetStateInfo state = kStateEnabled,
 	                uint16 hints = 0);
 
-	void drawDropDownButton(const Common::Rect &r, uint32 dropdownWidth, const Common::String &str,
+	void drawDropDownButton(const Common::Rect &r, uint32 dropdownWidth, const Common::U32String &str,
 	                        WidgetStateInfo buttonState, bool inButton, bool inDropdown, bool rtl = false);
 
 	void drawSurface(const Common::Point &p, const Graphics::Surface &surface, bool themeTrans = false);
 
 	void drawSlider(const Common::Rect &r, int width, WidgetStateInfo state = kStateEnabled, bool rtl = false);
 
-	void drawCheckbox(const Common::Rect &r, const Common::String &str, bool checked,
+	void drawCheckbox(const Common::Rect &r, const Common::U32String &str, bool checked,
 	                  WidgetStateInfo state = kStateEnabled, bool rtl = false);
 
-	void drawRadiobutton(const Common::Rect &r, const Common::String &str, bool checked,
+	void drawRadiobutton(const Common::Rect &r, const Common::U32String &str, bool checked,
 	                     WidgetStateInfo state = kStateEnabled, bool rtl = false);
 
 	void drawTab(const Common::Rect &r, int tabHeight, const Common::Array<int> &tabWidths,
-	             const Common::Array<Common::String> &tabs, int active, bool rtl = false);
+	             const Common::Array<Common::U32String> &tabs, int active, bool rtl = false);
 
 	void drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, ScrollbarState scrollState);
 
-	void drawPopUpWidget(const Common::Rect &r, const Common::String &sel, int deltax,
+	void drawPopUpWidget(const Common::Rect &r, const Common::U32String &sel, int deltax,
 	                     WidgetStateInfo state = kStateEnabled, bool rtl = false);
 
 	void drawCaret(const Common::Rect &r, bool erase);
@@ -446,7 +446,7 @@ public:
 
 	void drawDialogBackground(const Common::Rect &r, DialogBackground type);
 
-	void drawText(const Common::Rect &r, const Common::String &str, WidgetStateInfo state = kStateEnabled,
+	void drawText(const Common::Rect &r, const Common::U32String &str, WidgetStateInfo state = kStateEnabled,
 	              Graphics::TextAlign align = Graphics::kTextAlignCenter,
 	              TextInversionState inverted = kTextInversionNone, int deltax = 0, bool useEllipsis = true,
 	              FontStyle font = kFontStyleBold, FontColor color = kFontColorNormal, bool restore = true,
@@ -660,6 +660,10 @@ protected:
 	                bool elipsis, Graphics::TextAlign alignH = Graphics::kTextAlignLeft,
 	                TextAlignVertical alignV = kTextAlignVTop, int deltax = 0,
 	                const Common::Rect &drawableTextArea = Common::Rect(0, 0, 0, 0));
+	void drawDDText(TextData type, TextColor color, const Common::Rect &r, const Common::U32String &text, bool restoreBg,
+	                bool elipsis, Graphics::TextAlign alignH = Graphics::kTextAlignLeft,
+	                TextAlignVertical alignV = kTextAlignVTop, int deltax = 0,
+	                const Common::Rect &drawableTextArea = Common::Rect(0, 0, 0, 0));
 
 	/**
 	 * DEBUG: Draws a white square and writes some text next to it.
diff --git a/gui/about.cpp b/gui/about.cpp
index a8adaf365f..3e81b49e60 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -251,7 +251,7 @@ void AboutDialog::drawDialog(DrawLayer layerToDraw) {
 
 		if (*str)
 			g_gui.theme()->drawText(Common::Rect(_x + _xOff, y, _x + _w - _xOff, y + g_gui.theme()->getFontHeight()),
-			                        str, state, align, ThemeEngine::kTextInversionNone, 0, false,
+									Common::convertToU32String(str), state, align, ThemeEngine::kTextInversionNone, 0, false,
 			                        ThemeEngine::kFontStyleBold, ThemeEngine::kFontColorNormal, true, _textDrawableArea);
 		y += _lineHeight;
 	}
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 5ff18eb285..65e9d9081b 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -59,7 +59,7 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
 	_showHidden = false;
 
 	// Headline - TODO: should be customizable during creation time
-	new StaticTextWidget(this, "Browser.Headline", title);
+	new StaticTextWidget(this, "Browser.Headline", Common::convertToU32String(title));
 
 	// Current path - TODO: handle long paths ?
 	_currentPath = new EditTextWidget(this, "Browser.Path", "", nullptr, 0, kPathEditedCmd);
@@ -72,15 +72,15 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
 	// Checkbox for the "show hidden files" state.
-	_showHiddenWidget = new CheckboxWidget(this, "Browser.Hidden", _("Show hidden files"), _("Show files marked with the hidden attribute"), kHiddenCmd);
+	_showHiddenWidget = new CheckboxWidget(this, "Browser.Hidden", Common::convertToU32String(_("Show hidden files")), _("Show files marked with the hidden attribute"), kHiddenCmd);
 
 	// Buttons
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(this, "Browser.Up", _("Go up"), _("Go to previous directory level"), kGoUpCmd);
+		new ButtonWidget(this, "Browser.Up", Common::convertToU32String(_("Go up")), _("Go to previous directory level"), kGoUpCmd);
 	else
-		new ButtonWidget(this, "Browser.Up", _c("Go up", "lowres"), _("Go to previous directory level"), kGoUpCmd);
-	new ButtonWidget(this, "Browser.Cancel", _("Cancel"), nullptr, kCloseCmd);
-	new ButtonWidget(this, "Browser.Choose", _("Choose"), nullptr, kChooseCmd);
+		new ButtonWidget(this, "Browser.Up", Common::convertToU32String(_c("Go up", "lowres")), _("Go to previous directory level"), kGoUpCmd);
+	new ButtonWidget(this, "Browser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
+	new ButtonWidget(this, "Browser.Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
 }
 
 int BrowserDialog::runModal() {
diff --git a/gui/chooser.cpp b/gui/chooser.cpp
index 798689b3cd..0e15452262 100644
--- a/gui/chooser.cpp
+++ b/gui/chooser.cpp
@@ -43,8 +43,8 @@ ChooserDialog::ChooserDialog(const String &title, String dialogId)
 	_list->setEditable(false);
 
 	// Buttons
-	new ButtonWidget(this, dialogId + ".Cancel", _("Cancel"), nullptr, kCloseCmd);
-	_chooseButton = new ButtonWidget(this, dialogId + ".Choose", _("Choose"), nullptr, kChooseCmd);
+	new ButtonWidget(this, dialogId + ".Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
+	_chooseButton = new ButtonWidget(this, dialogId + ".Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
 	_chooseButton->setEnabled(false);
 }
 
diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp
index db2f30d5d9..ba364e86ef 100644
--- a/gui/downloaddialog.cpp
+++ b/gui/downloaddialog.cpp
@@ -49,8 +49,8 @@ DownloadDialog::DownloadDialog(uint32 storageId, LauncherDialog *launcher) :
 	_browser = new BrowserDialog(_("Select directory where to download game data"), true);
 	_remoteBrowser = new RemoteBrowserDialog(_("Select directory with game data"));
 
-	_remoteDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.RemoteDirectory", _("From: "));
-	_localDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.LocalDirectory", _("To: "));
+	_remoteDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.RemoteDirectory", Common::convertToU32String(_("From: ")));
+	_localDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.LocalDirectory", Common::convertToU32String(_("To: ")));
 	uint32 progress = (uint32)(100 * CloudMan.getDownloadingProgress());
 	_progressBar = new SliderWidget(this, "GlobalOptions_Cloud_DownloadDialog.ProgressBar");
 	_progressBar->setMinValue(0);
@@ -58,14 +58,14 @@ DownloadDialog::DownloadDialog(uint32 storageId, LauncherDialog *launcher) :
 	_progressBar->setValue(progress);
 	_progressBar->setEnabled(false);
 	_percentLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.PercentText", Common::String::format("%u %%", progress));
-	_downloadSizeLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSize", "");
-	_downloadSpeedLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSpeed", "");
+	_downloadSizeLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSize", Common::convertToU32String(""));
+	_downloadSpeedLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSpeed", Common::convertToU32String(""));
 	if (g_system->getOverlayWidth() > 320)
-		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", _("Cancel download"), nullptr, kDownloadDialogButtonCmd);
+		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", Common::convertToU32String(_("Cancel download")), nullptr, kDownloadDialogButtonCmd);
 	else
-		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", _c("Cancel download", "lowres"), nullptr, kDownloadDialogButtonCmd);
+		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", Common::convertToU32String(_c("Cancel download", "lowres")), nullptr, kDownloadDialogButtonCmd);
 
-	_closeButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.CloseButton", _("Hide"), nullptr, kCloseCmd);
+	_closeButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.CloseButton", Common::convertToU32String(_("Hide")), nullptr, kCloseCmd);
 	refreshWidgets();
 
 	CloudMan.setDownloadTarget(this);
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index b3ee5509b1..1572910f72 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -132,44 +132,44 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	// 1) The game tab
 	//
-	tab->addTab(_("Game"), "GameOptions_Game");
+	tab->addTab(Common::convertToU32String(_("Game")), "GameOptions_Game");
 
 	// GUI:  Label & edit widget for the game ID
 	if (g_system->getOverlayWidth() > 320)
-		new StaticTextWidget(tab, "GameOptions_Game.Id", _("ID:"), _("Short game identifier used for referring to saved games and running the game from the command line"));
+		new StaticTextWidget(tab, "GameOptions_Game.Id", Common::convertToU32String(_("ID:")), _("Short game identifier used for referring to saved games and running the game from the command line"));
 	else
-		new StaticTextWidget(tab, "GameOptions_Game.Id", _c("ID:", "lowres"), _("Short game identifier used for referring to saved games and running the game from the command line"));
+		new StaticTextWidget(tab, "GameOptions_Game.Id", Common::convertToU32String(_c("ID:", "lowres")), _("Short game identifier used for referring to saved games and running the game from the command line"));
 	_domainWidget = new DomainEditTextWidget(tab, "GameOptions_Game.Domain", _domain, _("Short game identifier used for referring to saved games and running the game from the command line"));
 
 	// GUI:  Label & edit widget for the description
 	if (g_system->getOverlayWidth() > 320)
-		new StaticTextWidget(tab, "GameOptions_Game.Name", _("Name:"), _("Full title of the game"));
+		new StaticTextWidget(tab, "GameOptions_Game.Name", Common::convertToU32String(_("Name:")), _("Full title of the game"));
 	else
-		new StaticTextWidget(tab, "GameOptions_Game.Name", _c("Name:", "lowres"), _("Full title of the game"));
+		new StaticTextWidget(tab, "GameOptions_Game.Name", Common::convertToU32String(_c("Name:", "lowres")), _("Full title of the game"));
 	_descriptionWidget = new EditTextWidget(tab, "GameOptions_Game.Desc", description, _("Full title of the game"));
 
 	// Language popup
-	_langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", _("Language:"), _("Language of the game. This will not turn your Spanish game version into English"));
+	_langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", Common::convertToU32String(_("Language:")), _("Language of the game. This will not turn your Spanish game version into English"));
 	_langPopUp = new PopUpWidget(tab, "GameOptions_Game.LangPopup", _("Language of the game. This will not turn your Spanish game version into English"));
-	_langPopUp->appendEntry(_("<default>"), (uint32)Common::UNK_LANG);
-	_langPopUp->appendEntry("", (uint32)Common::UNK_LANG);
+	_langPopUp->appendEntry(Common::convertToU32String(_("<default>")), (uint32)Common::UNK_LANG);
+	_langPopUp->appendEntry(Common::convertToU32String(""), (uint32)Common::UNK_LANG);
 	const Common::LanguageDescription *l = Common::g_languages;
 	for (; l->code; ++l) {
 		if (checkGameGUIOptionLanguage(l->id, _guioptionsString))
-			_langPopUp->appendEntry(l->description, l->id);
+			_langPopUp->appendEntry(Common::convertToU32String(l->description), l->id);
 	}
 
 	// Platform popup
 	if (g_system->getOverlayWidth() > 320)
-		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", _("Platform:"), _("Platform the game was originally designed for"));
+		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", Common::convertToU32String(_("Platform:")), _("Platform the game was originally designed for"));
 	else
-		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", _c("Platform:", "lowres"), _("Platform the game was originally designed for"));
+		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", Common::convertToU32String(_c("Platform:", "lowres")), _("Platform the game was originally designed for"));
 	_platformPopUp = new PopUpWidget(tab, "GameOptions_Game.PlatformPopup", _("Platform the game was originally designed for"));
-	_platformPopUp->appendEntry(_("<default>"));
-	_platformPopUp->appendEntry("");
+	_platformPopUp->appendEntry(Common::convertToU32String(_("<default>")));
+	_platformPopUp->appendEntry(Common::convertToU32String(""));
 	const Common::PlatformDescription *p = Common::g_platforms;
 	for (; p->code; ++p) {
-		_platformPopUp->appendEntry(p->description, p->id);
+		_platformPopUp->appendEntry(Common::convertToU32String(p->description), p->id);
 	}
 
 	//
@@ -177,7 +177,7 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 
 	if (plugin) {
-		int tabId = tab->addTab(_("Engine"), "GameOptions_Engine");
+		int tabId = tab->addTab(Common::convertToU32String(_("Engine")), "GameOptions_Engine");
 
 		const MetaEngine &metaEngine = plugin->get<MetaEngine>();
 		metaEngine.registerDefaultSettings(_domain);
@@ -193,15 +193,15 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	// 3) The graphics tab
 	//
-	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX"), "GameOptions_Graphics");
+	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? Common::convertToU32String(_("Graphics")) : Common::convertToU32String(_("GFX")), "GameOptions_Graphics");
 	ScrollContainerWidget *graphicsContainer = new ScrollContainerWidget(tab, "GameOptions_Graphics.Container", "GameOptions_Graphics_Container", kGraphicsTabContainerReflowCmd);
 	graphicsContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
 	graphicsContainer->setTarget(this);
 
 	if (g_system->getOverlayWidth() > 320)
-		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", _("Override global graphic settings"), nullptr, kCmdGlobalGraphicsOverride);
+		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", Common::convertToU32String(_("Override global graphic settings")), nullptr, kCmdGlobalGraphicsOverride);
 	else
-		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", _c("Override global graphic settings", "lowres"), nullptr, kCmdGlobalGraphicsOverride);
+		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", Common::convertToU32String(_c("Override global graphic settings", "lowres")), nullptr, kCmdGlobalGraphicsOverride);
 
 	addGraphicControls(graphicsContainer, "GameOptions_Graphics_Container.");
 
@@ -211,12 +211,12 @@ EditGameDialog::EditGameDialog(const String &domain)
 
 	_globalShaderOverride = nullptr;
 	if (g_system->hasFeature(OSystem::kFeatureShader)) {
-		tab->addTab(_("Shader"), "GameOptions_Shader");
+		tab->addTab(Common::convertToU32String(_("Shader")), "GameOptions_Shader");
 
 		if (g_system->getOverlayWidth() > 320)
-			_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", _("Override global shader settings"), nullptr, kCmdGlobalShaderOverride);
+			_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", Common::convertToU32String(_("Override global shader settings")), nullptr, kCmdGlobalShaderOverride);
 		else
-			_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", _c("Override global shader settings", "lowres"), nullptr, kCmdGlobalShaderOverride);
+			_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", Common::convertToU32String(_c("Override global shader settings", "lowres")), nullptr, kCmdGlobalShaderOverride);
 
 		addShaderControls(tab, "GameOptions_Shader.");
 	}
@@ -230,19 +230,19 @@ EditGameDialog::EditGameDialog(const String &domain)
 	}
 
 	if (!keymaps.empty()) {
-		tab->addTab(_("Keymaps"), "GameOptions_KeyMapper");
+		tab->addTab(Common::convertToU32String(_("Keymaps")), "GameOptions_KeyMapper");
 		addKeyMapperControls(tab, "GameOptions_KeyMapper.", keymaps, domain);
 	}
 
 	//
 	// 4) The audio tab
 	//
-	tab->addTab(_("Audio"), "GameOptions_Audio");
+	tab->addTab(Common::convertToU32String(_("Audio")), "GameOptions_Audio");
 
 	if (g_system->getOverlayWidth() > 320)
-		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", _("Override global audio settings"), nullptr, kCmdGlobalAudioOverride);
+		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", Common::convertToU32String(_("Override global audio settings")), nullptr, kCmdGlobalAudioOverride);
 	else
-		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", _c("Override global audio settings", "lowres"), nullptr, kCmdGlobalAudioOverride);
+		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", Common::convertToU32String(_c("Override global audio settings", "lowres")), nullptr, kCmdGlobalAudioOverride);
 
 	addAudioControls(tab, "GameOptions_Audio.");
 	addSubtitleControls(tab, "GameOptions_Audio.");
@@ -251,14 +251,14 @@ EditGameDialog::EditGameDialog(const String &domain)
 	// 5) The volume tab
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(_("Volume"), "GameOptions_Volume");
+		tab->addTab(Common::convertToU32String(_("Volume")), "GameOptions_Volume");
 	else
-		tab->addTab(_c("Volume", "lowres"), "GameOptions_Volume");
+		tab->addTab(Common::convertToU32String(_c("Volume", "lowres")), "GameOptions_Volume");
 
 	if (g_system->getOverlayWidth() > 320)
-		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", _("Override global volume settings"), nullptr, kCmdGlobalVolumeOverride);
+		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", Common::convertToU32String(_("Override global volume settings")), nullptr, kCmdGlobalVolumeOverride);
 	else
-		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", _c("Override global volume settings", "lowres"), nullptr, kCmdGlobalVolumeOverride);
+		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", Common::convertToU32String(_c("Override global volume settings", "lowres")), nullptr, kCmdGlobalVolumeOverride);
 
 	addVolumeControls(tab, "GameOptions_Volume.");
 
@@ -269,12 +269,12 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	_globalMIDIOverride = nullptr;
 	if (showMidi) {
-		tab->addTab(_("MIDI"), "GameOptions_MIDI");
+		tab->addTab(Common::convertToU32String(_("MIDI")), "GameOptions_MIDI");
 
 		if (g_system->getOverlayWidth() > 320)
-			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _("Override global MIDI settings"), nullptr, kCmdGlobalMIDIOverride);
+			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", Common::convertToU32String(_("Override global MIDI settings")), nullptr, kCmdGlobalMIDIOverride);
 		else
-			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _c("Override global MIDI settings", "lowres"), nullptr, kCmdGlobalMIDIOverride);
+			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", Common::convertToU32String(_c("Override global MIDI settings", "lowres")), nullptr, kCmdGlobalMIDIOverride);
 
 		addMIDIControls(tab, "GameOptions_MIDI.");
 	}
@@ -284,12 +284,12 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	_globalMT32Override = nullptr;
 	if (showMidi) {
-		tab->addTab(_("MT-32"), "GameOptions_MT32");
+		tab->addTab(Common::convertToU32String(_("MT-32")), "GameOptions_MT32");
 
 		if (g_system->getOverlayWidth() > 320)
-			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _("Override global MT-32 settings"), nullptr, kCmdGlobalMT32Override);
+			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", Common::convertToU32String(_("Override global MT-32 settings")), nullptr, kCmdGlobalMT32Override);
 		else
-			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _c("Override global MT-32 settings", "lowres"), nullptr, kCmdGlobalMT32Override);
+			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", Common::convertToU32String(_c("Override global MT-32 settings", "lowres")), nullptr, kCmdGlobalMT32Override);
 
 		addMT32Controls(tab, "GameOptions_MT32.");
 	}
@@ -298,34 +298,34 @@ EditGameDialog::EditGameDialog(const String &domain)
 	// 8) The Paths tab
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(_("Paths"), "GameOptions_Paths");
+		tab->addTab(Common::convertToU32String(_("Paths")), "GameOptions_Paths");
 	else
-		tab->addTab(_c("Paths", "lowres"), "GameOptions_Paths");
+		tab->addTab(Common::convertToU32String(_c("Paths", "lowres")), "GameOptions_Paths");
 
 	// These buttons have to be extra wide, or the text will be truncated
 	// in the small version of the GUI.
 
 	// GUI:  Button + Label for the game path
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _("Game Path:"), nullptr, kCmdGameBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", Common::convertToU32String(_("Game Path:")), nullptr, kCmdGameBrowser);
 	else
-		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _c("Game Path:", "lowres"), nullptr, kCmdGameBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", Common::convertToU32String(_c("Game Path:", "lowres")), nullptr, kCmdGameBrowser);
 	_gamePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.GamepathText", gamePath);
 
 	// GUI:  Button + Label for the additional path
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _("Extra Path:"), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Extrapath", Common::convertToU32String(_("Extra Path:")), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
 	else
-		new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _c("Extra Path:", "lowres"), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Extrapath", Common::convertToU32String(_c("Extra Path:", "lowres")), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
 	_extraPathWidget = new StaticTextWidget(tab, "GameOptions_Paths.ExtrapathText", extraPath, _("Specifies path to additional data used by the game"));
 
 	_extraPathClearButton = addClearButton(tab, "GameOptions_Paths.ExtraPathClearButton", kCmdExtraPathClear);
 
 	// GUI:  Button + Label for the save path
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(tab, "GameOptions_Paths.Savepath", _("Save Path:"), _("Specifies where your saved games are put"), kCmdSaveBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Savepath", Common::convertToU32String(_("Save Path:")), _("Specifies where your saved games are put"), kCmdSaveBrowser);
 	else
-		new ButtonWidget(tab, "GameOptions_Paths.Savepath", _c("Save Path:", "lowres"), _("Specifies where your saved games are put"), kCmdSaveBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Savepath", Common::convertToU32String(_c("Save Path:", "lowres")), _("Specifies where your saved games are put"), kCmdSaveBrowser);
 	_savePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.SavepathText", savePath, _("Specifies where your saved games are put"));
 
 	_savePathClearButton = addClearButton(tab, "GameOptions_Paths.SavePathClearButton", kCmdSavePathClear);
@@ -337,7 +337,7 @@ EditGameDialog::EditGameDialog(const String &domain)
 		const MetaEngine &metaEngine = plugin->get<MetaEngine>();
 		Common::AchievementsInfo achievementsInfo = metaEngine.getAchievementsInfo(domain);
 		if (achievementsInfo.descriptions.size() > 0) {
-			tab->addTab(_("Achievements"), "GameOptions_Achievements");
+			tab->addTab(Common::convertToU32String(_("Achievements")), "GameOptions_Achievements");
 			addAchievementsControls(tab, "GameOptions_Achievements.", achievementsInfo);
 		}
 	}
@@ -347,8 +347,8 @@ EditGameDialog::EditGameDialog(const String &domain)
 	_tabWidget = tab;
 
 	// Add OK & Cancel buttons
-	new ButtonWidget(this, "GameOptions.Cancel", _("Cancel"), nullptr, kCloseCmd);
-	new ButtonWidget(this, "GameOptions.Ok", _("OK"), nullptr, kOKCmd);
+	new ButtonWidget(this, "GameOptions.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
+	new ButtonWidget(this, "GameOptions.Ok", Common::convertToU32String(_("OK")), nullptr, kOKCmd);
 }
 
 void EditGameDialog::setupGraphicsTab() {
@@ -361,12 +361,12 @@ void EditGameDialog::open() {
 
 	String extraPath(ConfMan.get("extrapath", _domain));
 	if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) {
-		_extraPathWidget->setLabel(_c("None", "path"));
+		_extraPathWidget->setLabel(Common::convertToU32String(_c("None", "path")));
 	}
 
 	String savePath(ConfMan.get("savepath", _domain));
 	if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) {
-		_savePathWidget->setLabel(_("Default"));
+		_savePathWidget->setLabel(Common::convertToU32String(_("Default")));
 	}
 
 	int sel, i;
@@ -446,17 +446,17 @@ void EditGameDialog::apply() {
 	else
 		ConfMan.set("language", Common::getLanguageCode(lang), _domain);
 
-	String gamePath(_gamePathWidget->getLabel());
+	String gamePath(Common::convertFromU32String(_gamePathWidget->getLabel()));
 	if (!gamePath.empty())
 		ConfMan.set("path", gamePath, _domain);
 
-	String extraPath(_extraPathWidget->getLabel());
+	String extraPath(Common::convertFromU32String(_extraPathWidget->getLabel()));
 	if (!extraPath.empty() && (extraPath != _c("None", "path")))
 		ConfMan.set("extrapath", extraPath, _domain);
 	else
 		ConfMan.removeKey("extrapath", _domain);
 
-	String savePath(_savePathWidget->getLabel());
+	String savePath(Common::convertFromU32String(_savePathWidget->getLabel()));
 	if (!savePath.empty() && (savePath != _("Default")))
 		ConfMan.set("savepath", savePath, _domain);
 	else
@@ -574,11 +574,11 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	}
 
 	case kCmdExtraPathClear:
-		_extraPathWidget->setLabel(_c("None", "path"));
+		_extraPathWidget->setLabel(Common::convertToU32String(_c("None", "path")));
 		break;
 
 	case kCmdSavePathClear:
-		_savePathWidget->setLabel(_("Default"));
+		_savePathWidget->setLabel(Common::convertToU32String(_("Default")));
 		break;
 
 	case kOKCmd:
diff --git a/gui/filebrowser-dialog.cpp b/gui/filebrowser-dialog.cpp
index 734bf9fc8f..c5e1d52ebf 100644
--- a/gui/filebrowser-dialog.cpp
+++ b/gui/filebrowser-dialog.cpp
@@ -46,8 +46,8 @@ FileBrowserDialog::FileBrowserDialog(const char *title, const char *fileExtensio
 	_fileMask += fileExtension;
 	_fileList = nullptr;
 
-	new StaticTextWidget(this, "FileBrowser.Headline", title ? title :
-					mode == kFBModeLoad ? _("Choose file for loading") : _("Enter filename for saving"));
+	new StaticTextWidget(this, "FileBrowser.Headline", title ? Common::convertToU32String(title) :
+					mode == kFBModeLoad ? Common::convertToU32String(_("Choose file for loading")) : Common::convertToU32String(_("Enter filename for saving")));
 
 	_fileName = new EditTextWidget(this, "FileBrowser.Filename", "");
 
@@ -62,8 +62,8 @@ FileBrowserDialog::FileBrowserDialog(const char *title, const char *fileExtensio
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
 	// Buttons
-	new ButtonWidget(this, "FileBrowser.Cancel", _("Cancel"), nullptr, kCloseCmd);
-	new ButtonWidget(this, "FileBrowser.Choose", _("Choose"), nullptr, kChooseCmd);
+	new ButtonWidget(this, "FileBrowser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
+	new ButtonWidget(this, "FileBrowser.Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
 }
 
 void FileBrowserDialog::open() {
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index d004bc52d1..f84ea2ea9f 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -129,22 +129,22 @@ void LauncherDialog::build() {
 		_logo->useThemeTransparency(true);
 		_logo->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageLogo));
 
-		new StaticTextWidget(this, "Launcher.Version", gScummVMVersionDate);
+		new StaticTextWidget(this, "Launcher.Version", Common::convertToU32String(gScummVMVersionDate));
 	} else
-		new StaticTextWidget(this, "Launcher.Version", gScummVMFullVersion);
+		new StaticTextWidget(this, "Launcher.Version", Common::convertToU32String(gScummVMFullVersion));
 #else
 	// Show ScummVM version
 	new StaticTextWidget(this, "Launcher.Version", gScummVMFullVersion);
 #endif
 	if (!g_system->hasFeature(OSystem::kFeatureNoQuit))
-		new ButtonWidget(this, "Launcher.QuitButton", _("~Q~uit"), _("Quit ScummVM"), kQuitCmd);
-	new ButtonWidget(this, "Launcher.AboutButton", _("A~b~out..."), _("About ScummVM"), kAboutCmd);
-	new ButtonWidget(this, "Launcher.OptionsButton", _("~O~ptions..."), _("Change global ScummVM options"), kOptionsCmd);
+		new ButtonWidget(this, "Launcher.QuitButton", Common::convertToU32String(_("~Q~uit")), _("Quit ScummVM"), kQuitCmd);
+	new ButtonWidget(this, "Launcher.AboutButton", Common::convertToU32String(_("A~b~out...")), _("About ScummVM"), kAboutCmd);
+	new ButtonWidget(this, "Launcher.OptionsButton", Common::convertToU32String(_("~O~ptions...")), _("Change global ScummVM options"), kOptionsCmd);
 	_startButton =
-		new ButtonWidget(this, "Launcher.StartButton", _("~S~tart"), _("Start selected game"), kStartCmd);
+		new ButtonWidget(this, "Launcher.StartButton", Common::convertToU32String(_("~S~tart")), _("Start selected game"), kStartCmd);
 
 	DropdownButtonWidget *loadButton =
-	        new DropdownButtonWidget(this, "Launcher.LoadGameButton", _("~L~oad..."), _("Load saved game for selected game"), kLoadGameCmd);
+	        new DropdownButtonWidget(this, "Launcher.LoadGameButton", Common::convertToU32String(_("~L~oad...")), _("Load saved game for selected game"), kLoadGameCmd);
 #ifdef ENABLE_EVENTRECORDER
 	loadButton->appendEntry(_("Record..."), kRecordGameCmd);
 #endif
@@ -153,24 +153,24 @@ void LauncherDialog::build() {
 	// Above the lowest button rows: two more buttons (directly below the list box)
 	if (g_system->getOverlayWidth() > 320) {
 		DropdownButtonWidget *addButton =
-			new DropdownButtonWidget(this, "Launcher.AddGameButton", _("~A~dd Game..."), _("Add games to the list"), kAddGameCmd);
-		addButton->appendEntry(_("Mass Add..."), kMassAddGameCmd);
+			new DropdownButtonWidget(this, "Launcher.AddGameButton", Common::convertToU32String(_("~A~dd Game...")), _("Add games to the list"), kAddGameCmd);
+		addButton->appendEntry(Common::convertToU32String(_("Mass Add...")), kMassAddGameCmd);
 		_addButton = addButton;
 
 		_editButton =
-			new ButtonWidget(this, "Launcher.EditGameButton", _("~E~dit Game..."), _("Change game options"), kEditGameCmd);
+			new ButtonWidget(this, "Launcher.EditGameButton", Common::convertToU32String(_("~E~dit Game...")), _("Change game options"), kEditGameCmd);
 		_removeButton =
-			new ButtonWidget(this, "Launcher.RemoveGameButton", _("~R~emove Game"), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
+			new ButtonWidget(this, "Launcher.RemoveGameButton", Common::convertToU32String(_("~R~emove Game")), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
 	} else {
 		DropdownButtonWidget *addButton =
-			new DropdownButtonWidget(this, "Launcher.AddGameButton", _c("~A~dd Game...", "lowres"), _("Add games to the list"), kAddGameCmd);
-		addButton->appendEntry(_c("Mass Add...", "lowres"), kMassAddGameCmd);
+			new DropdownButtonWidget(this, "Launcher.AddGameButton", Common::convertToU32String(_c("~A~dd Game...", "lowres")), _("Add games to the list"), kAddGameCmd);
+		addButton->appendEntry(Common::convertToU32String(_c("Mass Add...", "lowres")), kMassAddGameCmd);
 		_addButton = addButton;
 
 		_editButton =
-		new ButtonWidget(this, "Launcher.EditGameButton", _c("~E~dit Game...", "lowres"), _("Change game options"), kEditGameCmd);
+		new ButtonWidget(this, "Launcher.EditGameButton", Common::convertToU32String(_c("~E~dit Game...", "lowres")), _("Change game options"), kEditGameCmd);
 		_removeButton =
-		new ButtonWidget(this, "Launcher.RemoveGameButton", _c("~R~emove Game", "lowres"), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
+		new ButtonWidget(this, "Launcher.RemoveGameButton", Common::convertToU32String(_c("~R~emove Game", "lowres")), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
 	}
 
 	// Search box
@@ -182,7 +182,7 @@ void LauncherDialog::build() {
 		_searchPic->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageSearch));
 	} else
 #endif
-		_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", _("Search:"));
+		_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", Common::convertToU32String(_("Search:")));
 
 	_searchWidget = new EditTextWidget(this, "Launcher.Search", _search, nullptr, kSearchCmd);
 	_searchClearButton = addClearButton(this, "Launcher.SearchClearButton", kSearchClearCmd);
@@ -718,7 +718,7 @@ void LauncherDialog::reflowLayout() {
 		StaticTextWidget *ver = (StaticTextWidget *)findWidget("Launcher.Version");
 		if (ver) {
 			ver->setAlign(g_gui.xmlEval()->getWidgetTextHAlign("Launcher.Version"));
-			ver->setLabel(gScummVMVersionDate);
+			ver->setLabel(Common::convertToU32String(gScummVMVersionDate));
 		}
 
 		if (!_logo)
@@ -729,7 +729,7 @@ void LauncherDialog::reflowLayout() {
 		StaticTextWidget *ver = (StaticTextWidget *)findWidget("Launcher.Version");
 		if (ver) {
 			ver->setAlign(g_gui.xmlEval()->getWidgetTextHAlign("Launcher.Version"));
-			ver->setLabel(gScummVMFullVersion);
+			ver->setLabel(Common::convertToU32String(gScummVMFullVersion));
 		}
 
 		if (_logo) {
@@ -753,7 +753,7 @@ void LauncherDialog::reflowLayout() {
 		}
 	} else {
 		if (!_searchDesc)
-			_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", _("Search:"));
+			_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", Common::convertToU32String(_("Search:")));
 
 		if (_searchPic) {
 			removeWidget(_searchPic);
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 708bc46da4..6989b35a2f 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -73,10 +73,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
 	// new StaticTextWidget(this, "massadddialog_caption", "Mass Add Dialog");
 
 	_dirProgressText = new StaticTextWidget(this, "MassAdd.DirProgressText",
-	                                       _("... progress ..."));
+											Common::convertToU32String(_("... progress ...")));
 
 	_gameProgressText = new StaticTextWidget(this, "MassAdd.GameProgressText",
-	                                         _("... progress ..."));
+											Common::convertToU32String(_("... progress ...")));
 
 	_dirProgressText->setAlign(Graphics::kTextAlignCenter);
 	_gameProgressText->setAlign(Graphics::kTextAlignCenter);
@@ -86,10 +86,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
 	_list->setNumberingMode(kListNumberingOff);
 	_list->setList(l);
 
-	_okButton = new ButtonWidget(this, "MassAdd.Ok", _("OK"), nullptr, kOkCmd, Common::ASCII_RETURN);
+	_okButton = new ButtonWidget(this, "MassAdd.Ok", Common::convertToU32String("Ok"), nullptr, kOkCmd, Common::ASCII_RETURN);
 	_okButton->setEnabled(false);
 
-	new ButtonWidget(this, "MassAdd.Cancel", _("Cancel"), nullptr, kCancelCmd, Common::ASCII_ESCAPE);
+	new ButtonWidget(this, "MassAdd.Cancel", Common::convertToU32String("Cancel"), nullptr, kCancelCmd, Common::ASCII_ESCAPE);
 
 	// Build a map from all configured game paths to the targets using them
 	const Common::ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
diff --git a/gui/message.cpp b/gui/message.cpp
index e91ccf268f..8bf6e06e9f 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -94,10 +94,10 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB
 	}
 
 	if (defaultButton)
-		new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, defaultButton, nullptr, kOkCmd, Common::ASCII_RETURN);	// Confirm dialog
+		new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, Common::convertToU32String(defaultButton), nullptr, kOkCmd, Common::ASCII_RETURN);	// Confirm dialog
 
 	if (altButton)
-		new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, altButton, nullptr, kCancelCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+		new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, Common::convertToU32String(altButton), nullptr, kCancelCmd, Common::ASCII_ESCAPE);	// Cancel dialog
 }
 
 void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/options.cpp b/gui/options.cpp
index 369f2aa76d..9127150fba 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -261,7 +261,7 @@ void OptionsDialog::build() {
 		int value = ConfMan.getInt("kbdmouse_speed", _domain);
 		if (_kbdMouseSpeedSlider && value < ARRAYSIZE(kbdMouseSpeedLabels) - 1 && value >= 0) {
 			_kbdMouseSpeedSlider->setValue(value);
-			_kbdMouseSpeedLabel->setLabel(_(kbdMouseSpeedLabels[value]));
+			_kbdMouseSpeedLabel->setLabel(Common::convertToU32String(_(kbdMouseSpeedLabels[value])));
 		}
 	}
 	if (g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
@@ -392,7 +392,7 @@ void OptionsDialog::build() {
 
 		Common::String soundFont(ConfMan.get("soundfont", _domain));
 		if (soundFont.empty() || !ConfMan.hasKey("soundfont", _domain)) {
-			_soundFont->setLabel(_c("None", "soundfont"));
+			_soundFont->setLabel(Common::convertToU32String(_c("None", "soundfont")));
 			_soundFontClearButton->setEnabled(false);
 		} else {
 			_soundFont->setLabel(soundFont);
@@ -744,7 +744,7 @@ void OptionsDialog::apply() {
 			ConfMan.setBool("multi_midi", _multiMidiCheckbox->getState(), _domain);
 			ConfMan.setInt("midi_gain", _midiGainSlider->getValue(), _domain);
 
-			Common::String soundFont(_soundFont->getLabel());
+			Common::String soundFont(Common::convertFromU32String(_soundFont->getLabel()));
 			if (!soundFont.empty() && (soundFont != _c("None", "soundfont")))
 				ConfMan.set("soundfont", soundFont, _domain);
 			else
@@ -883,12 +883,12 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
 		_subSpeedLabel->markAsDirty();
 		break;
 	case kClearSoundFontCmd:
-		_soundFont->setLabel(_c("None", "soundfont"));
+		_soundFont->setLabel(Common::convertToU32String(_c("None", "soundfont")));
 		_soundFontClearButton->setEnabled(false);
 		g_gui.scheduleTopDialogRedraw();
 		break;
 	case kKbdMouseSpeedChanged:
-		_kbdMouseSpeedLabel->setLabel(_(kbdMouseSpeedLabels[_kbdMouseSpeedSlider->getValue()]));
+		_kbdMouseSpeedLabel->setLabel(Common::convertToU32String(_(kbdMouseSpeedLabels[_kbdMouseSpeedSlider->getValue()])));
 		_kbdMouseSpeedLabel->markAsDirty();
 		break;
 	case kJoystickDeadzoneChanged:
@@ -1068,24 +1068,24 @@ void OptionsDialog::setSubtitleSettingsState(bool enabled) {
 void OptionsDialog::addControlControls(GuiObject *boss, const Common::String &prefix) {
 	// Show On-Screen control
 	if (g_system->hasFeature(OSystem::kFeatureOnScreenControl))
-		_onscreenCheckbox = new CheckboxWidget(boss, prefix + "grOnScreenCheckbox", _("Show On-screen control"));
+		_onscreenCheckbox = new CheckboxWidget(boss, prefix + "grOnScreenCheckbox", Common::convertToU32String(_("Show On-screen control")));
 
 	// Touchpad Mouse mode
 	if (g_system->hasFeature(OSystem::kFeatureTouchpadMode))
-		_touchpadCheckbox = new CheckboxWidget(boss, prefix + "grTouchpadCheckbox", _("Touchpad mouse mode"));
+		_touchpadCheckbox = new CheckboxWidget(boss, prefix + "grTouchpadCheckbox", Common::convertToU32String(_("Touchpad mouse mode")));
 
 	// Swap menu and back buttons
 	if (g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons))
-		_swapMenuAndBackBtnsCheckbox = new CheckboxWidget(boss, prefix + "grSwapMenuAndBackBtnsCheckbox", _("Swap Menu and Back buttons"));
+		_swapMenuAndBackBtnsCheckbox = new CheckboxWidget(boss, prefix + "grSwapMenuAndBackBtnsCheckbox", Common::convertToU32String(_("Swap Menu and Back buttons")));
 
 	// Keyboard and joystick mouse speed
 	if (g_system->hasFeature(OSystem::kFeatureKbdMouseSpeed)) {
 		if (g_system->getOverlayWidth() > 320)
-			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", _("Pointer Speed:"), _("Speed for keyboard/joystick mouse pointer control"));
+			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", Common::convertToU32String(_("Pointer Speed:")), _("Speed for keyboard/joystick mouse pointer control"));
 		else
-			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", _c("Pointer Speed:", "lowres"), _("Speed for keyboard/joystick mouse pointer control"));
+			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", Common::convertToU32String(_c("Pointer Speed:", "lowres")), _("Speed for keyboard/joystick mouse pointer control"));
 		_kbdMouseSpeedSlider = new SliderWidget(boss, prefix + "grKbdMouseSpeedSlider", _("Speed for keyboard/joystick mouse pointer control"), kKbdMouseSpeedChanged);
-		_kbdMouseSpeedLabel = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedLabel", "  ");
+		_kbdMouseSpeedLabel = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedLabel", Common::convertToU32String("  "));
 		_kbdMouseSpeedSlider->setMinValue(0);
 		_kbdMouseSpeedSlider->setMaxValue(7);
 		_kbdMouseSpeedLabel->setFlags(WIDGET_CLEARBG);
@@ -1094,11 +1094,11 @@ void OptionsDialog::addControlControls(GuiObject *boss, const Common::String &pr
 	// Joystick deadzone
 	if (g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
 		if (g_system->getOverlayWidth() > 320)
-			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", _("Joy Deadzone:"), _("Analog joystick Deadzone"));
+			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", Common::convertToU32String(_("Joy Deadzone:")), _("Analog joystick Deadzone"));
 		else
-			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", _c("Joy Deadzone:", "lowres"), _("Analog joystick Deadzone"));
+			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", Common::convertToU32String(_c("Joy Deadzone:", "lowres")), _("Analog joystick Deadzone"));
 		_joystickDeadzoneSlider = new SliderWidget(boss, prefix + "grJoystickDeadzoneSlider", _("Analog joystick Deadzone"), kJoystickDeadzoneChanged);
-		_joystickDeadzoneLabel = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneLabel", "  ");
+		_joystickDeadzoneLabel = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneLabel", Common::convertToU32String("  "));
 		_joystickDeadzoneSlider->setMinValue(1);
 		_joystickDeadzoneSlider->setMaxValue(10);
 		_joystickDeadzoneLabel->setFlags(WIDGET_CLEARBG);
@@ -1155,13 +1155,13 @@ void OptionsDialog::addAchievementsControls(GuiObject *boss, const Common::Strin
 			}
 
 			CheckboxWidget *checkBox;
-			checkBox = new CheckboxWidget(scrollContainer, lineHeight, yPos, width, yStep, info.descriptions[idx].title);
+			checkBox = new CheckboxWidget(scrollContainer, lineHeight, yPos, width, yStep, Common::convertToU32String(info.descriptions[idx].title));
 			checkBox->setEnabled(false);
 			checkBox->setState(isAchieved);
 			yPos += yStep;
 
 	        if (info.descriptions[idx].comment && strlen(info.descriptions[idx].comment) > 0) {
-				new StaticTextWidget(scrollContainer, lineHeight + descrDelta, yPos, width - descrDelta, yStep, info.descriptions[idx].comment, Graphics::kTextAlignStart, "", ThemeEngine::kFontStyleNormal);
+				new StaticTextWidget(scrollContainer, lineHeight + descrDelta, yPos, width - descrDelta, yStep, Common::convertToU32String(info.descriptions[idx].comment), Graphics::kTextAlignStart, "", ThemeEngine::kFontStyleNormal);
 				yPos += yStep;
 			}
 
@@ -1171,12 +1171,12 @@ void OptionsDialog::addAchievementsControls(GuiObject *boss, const Common::Strin
 
 	if (nHidden) {
 		Common::String hiddenStr = Common::String::format(_("%d hidden achievements remaining"), nHidden);
-		new StaticTextWidget(scrollContainer, lineHeight, yPos, width, yStep, hiddenStr.c_str(), Graphics::kTextAlignStart);
+		new StaticTextWidget(scrollContainer, lineHeight, yPos, width, yStep, Common::convertToU32String(hiddenStr.c_str()), Graphics::kTextAlignStart);
 	}
 
 	if (nMax) {
 		Common::String totalStr = Common::String::format(_("Achievements unlocked: %d/%d"), nAchieved, nMax);
-		new StaticTextWidget(scrollContainer, lineHeight, lineHeight, width, yStep, totalStr.c_str(), Graphics::kTextAlignStart);
+		new StaticTextWidget(scrollContainer, lineHeight, lineHeight, width, yStep, Common::convertToU32String(totalStr.c_str()), Graphics::kTextAlignStart);
 
 		SliderWidget *progressBar;
 		progressBar = new SliderWidget(scrollContainer, lineHeight, lineHeight*2, progressBarWidth, lineHeight);
@@ -1194,14 +1194,14 @@ void OptionsDialog::addShaderControls(GuiObject *boss, const Common::String &pre
 
 	// Shader selector
 	if (g_system->getOverlayWidth() > 320)
-		_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", _("HW Shader:"), _("Different hardware shaders give different visual effects"));
+		_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", Common::convertToU32String(_("HW Shader:")), _("Different hardware shaders give different visual effects"));
 	else
-		_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", _c("HW Shader:", "lowres"), _("Different hardware shaders give different visual effects"));
+		_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", Common::convertToU32String(_c("HW Shader:", "lowres")), _("Different hardware shaders give different visual effects"));
 	_shaderPopUp = new PopUpWidget(boss, prefix + "grShaderPopUp", _("Different shaders give different visual effects"));
 	const OSystem::GraphicsMode *p = g_system->getSupportedShaders();
 
-	_shaderPopUp->appendEntry(_("<default>"));
-	_shaderPopUp->appendEntry("");
+	_shaderPopUp->appendEntry(Common::convertToU32String(_("<default>")));
+	_shaderPopUp->appendEntry(Common::convertToU32String(""));
 	while (p->name) {
 		_shaderPopUp->appendEntry(_c(p->description, context), p->id);
 		p++;
@@ -1217,11 +1217,11 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 		context = "lowres";
 
 	// The GFX mode popup
-	_gfxPopUpDesc = new StaticTextWidget(boss, prefix + "grModePopupDesc", _("Graphics mode:"));
+	_gfxPopUpDesc = new StaticTextWidget(boss, prefix + "grModePopupDesc", Common::convertToU32String(_("Graphics mode:")));
 	_gfxPopUp = new PopUpWidget(boss, prefix + "grModePopup");
 
-	_gfxPopUp->appendEntry(_("<default>"));
-	_gfxPopUp->appendEntry("");
+	_gfxPopUp->appendEntry(Common::convertToU32String(_("<default>")));
+	_gfxPopUp->appendEntry(Common::convertToU32String(""));
 	while (gm->name) {
 		_gfxPopUp->appendEntry(_c(gm->description, context), gm->id);
 		gm++;
@@ -1231,10 +1231,10 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 	const Common::String allFlags = Common::allRenderModesGUIOs();
 	bool renderingTypeDefined = (strpbrk(_guioptions.c_str(), allFlags.c_str()) != nullptr);
 
-	_renderModePopUpDesc = new StaticTextWidget(boss, prefix + "grRenderPopupDesc", _("Render mode:"), _("Special dithering modes supported by some games"));
+	_renderModePopUpDesc = new StaticTextWidget(boss, prefix + "grRenderPopupDesc", Common::convertToU32String(_("Render mode:")), _("Special dithering modes supported by some games"));
 	_renderModePopUp = new PopUpWidget(boss, prefix + "grRenderPopup", _("Special dithering modes supported by some games"));
-	_renderModePopUp->appendEntry(_("<default>"), Common::kRenderDefault);
-	_renderModePopUp->appendEntry("");
+	_renderModePopUp->appendEntry(Common::convertToU32String(_("<default>")), Common::kRenderDefault);
+	_renderModePopUp->appendEntry(Common::convertToU32String(""));
 	const Common::RenderModeDescription *rm = Common::g_renderModes;
 	for (; rm->code; ++rm) {
 		Common::String renderGuiOption = Common::renderMode2GUIO(rm->id);
@@ -1244,24 +1244,24 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 
 	// The Stretch mode popup
 	const OSystem::GraphicsMode *sm = g_system->getSupportedStretchModes();
-	_stretchPopUpDesc = new StaticTextWidget(boss, prefix + "grStretchModePopupDesc", _("Stretch mode:"));
+	_stretchPopUpDesc = new StaticTextWidget(boss, prefix + "grStretchModePopupDesc", Common::convertToU32String(_("Stretch mode:")));
 	_stretchPopUp = new PopUpWidget(boss, prefix + "grStretchModePopup");
 
-	_stretchPopUp->appendEntry(_("<default>"));
-	_stretchPopUp->appendEntry("");
+	_stretchPopUp->appendEntry(Common::convertToU32String(_("<default>")));
+	_stretchPopUp->appendEntry(Common::convertToU32String(""));
 	while (sm->name) {
 		_stretchPopUp->appendEntry(_c(sm->description, context), sm->id);
 		sm++;
 	}
 
 	// Fullscreen checkbox
-	_fullscreenCheckbox = new CheckboxWidget(boss, prefix + "grFullscreenCheckbox", _("Fullscreen mode"));
+	_fullscreenCheckbox = new CheckboxWidget(boss, prefix + "grFullscreenCheckbox", Common::convertToU32String(_("Fullscreen mode")));
 
 	// Filtering checkbox
-	_filteringCheckbox = new CheckboxWidget(boss, prefix + "grFilteringCheckbox", _("Filter graphics"), _("Use linear filtering when scaling graphics"));
+	_filteringCheckbox = new CheckboxWidget(boss, prefix + "grFilteringCheckbox", Common::convertToU32String(_("Filter graphics")), _("Use linear filtering when scaling graphics"));
 
 	// Aspect ratio checkbox
-	_aspectCheckbox = new CheckboxWidget(boss, prefix + "grAspectCheckbox", _("Aspect ratio correction"), _("Correct aspect ratio for 320x200 games"));
+	_aspectCheckbox = new CheckboxWidget(boss, prefix + "grAspectCheckbox", Common::convertToU32String(_("Aspect ratio correction")), _("Correct aspect ratio for 320x200 games"));
 
 	_enableGraphicSettings = true;
 }
@@ -1269,9 +1269,9 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &prefix) {
 	// The MIDI mode popup & a label
 	if (g_system->getOverlayWidth() > 320)
-		_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? _("Preferred device:") : _("Music device:"), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
+		_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? Common::convertToU32String(_("Preferred device:")) : Common::convertToU32String(_("Music device:")), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
 	else
-		_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? _c("Preferred dev.:", "lowres") : _c("Music device:", "lowres"), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
+		_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? Common::convertToU32String(_c("Preferred dev.:", "lowres")) : Common::convertToU32String(_c("Music device:", "lowres")), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
 	_midiPopUp = new PopUpWidget(boss, prefix + "auMidiPopup", _("Specifies output sound device or sound card emulator"));
 
 	// Populate it
@@ -1298,13 +1298,13 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref
 	}
 
 	// The OPL emulator popup & a label
-	_oplPopUpDesc = new StaticTextWidget(boss, prefix + "auOPLPopupDesc", _("AdLib emulator:"), _("AdLib is used for music in many games"));
+	_oplPopUpDesc = new StaticTextWidget(boss, prefix + "auOPLPopupDesc", Common::convertToU32String(_("AdLib emulator:")), _("AdLib is used for music in many games"));
 	_oplPopUp = new PopUpWidget(boss, prefix + "auOPLPopup", _("AdLib is used for music in many games"));
 
 	// Populate it
 	const OPL::Config::EmulatorDescription *ed = OPL::Config::getAvailable();
 	while (ed->name) {
-		_oplPopUp->appendEntry(_(ed->description), ed->id);
+		_oplPopUp->appendEntry(Common::convertToU32String(_(ed->description)), ed->id);
 		++ed;
 	}
 
@@ -1312,7 +1312,7 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref
 }
 
 void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefix) {
-	_gmDevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefGmPopupDesc", _("GM device:"), _("Specifies default sound device for General MIDI output"));
+	_gmDevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefGmPopupDesc", Common::convertToU32String(_("GM device:")), _("Specifies default sound device for General MIDI output"));
 	_gmDevicePopUp = new PopUpWidget(boss, prefix + "auPrefGmPopup");
 
 	// Populate
@@ -1323,7 +1323,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 		MusicDevices i = (*m)->get<MusicPluginObject>().getDevices();
 		for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
 			if (d->getMusicDriverId() == "null")
-				_gmDevicePopUp->appendEntry(_("Don't use General MIDI music"), d->getHandle());
+				_gmDevicePopUp->appendEntry(Common::convertToU32String(_("Don't use General MIDI music")), d->getHandle());
 		}
 	}
 	// Now we add the other devices.
@@ -1334,7 +1334,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 				if (d->getMusicType() != MT_MT32)
 					_gmDevicePopUp->appendEntry(d->getCompleteName(), d->getHandle());
 			} else if (d->getMusicDriverId() == "auto") {
-				_gmDevicePopUp->appendEntry(_("Use first available device"), d->getHandle());
+				_gmDevicePopUp->appendEntry(Common::convertToU32String(_("Use first available device")), d->getHandle());
 			}
 		}
 	}
@@ -1346,38 +1346,38 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 
 	// SoundFont
 	if (g_system->getOverlayWidth() > 320)
-		_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", _("SoundFont:"), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
+		_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", Common::convertToU32String(_("SoundFont:")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
 	else
-		_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", _c("SoundFont:", "lowres"), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
-	_soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", _c("None", "soundfont"), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"));
+		_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", Common::convertToU32String(_c("SoundFont:", "lowres")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
+	_soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", Common::convertToU32String(_c("None", "soundfont")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"));
 
 	_soundFontClearButton = addClearButton(boss, prefix + "mcFontClearButton", kClearSoundFontCmd);
 
 	// Multi midi setting
-	_multiMidiCheckbox = new CheckboxWidget(boss, prefix + "mcMixedCheckbox", _("Mixed AdLib/MIDI mode"), _("Use both MIDI and AdLib sound generation"));
+	_multiMidiCheckbox = new CheckboxWidget(boss, prefix + "mcMixedCheckbox", Common::convertToU32String(_("Mixed AdLib/MIDI mode")), _("Use both MIDI and AdLib sound generation"));
 
 	// MIDI gain setting (FluidSynth uses this)
-	_midiGainDesc = new StaticTextWidget(boss, prefix + "mcMidiGainText", _("MIDI gain:"));
+	_midiGainDesc = new StaticTextWidget(boss, prefix + "mcMidiGainText", Common::convertToU32String(_("MIDI gain:")));
 	_midiGainSlider = new SliderWidget(boss, prefix + "mcMidiGainSlider", nullptr, kMidiGainChanged);
 	_midiGainSlider->setMinValue(0);
 	_midiGainSlider->setMaxValue(1000);
-	_midiGainLabel = new StaticTextWidget(boss, prefix + "mcMidiGainLabel", "1.00");
+	_midiGainLabel = new StaticTextWidget(boss, prefix + "mcMidiGainLabel", Common::convertToU32String("1.00"));
 
 	_enableMIDISettings = true;
 }
 
 void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefix) {
-	_mt32DevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefMt32PopupDesc", _("MT-32 Device:"), _("Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"));
+	_mt32DevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefMt32PopupDesc", Common::convertToU32String(_("MT-32 Device:")), _("Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"));
 	_mt32DevicePopUp = new PopUpWidget(boss, prefix + "auPrefMt32Popup");
 
 	// Native mt32 setting
 	if (g_system->getOverlayWidth() > 320)
-		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _("True Roland MT-32 (disable GM emulation)"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
+		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", Common::convertToU32String(_("True Roland MT-32 (disable GM emulation)")), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
 	else
-		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _c("True Roland MT-32 (no GM emulation)", "lowres"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
+		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", Common::convertToU32String(_c("True Roland MT-32 (no GM emulation)", "lowres")), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
 
 	// GS Extensions setting
-	_enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Roland GS device (enable MT-32 mappings)"), _("Check if you want to enable patch mappings to emulate an MT-32 on a Roland GS device"));
+	_enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", Common::convertToU32String(_("Roland GS device (enable MT-32 mappings)")), _("Check if you want to enable patch mappings to emulate an MT-32 on a Roland GS device"));
 
 	const PluginList p = MusicMan.getPlugins();
 	// Make sure the null device is the first one in the list to avoid undesired
@@ -1386,7 +1386,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
 		MusicDevices i = (*m)->get<MusicPluginObject>().getDevices();
 		for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
 			if (d->getMusicDriverId() == "null")
-				_mt32DevicePopUp->appendEntry(_("Don't use Roland MT-32 music"), d->getHandle());
+				_mt32DevicePopUp->appendEntry(Common::convertToU32String(_("Don't use Roland MT-32 music")), d->getHandle());
 		}
 	}
 	// Now we add the other devices.
@@ -1396,7 +1396,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
 			if (d->getMusicType() >= MT_GM)
 				_mt32DevicePopUp->appendEntry(d->getCompleteName(), d->getHandle());
 			else if (d->getMusicDriverId() == "auto")
-				_mt32DevicePopUp->appendEntry(_("Use first available device"), d->getHandle());
+				_mt32DevicePopUp->appendEntry(Common::convertToU32String(_("Use first available device")), d->getHandle());
 		}
 	}
 
@@ -1413,30 +1413,30 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
 void OptionsDialog::addSubtitleControls(GuiObject *boss, const Common::String &prefix, int maxSliderVal) {
 
 	if (g_system->getOverlayWidth() > 320) {
-		_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", _("Text and speech:"));
+		_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", Common::convertToU32String(_("Text and speech:")));
 
 		_subToggleGroup = new RadiobuttonGroup(boss, kSubtitleToggle);
 
-		_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, _("Speech"));
-		_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, _("Subtitles"));
-		_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, _("Both"));
+		_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, Common::convertToU32String(_("Speech")));
+		_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, Common::convertToU32String(_("Subtitles")));
+		_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, Common::convertToU32String(_("Both")));
 
-		_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", _("Subtitle speed:"));
+		_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", Common::convertToU32String(_("Subtitle speed:")));
 	} else {
-		_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", _c("Text and speech:", "lowres"));
+		_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", Common::convertToU32String(_c("Text and speech:", "lowres")));
 
 		_subToggleGroup = new RadiobuttonGroup(boss, kSubtitleToggle);
 
-		_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, _("Spch"), _("Speech"));
-		_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, _("Subs"), _("Subtitles"));
-		_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, _c("Both", "lowres"), _("Show subtitles and play speech"));
+		_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, Common::convertToU32String(_("Spch")), _("Speech"));
+		_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, Common::convertToU32String(_("Subs")), _("Subtitles"));
+		_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, Common::convertToU32String(_c("Both", "lowres")), _("Show subtitles and play speech"));
 
-		_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", _c("Subtitle speed:", "lowres"));
+		_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", Common::convertToU32String(_c("Subtitle speed:", "lowres")));
 	}
 
 	// Subtitle speed
 	_subSpeedSlider = new SliderWidget(boss, prefix + "subSubtitleSpeedSlider", nullptr, kSubtitleSpeedChanged);
-	_subSpeedLabel = new StaticTextWidget(boss, prefix + "subSubtitleSpeedLabel", "100%");
+	_subSpeedLabel = new StaticTextWidget(boss, prefix + "subSubtitleSpeedLabel", Common::convertToU32String("100%"));
 	_subSpeedSlider->setMinValue(0); _subSpeedSlider->setMaxValue(maxSliderVal);
 	_subSpeedLabel->setFlags(WIDGET_CLEARBG);
 
@@ -1447,33 +1447,33 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
 
 	// Volume controllers
 	if (g_system->getOverlayWidth() > 320)
-		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", _("Music volume:"));
+		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", Common::convertToU32String(_("Music volume:")));
 	else
-		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", _c("Music volume:", "lowres"));
+		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", Common::convertToU32String(_c("Music volume:", "lowres")));
 	_musicVolumeSlider = new SliderWidget(boss, prefix + "vcMusicSlider", nullptr, kMusicVolumeChanged);
-	_musicVolumeLabel = new StaticTextWidget(boss, prefix + "vcMusicLabel", "100%");
+	_musicVolumeLabel = new StaticTextWidget(boss, prefix + "vcMusicLabel", Common::convertToU32String("100%"));
 	_musicVolumeSlider->setMinValue(0);
 	_musicVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
 	_musicVolumeLabel->setFlags(WIDGET_CLEARBG);
 
-	_muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", _("Mute all"), nullptr, kMuteAllChanged);
+	_muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", Common::convertToU32String(_("Mute all")), nullptr, kMuteAllChanged);
 
 	if (g_system->getOverlayWidth() > 320)
-		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", _("SFX volume:"), _("Special sound effects volume"));
+		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", Common::convertToU32String(_("SFX volume:")), _("Special sound effects volume"));
 	else
-		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", _c("SFX volume:", "lowres"), _("Special sound effects volume"));
+		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", Common::convertToU32String(_c("SFX volume:", "lowres")), _("Special sound effects volume"));
 	_sfxVolumeSlider = new SliderWidget(boss, prefix + "vcSfxSlider", _("Special sound effects volume"), kSfxVolumeChanged);
-	_sfxVolumeLabel = new StaticTextWidget(boss, prefix + "vcSfxLabel", "100%");
+	_sfxVolumeLabel = new StaticTextWidget(boss, prefix + "vcSfxLabel", Common::convertToU32String("100%"));
 	_sfxVolumeSlider->setMinValue(0);
 	_sfxVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
 	_sfxVolumeLabel->setFlags(WIDGET_CLEARBG);
 
 	if (g_system->getOverlayWidth() > 320)
-		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , _("Speech volume:"));
+		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , Common::convertToU32String(_("Speech volume:")));
 	else
-		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , _c("Speech volume:", "lowres"));
+		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , Common::convertToU32String(_c("Speech volume:", "lowres")));
 	_speechVolumeSlider = new SliderWidget(boss, prefix + "vcSpeechSlider", nullptr, kSpeechVolumeChanged);
-	_speechVolumeLabel = new StaticTextWidget(boss, prefix + "vcSpeechLabel", "100%");
+	_speechVolumeLabel = new StaticTextWidget(boss, prefix + "vcSpeechLabel", Common::convertToU32String("100%"));
 	_speechVolumeSlider->setMinValue(0);
 	_speechVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
 	_speechVolumeLabel->setFlags(WIDGET_CLEARBG);
@@ -1564,7 +1564,7 @@ void OptionsDialog::updateSpeechVolume(const int newValue) const {
 
 void OptionsDialog::reflowLayout() {
 	if (_graphicsTabId != -1 && _tabWidget)
-		_tabWidget->setTabTitle(_graphicsTabId, g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX"));
+		_tabWidget->setTabTitle(_graphicsTabId, g_system->getOverlayWidth() > 320 ? Common::convertToU32String(_("Graphics")) : Common::convertToU32String(_("GFX")));
 
 	Dialog::reflowLayout();
 	setupGraphicsTab();
@@ -1695,7 +1695,7 @@ void GlobalOptionsDialog::build() {
 	//
 	// 1) The graphics tab
 	//
-	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX"), "GlobalOptions_Graphics");
+	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? Common::convertToU32String(_("Graphics")) : Common::convertToU32String(_("GFX")), "GlobalOptions_Graphics");
 	ScrollContainerWidget *graphicsContainer = new ScrollContainerWidget(tab, "GlobalOptions_Graphics.Container", "GlobalOptions_Graphics_Container", kGraphicsTabContainerReflowCmd);
 	graphicsContainer->setTarget(this);
 	graphicsContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -1706,7 +1706,7 @@ void GlobalOptionsDialog::build() {
 	//
 
 	if (g_system->hasFeature(OSystem::kFeatureShader)) {
-		tab->addTab(_("Shader"), "GlobalOptions_Shader");
+		tab->addTab(Common::convertToU32String(_("Shader")), "GlobalOptions_Shader");
 		addShaderControls(tab, "GlobalOptions_Shader.");
 	}
 
@@ -1718,7 +1718,7 @@ void GlobalOptionsDialog::build() {
 		g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons) ||
 		g_system->hasFeature(OSystem::kFeatureKbdMouseSpeed) ||
 		g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
-		tab->addTab(_("Control"), "GlobalOptions_Control");
+		tab->addTab(Common::convertToU32String(_("Control")), "GlobalOptions_Control");
 		addControlControls(tab, "GlobalOptions_Control.");
 	}
 
@@ -1740,21 +1740,21 @@ void GlobalOptionsDialog::build() {
 	}
 
 	if (!keymaps.empty()) {
-		tab->addTab(_("Keymaps"), "GlobalOptions_KeyMapper");
+		tab->addTab(Common::convertToU32String(_("Keymaps")), "GlobalOptions_KeyMapper");
 		addKeyMapperControls(tab, "GlobalOptions_KeyMapper.", keymaps, Common::ConfigManager::kKeymapperDomain);
 	}
 
 	//
 	// 2) The audio tab
 	//
-	tab->addTab(_("Audio"), "GlobalOptions_Audio");
+	tab->addTab(Common::convertToU32String(_("Audio")), "GlobalOptions_Audio");
 	addAudioControls(tab, "GlobalOptions_Audio.");
 	addSubtitleControls(tab, "GlobalOptions_Audio.");
 
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(_("Volume"), "GlobalOptions_Volume");
+		tab->addTab(Common::convertToU32String(_("Volume")), "GlobalOptions_Volume");
 	else
-		tab->addTab(_c("Volume", "lowres"), "GlobalOptions_Volume");
+		tab->addTab(Common::convertToU32String(_c("Volume", "lowres")), "GlobalOptions_Volume");
 	addVolumeControls(tab, "GlobalOptions_Volume.");
 
 	// TODO: cd drive setting
@@ -1762,31 +1762,31 @@ void GlobalOptionsDialog::build() {
 	//
 	// 3) The MIDI tab
 	//
-	_midiTabId = tab->addTab(_("MIDI"), "GlobalOptions_MIDI");
+	_midiTabId = tab->addTab(Common::convertToU32String(_("MIDI")), "GlobalOptions_MIDI");
 	addMIDIControls(tab, "GlobalOptions_MIDI.");
 
 	//
 	// 4) The MT-32 tab
 	//
-	tab->addTab(_("MT-32"), "GlobalOptions_MT32");
+	tab->addTab(Common::convertToU32String(_("MT-32")), "GlobalOptions_MT32");
 	addMT32Controls(tab, "GlobalOptions_MT32.");
 
 	//
 	// 5) The Paths tab
 	//
 	if (g_system->getOverlayWidth() > 320)
-		_pathsTabId = tab->addTab(_("Paths"), "GlobalOptions_Paths");
+		_pathsTabId = tab->addTab(Common::convertToU32String(_("Paths")), "GlobalOptions_Paths");
 	else
-		_pathsTabId = tab->addTab(_c("Paths", "lowres"), "GlobalOptions_Paths");
+		_pathsTabId = tab->addTab(Common::convertToU32String(_c("Paths", "lowres")), "GlobalOptions_Paths");
 	addPathsControls(tab, "GlobalOptions_Paths.", g_system->getOverlayWidth() <= 320);
 
 	//
 	// 6) The miscellaneous tab
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(_("Misc"), "GlobalOptions_Misc");
+		tab->addTab(Common::convertToU32String(_("Misc")), "GlobalOptions_Misc");
 	else
-		tab->addTab(_c("Misc", "lowres"), "GlobalOptions_Misc");
+		tab->addTab(Common::convertToU32String(_c("Misc", "lowres")), "GlobalOptions_Misc");
 	ScrollContainerWidget *miscContainer = new ScrollContainerWidget(tab, "GlobalOptions_Misc.Container", "GlobalOptions_Misc_Container");
 	miscContainer->setTarget(this);
 	miscContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -1798,9 +1798,9 @@ void GlobalOptionsDialog::build() {
 	// 7) The Cloud tab (remote storages)
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(_("Cloud"), "GlobalOptions_Cloud");
+		tab->addTab(Common::convertToU32String(_("Cloud")), "GlobalOptions_Cloud");
 	else
-		tab->addTab(_c("Cloud", "lowres"), "GlobalOptions_Cloud");
+		tab->addTab(Common::convertToU32String(_c("Cloud", "lowres")), "GlobalOptions_Cloud");
 
 	ScrollContainerWidget *container = new ScrollContainerWidget(tab, "GlobalOptions_Cloud.Container", "GlobalOptions_Cloud_Container", kCloudTabContainerReflowCmd);
 	container->setTarget(this);
@@ -1814,9 +1814,9 @@ void GlobalOptionsDialog::build() {
 	// 8) The LAN tab (local "cloud" webserver)
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(_("LAN"), "GlobalOptions_Network");
+		tab->addTab(Common::convertToU32String(_("LAN")), "GlobalOptions_Network");
 	else
-		tab->addTab(_c("LAN", "lowres"), "GlobalOptions_Network");
+		tab->addTab(Common::convertToU32String(_c("LAN", "lowres")), "GlobalOptions_Network");
 	addNetworkControls(tab, "GlobalOptions_Network.", g_system->getOverlayWidth() <= 320);
 #endif // USE_SDL_NET
 #endif // USE_CLOUD
@@ -1824,9 +1824,9 @@ void GlobalOptionsDialog::build() {
 	//Accessibility
 #ifdef USE_TTS
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(_("Accessibility"), "GlobalOptions_Accessibility");
+		tab->addTab(Common::convertToU32String(_("Accessibility")), "GlobalOptions_Accessibility");
 	else
-		tab->addTab(_c("Accessibility", "lowres"), "GlobalOptions_Accessibility");
+		tab->addTab(Common::convertToU32String(_c("Accessibility", "lowres")), "GlobalOptions_Accessibility");
 	addAccessibilityControls(tab, "GlobalOptions_Accessibility.");
 #endif // USE_TTS
 
@@ -1835,9 +1835,9 @@ void GlobalOptionsDialog::build() {
 	_tabWidget = tab;
 
 	// Add OK & Cancel buttons
-	new ButtonWidget(this, "GlobalOptions.Cancel", _("Cancel"), nullptr, kCloseCmd);
-	new ButtonWidget(this, "GlobalOptions.Apply", _("Apply"), nullptr, kApplyCmd);
-	new ButtonWidget(this, "GlobalOptions.Ok", _("OK"), nullptr, kOKCmd);
+	new ButtonWidget(this, "GlobalOptions.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
+	new ButtonWidget(this, "GlobalOptions.Apply", Common::convertToU32String(_("Apply")), nullptr, kApplyCmd);
+	new ButtonWidget(this, "GlobalOptions.Ok", Common::convertToU32String(_("OK")), nullptr, kOKCmd);
 
 #ifdef GUI_ENABLE_KEYSDIALOG
 	_keysDialog = new KeysDialog();
@@ -1851,24 +1851,24 @@ void GlobalOptionsDialog::build() {
 
 #if !defined(__DC__)
 	// Set _savePath to the current save path
-	Common::String savePath(ConfMan.get("savepath", _domain));
-	Common::String themePath(ConfMan.get("themepath", _domain));
-	Common::String extraPath(ConfMan.get("extrapath", _domain));
+	Common::U32String savePath(ConfMan.get("savepath", _domain));
+	Common::U32String themePath(ConfMan.get("themepath", _domain));
+	Common::U32String extraPath(ConfMan.get("extrapath", _domain));
 
 	if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) {
-		_savePath->setLabel(_("Default"));
+		_savePath->setLabel(Common::convertToU32String(_("Default")));
 	} else {
 		_savePath->setLabel(savePath);
 	}
 
 	if (themePath.empty() || !ConfMan.hasKey("themepath", _domain)) {
-		_themePath->setLabel(_c("None", "path"));
+		_themePath->setLabel(Common::convertToU32String(_c("None", "path")));
 	} else {
 		_themePath->setLabel(themePath);
 	}
 
 	if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) {
-		_extraPath->setLabel(_c("None", "path"));
+		_extraPath->setLabel(Common::convertToU32String(_c("None", "path")));
 	} else {
 		_extraPath->setLabel(extraPath);
 	}
@@ -1900,7 +1900,7 @@ void GlobalOptionsDialog::build() {
 #ifdef USE_SDL_NET
 	Common::String rootPath(ConfMan.get("rootpath", "cloud"));
 	if (rootPath.empty() || !ConfMan.hasKey("rootpath", "cloud")) {
-		_rootPath->setLabel(_c("None", "path"));
+		_rootPath->setLabel(Common::convertToU32String(_c("None", "path")));
 	} else {
 		_rootPath->setLabel(rootPath);
 	}
@@ -1937,26 +1937,26 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
 
 	// Save game path
 	if (!lowres)
-		new ButtonWidget(boss, prefix + "SaveButton", _("Save Path:"), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
+		new ButtonWidget(boss, prefix + "SaveButton", Common::convertToU32String(_("Save Path:")), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
 	else
-		new ButtonWidget(boss, prefix + "SaveButton", _c("Save Path:", "lowres"), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
-	_savePath = new StaticTextWidget(boss, prefix + "SavePath", "/foo/bar", _("Specifies where your saved games are put"));
+		new ButtonWidget(boss, prefix + "SaveButton", Common::convertToU32String(_c("Save Path:", "lowres")), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
+	_savePath = new StaticTextWidget(boss, prefix + "SavePath", Common::convertToU32String("/foo/bar"), _("Specifies where your saved games are put"));
 
 	_savePathClearButton = addClearButton(boss, prefix + "SavePathClearButton", kSavePathClearCmd);
 
 	if (!lowres)
-		new ButtonWidget(boss, prefix + "ThemeButton", _("Theme Path:"), nullptr, kChooseThemeDirCmd);
+		new ButtonWidget(boss, prefix + "ThemeButton", Common::convertToU32String(_("Theme Path:")), nullptr, kChooseThemeDirCmd);
 	else
-		new ButtonWidget(boss, prefix + "ThemeButton", _c("Theme Path:", "lowres"), nullptr, kChooseThemeDirCmd);
-	_themePath = new StaticTextWidget(boss, prefix + "ThemePath", _c("None", "path"));
+		new ButtonWidget(boss, prefix + "ThemeButton", Common::convertToU32String(_c("Theme Path:", "lowres")), nullptr, kChooseThemeDirCmd);
+	_themePath = new StaticTextWidget(boss, prefix + "ThemePath", Common::convertToU32String(_c("None", "path")));
 
 	_themePathClearButton = addClearButton(boss, prefix + "ThemePathClearButton", kThemePathClearCmd);
 
 	if (!lowres)
-		new ButtonWidget(boss, prefix + "ExtraButton", _("Extra Path:"), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
+		new ButtonWidget(boss, prefix + "ExtraButton", Common::convertToU32String(_("Extra Path:")), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
 	else
-		new ButtonWidget(boss, prefix + "ExtraButton", _c("Extra Path:", "lowres"), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
-	_extraPath = new StaticTextWidget(boss, prefix + "ExtraPath", _c("None", "path"), _("Specifies path to additional data used by all games or ScummVM"));
+		new ButtonWidget(boss, prefix + "ExtraButton", Common::convertToU32String(_c("Extra Path:", "lowres")), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
+	_extraPath = new StaticTextWidget(boss, prefix + "ExtraPath", Common::convertToU32String(_c("None", "path")), _("Specifies path to additional data used by all games or ScummVM"));
 
 	_extraPathClearButton = addClearButton(boss, prefix + "ExtraPathClearButton", kExtraPathClearCmd);
 
@@ -1973,29 +1973,29 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
 }
 
 void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
-	new ButtonWidget(boss, prefix + "ThemeButton", _("Theme:"), nullptr, kChooseThemeCmd);
+	new ButtonWidget(boss, prefix + "ThemeButton", Common::convertToU32String(_("Theme:")), nullptr, kChooseThemeCmd);
 	_curTheme = new StaticTextWidget(boss, prefix + "CurTheme", g_gui.theme()->getThemeName());
 
 
-	_rendererPopUpDesc = new StaticTextWidget(boss, prefix + "RendererPopupDesc", _("GUI renderer:"));
+	_rendererPopUpDesc = new StaticTextWidget(boss, prefix + "RendererPopupDesc", Common::convertToU32String(_("GUI renderer:")));
 	_rendererPopUp = new PopUpWidget(boss, prefix + "RendererPopup");
 
 	if (!lowres) {
 		for (uint i = 1; i < GUI::ThemeEngine::_rendererModesSize; ++i)
-			_rendererPopUp->appendEntry(_(GUI::ThemeEngine::_rendererModes[i].name), GUI::ThemeEngine::_rendererModes[i].mode);
+			_rendererPopUp->appendEntry(Common::convertToU32String(_(GUI::ThemeEngine::_rendererModes[i].name)), GUI::ThemeEngine::_rendererModes[i].mode);
 	} else {
 		for (uint i = 1; i < GUI::ThemeEngine::_rendererModesSize; ++i)
-			_rendererPopUp->appendEntry(_(GUI::ThemeEngine::_rendererModes[i].shortname), GUI::ThemeEngine::_rendererModes[i].mode);
+			_rendererPopUp->appendEntry(Common::convertToU32String(_(GUI::ThemeEngine::_rendererModes[i].shortname)), GUI::ThemeEngine::_rendererModes[i].mode);
 	}
 
 	if (!lowres)
-		_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", _("Autosave:"));
+		_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", Common::convertToU32String(_("Autosave:")));
 	else
-		_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", _c("Autosave:", "lowres"));
+		_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", Common::convertToU32String(_c("Autosave:", "lowres")));
 	_autosavePeriodPopUp = new PopUpWidget(boss, prefix + "AutosavePeriodPopup");
 
 	for (int i = 0; savePeriodLabels[i]; i++) {
-		_autosavePeriodPopUp->appendEntry(_(savePeriodLabels[i]), savePeriodValues[i]);
+		_autosavePeriodPopUp->appendEntry(Common::convertToU32String(_(savePeriodLabels[i])), savePeriodValues[i]);
 	}
 
 #ifdef GUI_ENABLE_KEYSDIALOG
@@ -2006,17 +2006,17 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 
 
 #ifdef USE_TRANSLATION
-	_guiLanguagePopUpDesc = new StaticTextWidget(boss, prefix + "GuiLanguagePopupDesc", _("GUI language:"), _("Language of ScummVM GUI"));
+	_guiLanguagePopUpDesc = new StaticTextWidget(boss, prefix + "GuiLanguagePopupDesc", Common::convertToU32String(_("GUI language:")), _("Language of ScummVM GUI"));
 	_guiLanguagePopUp = new PopUpWidget(boss, prefix + "GuiLanguagePopup");
 #ifdef USE_DETECTLANG
-	_guiLanguagePopUp->appendEntry(_("<default>"), Common::kTranslationAutodetectId);
+	_guiLanguagePopUp->appendEntry(Common::convertToU32String(_("<default>")), Common::kTranslationAutodetectId);
 #endif // USE_DETECTLANG
-	_guiLanguagePopUp->appendEntry("English", Common::kTranslationBuiltinId);
-	_guiLanguagePopUp->appendEntry("", 0);
+	_guiLanguagePopUp->appendEntry(Common::convertToU32String("English"), Common::kTranslationBuiltinId);
+	_guiLanguagePopUp->appendEntry(Common::convertToU32String(""), 0);
 	Common::TLangArray languages = TransMan.getSupportedLanguageNames();
 	Common::TLangArray::iterator lang = languages.begin();
 	while (lang != languages.end()) {
-		_guiLanguagePopUp->appendEntry(lang->name, lang->id);
+		_guiLanguagePopUp->appendEntry(Common::convertToU32String(lang->name), lang->id);
 		lang++;
 	}
 
@@ -2046,7 +2046,7 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 
 	if (g_system->hasFeature(OSystem::kFeatureSystemBrowserDialog)) {
 		_useSystemDialogsCheckbox = new CheckboxWidget(boss, prefix + "UseSystemDialogs",
-			_("Use native system file browser"),
+			Common::convertToU32String(_("Use native system file browser")),
 			_("Use the native system file browser instead of the ScummVM one to select a file or directory.")
 		);
 
@@ -2073,7 +2073,7 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 #ifdef USE_CLOUD
 #ifdef USE_LIBCURL
 void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
-	_storagePopUpDesc = new StaticTextWidget(boss, prefix + "StoragePopupDesc", _("Active storage:"), _("Active cloud storage"));
+	_storagePopUpDesc = new StaticTextWidget(boss, prefix + "StoragePopupDesc", Common::convertToU32String(_("Active storage:")), _("Active cloud storage"));
 	_storagePopUp = new PopUpWidget(boss, prefix + "StoragePopup");
 	Common::StringArray list = CloudMan.listStorages();
 	for (uint32 i = 0; i < list.size(); ++i) {
@@ -2082,51 +2082,51 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
 	_storagePopUp->setSelected(_selectedStorageIndex);
 
 	if (lowres)
-		_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", _c("4. Storage is not yet enabled. Verify that username is correct and enable it:", "lowres"));
+		_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", Common::convertToU32String(_c("4. Storage is not yet enabled. Verify that username is correct and enable it:", "lowres")));
 	else
-		_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", _("4. Storage is not yet enabled. Verify that username is correct and enable it:"));
-	_storageEnableButton = new ButtonWidget(boss, prefix + "StorageEnableButton", _("Enable storage"), _("Confirm you want to use this account for this storage"), kEnableStorageCmd);
+		_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", Common::convertToU32String(_("4. Storage is not yet enabled. Verify that username is correct and enable it:")));
+	_storageEnableButton = new ButtonWidget(boss, prefix + "StorageEnableButton", Common::convertToU32String(_("Enable storage")), _("Confirm you want to use this account for this storage"), kEnableStorageCmd);
 
-	_storageUsernameDesc = new StaticTextWidget(boss, prefix + "StorageUsernameDesc", _("Username:"), _("Username used by this storage"));
-	_storageUsername = new StaticTextWidget(boss, prefix + "StorageUsernameLabel", _("<none>"), "", ThemeEngine::kFontStyleNormal);
+	_storageUsernameDesc = new StaticTextWidget(boss, prefix + "StorageUsernameDesc", Common::convertToU32String(_("Username:")), _("Username used by this storage"));
+	_storageUsername = new StaticTextWidget(boss, prefix + "StorageUsernameLabel", Common::convertToU32String(_("<none>")), "", ThemeEngine::kFontStyleNormal);
 
-	_storageUsedSpaceDesc = new StaticTextWidget(boss, prefix + "StorageUsedSpaceDesc", _("Used space:"), _("Space used by ScummVM's saved games on this storage"));
-	_storageUsedSpace = new StaticTextWidget(boss, prefix + "StorageUsedSpaceLabel", "0 bytes", "", ThemeEngine::kFontStyleNormal);
+	_storageUsedSpaceDesc = new StaticTextWidget(boss, prefix + "StorageUsedSpaceDesc", Common::convertToU32String(_("Used space:")), _("Space used by ScummVM's saved games on this storage"));
+	_storageUsedSpace = new StaticTextWidget(boss, prefix + "StorageUsedSpaceLabel", Common::convertToU32String("0 bytes"), "", ThemeEngine::kFontStyleNormal);
 
-	_storageLastSyncDesc = new StaticTextWidget(boss, prefix + "StorageLastSyncDesc", _("Last sync:"), _("When was the last time saved games were synced with this storage"));
-	_storageLastSync = new StaticTextWidget(boss, prefix + "StorageLastSyncLabel", _("<never>"), "", ThemeEngine::kFontStyleNormal);
+	_storageLastSyncDesc = new StaticTextWidget(boss, prefix + "StorageLastSyncDesc", Common::convertToU32String(_("Last sync:")), _("When was the last time saved games were synced with this storage"));
+	_storageLastSync = new StaticTextWidget(boss, prefix + "StorageLastSyncLabel", Common::convertToU32String(_("<never>")), "", ThemeEngine::kFontStyleNormal);
 	if (lowres)
-		_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", _c("Saved games sync automatically on launch, after saving and on loading.", "lowres"), "", ThemeEngine::kFontStyleNormal);
+		_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", Common::convertToU32String(_c("Saved games sync automatically on launch, after saving and on loading.", "lowres")), "", ThemeEngine::kFontStyleNormal);
 	else
-		_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", _("Saved games sync automatically on launch, after saving and on loading."), "", ThemeEngine::kFontStyleNormal);
-	_storageSyncSavesButton = new ButtonWidget(boss, prefix + "SyncSavesButton", _("Sync now"), _("Start saved games sync"), kSyncSavesStorageCmd);
+		_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", Common::convertToU32String(_("Saved games sync automatically on launch, after saving and on loading.")), "", ThemeEngine::kFontStyleNormal);
+	_storageSyncSavesButton = new ButtonWidget(boss, prefix + "SyncSavesButton", Common::convertToU32String(_("Sync now")), _("Start saved games sync"), kSyncSavesStorageCmd);
 
 	if (lowres)
-		_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", _c("You can download game files from your cloud ScummVM folder:", "lowres"));
+		_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", Common::convertToU32String(_c("You can download game files from your cloud ScummVM folder:", "lowres")));
 	else
-		_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", _("You can download game files from your cloud ScummVM folder:"));
-	_storageDownloadButton = new ButtonWidget(boss, prefix + "DownloadButton", _("Download game files"), _("Open downloads manager dialog"), kDownloadStorageCmd);
+		_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", Common::convertToU32String(_("You can download game files from your cloud ScummVM folder:")));
+	_storageDownloadButton = new ButtonWidget(boss, prefix + "DownloadButton", Common::convertToU32String(_("Download game files")), _("Open downloads manager dialog"), kDownloadStorageCmd);
 
 	if (lowres)
-		_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", _c("To change account for this storage, disconnect and connect again:", "lowres"));
+		_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", Common::convertToU32String(_c("To change account for this storage, disconnect and connect again:", "lowres")));
 	else
-		_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", _("To change account for this storage, disconnect and connect again:"));
-	_storageDisconnectButton = new ButtonWidget(boss, prefix + "DisconnectButton", _("Disconnect"), _("Stop using this storage on this device"), kDisconnectStorageCmd);
+		_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", Common::convertToU32String(_("To change account for this storage, disconnect and connect again:")));
+	_storageDisconnectButton = new ButtonWidget(boss, prefix + "DisconnectButton", Common::convertToU32String(_("Disconnect")), _("Stop using this storage on this device"), kDisconnectStorageCmd);
 
 	if (lowres)
-		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", _c("This storage is not connected yet! To connect,", "lowres"));
+		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", Common::convertToU32String(_c("This storage is not connected yet! To connect,", "lowres")));
 	else
-		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", _("This storage is not connected yet! To connect,"));
-	_storageWizardOpenLinkHint = new StaticTextWidget(boss, prefix + "StorageWizardOpenLinkHint", _("1. Open this link:"));
-	_storageWizardLink = new ButtonWidget(boss, prefix + "StorageWizardLink", "https://cloud.scummvm.org/", _("Open URL"), kOpenUrlStorageCmd);
+		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", Common::convertToU32String(_("This storage is not connected yet! To connect,")));
+	_storageWizardOpenLinkHint = new StaticTextWidget(boss, prefix + "StorageWizardOpenLinkHint", Common::convertToU32String(_("1. Open this link:")));
+	_storageWizardLink = new ButtonWidget(boss, prefix + "StorageWizardLink", Common::convertToU32String("https://cloud.scummvm.org/"), _("Open URL"), kOpenUrlStorageCmd);
 	if (lowres)
-		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", _c("2. Get the code and enter it here:", "lowres"));
+		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", Common::convertToU32String(_c("2. Get the code and enter it here:", "lowres")));
 	else
-		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", _("2. Get the code and enter it here:"));
+		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", Common::convertToU32String(_("2. Get the code and enter it here:")));
 	_storageWizardCodeBox = new EditTextWidget(boss, prefix + "StorageWizardCodeBox", "", nullptr, 0, 0, ThemeEngine::kFontStyleConsole);
-	_storageWizardPasteButton = new ButtonWidget(boss, prefix + "StorageWizardPasteButton", _("Paste"), _("Paste code from clipboard"), kPasteCodeStorageCmd);
-	_storageWizardConnectButton = new ButtonWidget(boss, prefix + "StorageWizardConnectButton", _("3. Connect"), _("Connect your cloud storage account"), kConnectStorageCmd);
-	_storageWizardConnectionStatusHint = new StaticTextWidget(boss, prefix + "StorageWizardConnectionStatusHint", "...");
+	_storageWizardPasteButton = new ButtonWidget(boss, prefix + "StorageWizardPasteButton", Common::convertToU32String(_("Paste")), _("Paste code from clipboard"), kPasteCodeStorageCmd);
+	_storageWizardConnectButton = new ButtonWidget(boss, prefix + "StorageWizardConnectButton", Common::convertToU32String(_("3. Connect")), _("Connect your cloud storage account"), kConnectStorageCmd);
+	_storageWizardConnectionStatusHint = new StaticTextWidget(boss, prefix + "StorageWizardConnectionStatusHint", Common::convertToU32String("..."));
 
 	setupCloudTab();
 }
@@ -2134,29 +2134,29 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
 
 #ifdef USE_SDL_NET
 void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
-	_runServerButton = new ButtonWidget(boss, prefix + "RunServerButton", _("Run server"), _("Run local webserver"), kRunServerCmd);
-	_serverInfoLabel = new StaticTextWidget(boss, prefix + "ServerInfoLabel", _("Not running"));
+	_runServerButton = new ButtonWidget(boss, prefix + "RunServerButton", Common::convertToU32String(_("Run server")), _("Run local webserver"), kRunServerCmd);
+	_serverInfoLabel = new StaticTextWidget(boss, prefix + "ServerInfoLabel", Common::convertToU32String(_("Not running")));
 
 	// Root path
 	if (lowres)
-		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", _c("/root/ Path:", "lowres"), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
+		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", Common::convertToU32String(_c("/root/ Path:", "lowres")), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
 	else
-		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", _("/root/ Path:"), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
-	_rootPath = new StaticTextWidget(boss, prefix + "RootPath", "/foo/bar", _("Select which directory will be shown as /root/ in the Files Manager"));
+		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", Common::convertToU32String(_("/root/ Path:")), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
+	_rootPath = new StaticTextWidget(boss, prefix + "RootPath", Common::convertToU32String("/foo/bar"), _("Select which directory will be shown as /root/ in the Files Manager"));
 	_rootPathClearButton = addClearButton(boss, prefix + "RootPathClearButton", kRootPathClearCmd);
 
 	uint32 port = Networking::LocalWebserver::getPort();
 
-	_serverPortDesc = new StaticTextWidget(boss, prefix + "ServerPortDesc", _("Server's port:"), _("Port for server to use"));
+	_serverPortDesc = new StaticTextWidget(boss, prefix + "ServerPortDesc", Common::convertToU32String(_("Server's port:")), _("Port for server to use"));
 	_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), nullptr);
 	_serverPortClearButton = addClearButton(boss, prefix + "ServerPortClearButton", kServerPortClearCmd);
 
 	if (lowres) {
-		_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", _c("Run server to manage files with browser (in the same network).", "lowres"), "", ThemeEngine::kFontStyleNormal);
-		_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", _c("Closing options dialog will stop the server.", "lowres"), "", ThemeEngine::kFontStyleNormal);
+		_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", Common::convertToU32String(_c("Run server to manage files with browser (in the same network).", "lowres")), "", ThemeEngine::kFontStyleNormal);
+		_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", Common::convertToU32String(_c("Closing options dialog will stop the server.", "lowres")), "", ThemeEngine::kFontStyleNormal);
 	} else {
-		_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", _("Run server to manage files with browser (in the same network)."), "", ThemeEngine::kFontStyleNormal);
-		_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", _("Closing options dialog will stop the server."), "", ThemeEngine::kFontStyleNormal);
+		_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", Common::convertToU32String(_("Run server to manage files with browser (in the same network).")), "", ThemeEngine::kFontStyleNormal);
+		_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", Common::convertToU32String(_("Closing options dialog will stop the server.")), "", ThemeEngine::kFontStyleNormal);
 	}
 
 	reflowNetworkTabLayout();
@@ -2168,7 +2168,7 @@ void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::Stri
 #ifdef USE_TTS
 void GlobalOptionsDialog::addAccessibilityControls(GuiObject *boss, const Common::String &prefix) {
 	_ttsCheckbox = new CheckboxWidget(boss, prefix + "TTSCheckbox",
-			_("Use Text to speech"), _("Will read text in gui on mouse over."));
+		Common::convertToU32String(_("Use Text to speech")), _("Will read text in gui on mouse over."));
 	if (ConfMan.hasKey("tts_enabled"))
 		_ttsCheckbox->setState(ConfMan.getBool("tts_enabled", _domain));
 	else
@@ -2181,7 +2181,7 @@ void GlobalOptionsDialog::addAccessibilityControls(GuiObject *boss, const Common
 		voices = ttsMan->getVoicesArray();
 
 	if (voices.empty())
-		_ttsVoiceSelectionPopUp->appendEntry(_("None"), 0);
+		_ttsVoiceSelectionPopUp->appendEntry(Common::convertToU32String(_("None")), 0);
 	else {
 		_ttsVoiceSelectionPopUp->appendEntry(_("<default>"));
 		for(unsigned i = 0; i < voices.size(); i++)
@@ -2200,19 +2200,19 @@ void GlobalOptionsDialog::apply() {
 
 	bool isRebuildNeeded = false;
 
-	Common::String savePath(_savePath->getLabel());
+	Common::String savePath(Common::convertFromU32String(_savePath->getLabel()));
 	if (!savePath.empty() && (savePath != _("Default")))
 		ConfMan.set("savepath", savePath, _domain);
 	else
 		ConfMan.removeKey("savepath", _domain);
 
-	Common::String themePath(_themePath->getLabel());
+	Common::String themePath(Common::convertFromU32String(_themePath->getLabel()));
 	if (!themePath.empty() && (themePath != _c("None", "path")))
 		ConfMan.set("themepath", themePath, _domain);
 	else
 		ConfMan.removeKey("themepath", _domain);
 
-	Common::String extraPath(_extraPath->getLabel());
+	Common::String extraPath(Common::convertFromU32String(_extraPath->getLabel()));
 	if (!extraPath.empty() && (extraPath != _c("None", "path")))
 		ConfMan.set("extrapath", extraPath, _domain);
 	else
@@ -2228,7 +2228,7 @@ void GlobalOptionsDialog::apply() {
 
 #ifdef USE_CLOUD
 #ifdef USE_SDL_NET
-	Common::String rootPath(_rootPath->getLabel());
+	Common::String rootPath(Common::convertFromU32String(_rootPath->getLabel()));
 	if (!rootPath.empty() && (rootPath != _c("None", "path")))
 		ConfMan.set("rootpath", rootPath, "cloud");
 	else
@@ -2459,13 +2459,13 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 #endif
 #endif
 	case kThemePathClearCmd:
-		_themePath->setLabel(_c("None", "path"));
+		_themePath->setLabel(Common::convertToU32String(_c("None", "path")));
 		break;
 	case kExtraPathClearCmd:
-		_extraPath->setLabel(_c("None", "path"));
+		_extraPath->setLabel(Common::convertToU32String(_c("None", "path")));
 		break;
 	case kSavePathClearCmd:
-		_savePath->setLabel(_("Default"));
+		_savePath->setLabel(Common::convertToU32String(_("Default")));
 		break;
 #ifdef DYNAMIC_MODULES
 	case kPluginsPathClearCmd:
@@ -2475,7 +2475,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 #ifdef USE_CLOUD
 #ifdef USE_SDL_NET
 	case kRootPathClearCmd:
-		_rootPath->setLabel(_c("None", "path"));
+		_rootPath->setLabel(Common::convertToU32String(_c("None", "path")));
 		break;
 #endif
 #endif
@@ -2603,7 +2603,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		}
 
 		if (_storageWizardConnectionStatusHint)
-			_storageWizardConnectionStatusHint->setLabel(_("Connecting..."));
+			_storageWizardConnectionStatusHint->setLabel(Common::convertToU32String(_("Connecting...")));
 		CloudMan.connectStorage(
 			_selectedStorageIndex, code,
 			new Common::Callback<GlobalOptionsDialog, Networking::ErrorResponse>(this, &GlobalOptionsDialog::storageConnectionCallback)
@@ -2926,7 +2926,7 @@ void GlobalOptionsDialog::reflowNetworkTabLayout() {
 
 	if (_runServerButton) {
 		_runServerButton->setVisible(true);
-		_runServerButton->setLabel(_(serverIsRunning ? "Stop server" : "Run server"));
+		_runServerButton->setLabel(Common::convertToU32String(_(serverIsRunning ? "Stop server" : "Run server")));
 		_runServerButton->setTooltip(_(serverIsRunning ? "Stop local webserver" : "Run local webserver"));
 	}
 	if (_serverInfoLabel) {
@@ -2934,7 +2934,7 @@ void GlobalOptionsDialog::reflowNetworkTabLayout() {
 		if (serverIsRunning)
 			_serverInfoLabel->setLabel(LocalServer.getAddress());
 		else
-			_serverInfoLabel->setLabel(_("Not running"));
+			_serverInfoLabel->setLabel(Common::convertToU32String(_("Not running")));
 	}
 	if (_rootPathButton) _rootPathButton->setVisible(true);
 	if (_rootPath) _rootPath->setVisible(true);
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index 7670912b1c..ff867a3eea 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -68,10 +68,10 @@ enum {
 };
 
 PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
-	new StaticTextWidget(this, "Predictive.Headline", "Enter Text");
+	new StaticTextWidget(this, "Predictive.Headline", Common::convertToU32String"Enter Text"));
 
-	_button[kCancelAct] =  new ButtonWidget(this, "Predictive.Cancel",  _("Cancel")   , nullptr, kCancelCmd);
-	_button[kOkAct] =      new ButtonWidget(this, "Predictive.OK",      _("Ok")       , nullptr, kOkCmd);
+	_button[kCancelAct] =  new ButtonWidget(this, "Predictive.Cancel",  Common::convertToU32String_("Cancel"))   , nullptr, kCancelCmd);
+	_button[kOkAct] =      new ButtonWidget(this, "Predictive.OK",      Common::convertToU32String_("Ok"))       , nullptr, kOkCmd);
 
 	if (g_gui.useRTL()) {
 		/** If using RTL, swap the internal name of odd columns, to be flipped again when drawing.
@@ -79,32 +79,32 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 			The rest, like okButton, cancel, etc are all flipped.
 		*/
 
-		_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button1", "3  def"      , nullptr, kBut3Cmd);
-		_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", "2  abc"      , nullptr, kBut2Cmd);
-		_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button3", "1  `-.&"     , nullptr, kBut1Cmd);
-		_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button4", "6  mno"      , nullptr, kBut6Cmd);
-		_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", "5  jkl"      , nullptr, kBut5Cmd);
-		_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button6", "4  ghi"      , nullptr, kBut4Cmd);
-		_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button7", "9  wxyz"     , nullptr, kBut9Cmd);
-		_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", "8  tuv"      , nullptr, kBut8Cmd);
-		_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button9", "7  pqrs"     , nullptr, kBut7Cmd);
-		_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", "0"           , nullptr, kBut0Cmd);
+		_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button1", Common::convertToU32String("3  def"      ), nullptr, kBut3Cmd);
+		_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", Common::convertToU32String("2  abc"      ), nullptr, kBut2Cmd);
+		_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button3", Common::convertToU32String("1  `-.&"     ), nullptr, kBut1Cmd);
+		_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button4", Common::convertToU32String("6  mno"      ), nullptr, kBut6Cmd);
+		_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", Common::convertToU32String("5  jkl"      ), nullptr, kBut5Cmd);
+		_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button6", Common::convertToU32String("4  ghi"      ), nullptr, kBut4Cmd);
+		_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button7", Common::convertToU32String("9  wxyz"     ), nullptr, kBut9Cmd);
+		_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", Common::convertToU32String("8  tuv"      ), nullptr, kBut8Cmd);
+		_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button9", Common::convertToU32String("7  pqrs"     ), nullptr, kBut7Cmd);
+		_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", Common::convertToU32String("0"           ), nullptr, kBut0Cmd);
 	} else {
-		_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button1", "1  `-.&"     , nullptr, kBut1Cmd);
-		_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", "2  abc"      , nullptr, kBut2Cmd);
-		_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button3", "3  def"      , nullptr, kBut3Cmd);
-		_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button4", "4  ghi"      , nullptr, kBut4Cmd);
-		_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", "5  jkl"      , nullptr, kBut5Cmd);
-		_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button6", "6  mno"      , nullptr, kBut6Cmd);
-		_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button7", "7  pqrs"     , nullptr, kBut7Cmd);
-		_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", "8  tuv"      , nullptr, kBut8Cmd);
-		_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button9", "9  wxyz"     , nullptr, kBut9Cmd);
-		_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", "0"           , nullptr, kBut0Cmd);
+		_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button1", Common::convertToU32String("1  `-.&"     ), nullptr, kBut1Cmd);
+		_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", Common::convertToU32String("2  abc"      ), nullptr, kBut2Cmd);
+		_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button3", Common::convertToU32String("3  def"      ), nullptr, kBut3Cmd);
+		_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button4", Common::convertToU32String("4  ghi"      ), nullptr, kBut4Cmd);
+		_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", Common::convertToU32String("5  jkl"      ), nullptr, kBut5Cmd);
+		_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button6", Common::convertToU32String("6  mno"      ), nullptr, kBut6Cmd);
+		_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button7", Common::convertToU32String("7  pqrs"     ), nullptr, kBut7Cmd);
+		_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", Common::convertToU32String("8  tuv"      ), nullptr, kBut8Cmd);
+		_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button9", Common::convertToU32String("9  wxyz"     ), nullptr, kBut9Cmd);
+		_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", Common::convertToU32String("0"           ), nullptr, kBut0Cmd);
 	}
 
 	// I18N: You must leave "#" as is, only word 'next' is translatable
-	_button[kNextAct] =    new ButtonWidget(this, "Predictive.Next",    _("#  next")  , nullptr, kNextCmd);
-	_button[kAddAct] =     new ButtonWidget(this, "Predictive.Add",     _("add")      , nullptr, kAddCmd);
+	_button[kNextAct] =    new ButtonWidget(this, "Predictive.Next",    Common::convertToU32String(_("#  next"))  , nullptr, kNextCmd);
+	_button[kAddAct] =     new ButtonWidget(this, "Predictive.Add",     Common::convertToU32String(_("add"))      , nullptr, kAddCmd);
 	_button[kAddAct]->setEnabled(false);
 
 #ifndef DISABLE_FANCY_THEMES
@@ -114,9 +114,9 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 		((PicButtonWidget *)_button[kDelAct])->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelButton));
 	} else
 #endif
-		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , _("<") , nullptr, kDelCmd);
+		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , Common::convertToU32String(_("<")) , nullptr, kDelCmd);
 	// I18N: Pre means 'Predictive', leave '*' as is
-	_button[kModeAct] = new ButtonWidget(this, "Predictive.Pre", _("*  Pre"), nullptr, kModeCmd);
+	_button[kModeAct] = new ButtonWidget(this, "Predictive.Pre", Common::convertToU32String(_("*  Pre")), nullptr, kModeCmd);
 	_editText = new EditTextWidget(this, "Predictive.Word", _search, nullptr, 0, 0);
 
 	_userDictHasChanged = false;
@@ -190,7 +190,7 @@ void PredictiveDialog::reflowLayout() {
 		((PicButtonWidget *)_button[kDelAct])->useThemeTransparency(true);
 		((PicButtonWidget *)_button[kDelAct])->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelButton));
 	} else {
-		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , _("<") , nullptr, kDelCmd);
+		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , Common::convertToU32String(_("<")) , nullptr, kDelCmd);
 	}
 #endif
 
@@ -603,13 +603,13 @@ void PredictiveDialog::processButton(ButtonId button) {
 			if (_mode > kModeAbc) {
 				_mode = kModePre;
 				// I18N: Pre means 'Predictive', leave '*' as is
-				_button[kModeAct]->setLabel(_("*  Pre"));
+				_button[kModeAct]->setLabel(Common::convertToU32String(_("*  Pre")));
 			} else if (_mode == kModeNum) {
 				// I18N: 'Num' means Numbers
-				_button[kModeAct]->setLabel(_("*  Num"));
+				_button[kModeAct]->setLabel(Common::convertToU32String(_("*  Num")));
 			} else {
 				// I18N: 'Abc' means Latin alphabet input
-				_button[kModeAct]->setLabel(_("*  Abc"));
+				_button[kModeAct]->setLabel(Common::convertToU32String(_("*  Abc")));
 				_button[kAddAct]->setEnabled(true);
 			}
 
diff --git a/gui/remotebrowser.cpp b/gui/remotebrowser.cpp
index ffc066976b..2556ff7722 100644
--- a/gui/remotebrowser.cpp
+++ b/gui/remotebrowser.cpp
@@ -46,19 +46,19 @@ RemoteBrowserDialog::RemoteBrowserDialog(const char *title):
 	_workingRequest(nullptr), _ignoreCallback(false) {
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
-	new StaticTextWidget(this, "Browser.Headline", title);
-	_currentPath = new StaticTextWidget(this, "Browser.Path", "DUMMY");
+	new StaticTextWidget(this, "Browser.Headline", Common::convertToU32String(title));
+	_currentPath = new StaticTextWidget(this, "Browser.Path", Common::convertToU32String("DUMMY"));
 
 	_fileList = new ListWidget(this, "Browser.List");
 	_fileList->setNumberingMode(kListNumberingOff);
 	_fileList->setEditable(false);
 
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(this, "Browser.Up", _("Go up"), _("Go to previous directory level"), kGoUpCmd);
+		new ButtonWidget(this, "Browser.Up", Common::convertToU32String(_("Go up")), _("Go to previous directory level"), kGoUpCmd);
 	else
-		new ButtonWidget(this, "Browser.Up", _c("Go up", "lowres"), _("Go to previous directory level"), kGoUpCmd);
-	new ButtonWidget(this, "Browser.Cancel", _("Cancel"), nullptr, kCloseCmd);
-	new ButtonWidget(this, "Browser.Choose", _("Choose"), nullptr, kChooseCmd);
+		new ButtonWidget(this, "Browser.Up", Common::convertToU32String(_c("Go up", "lowres")), _("Go to previous directory level"), kGoUpCmd);
+	new ButtonWidget(this, "Browser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
+	new ButtonWidget(this, "Browser.Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
 }
 
 RemoteBrowserDialog::~RemoteBrowserDialog() {
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 62678647b4..2a57e13c88 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -49,7 +49,7 @@ enum {
 };
 
 SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(bool canRunInBackground): Dialog("SaveLoadCloudSyncProgress"), _close(false) {
-	_label = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.TitleText", "Downloading saves...");
+	_label = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.TitleText", Common::convertToU32String("Downloading saves..."));
 	uint32 progress = (uint32)(100 * CloudMan.getSyncDownloadingProgress());
 	_progressBar = new SliderWidget(this, "SaveLoadCloudSyncProgress.ProgressBar");
 	_progressBar->setMinValue(0);
@@ -57,8 +57,8 @@ SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(bool canRunInBa
 	_progressBar->setValue(progress);
 	_progressBar->setEnabled(false);
 	_percentLabel = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.PercentText", Common::String::format("%u %%", progress));
-	new ButtonWidget(this, "SaveLoadCloudSyncProgress.Cancel", "Cancel", nullptr, kCancelSyncCmd, Common::ASCII_ESCAPE);	// Cancel dialog
-	ButtonWidget *backgroundButton = new ButtonWidget(this, "SaveLoadCloudSyncProgress.Background", "Run in background", nullptr, kBackgroundSyncCmd, Common::ASCII_RETURN);	// Confirm dialog
+	new ButtonWidget(this, "SaveLoadCloudSyncProgress.Cancel", Common::convertToU32String("Cancel"), nullptr, kCancelSyncCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+	ButtonWidget *backgroundButton = new ButtonWidget(this, "SaveLoadCloudSyncProgress.Background", Common::convertToU32String("Run in background"), nullptr, kBackgroundSyncCmd, Common::ASCII_RETURN);	// Confirm dialog
 	backgroundButton->setEnabled(canRunInBackground);
 	g_gui.scheduleTopDialogRedraw();
 }
@@ -358,7 +358,7 @@ ButtonWidget *SaveLoadChooserDialog::createSwitchButton(const Common::String &na
 		((PicButtonWidget *)button)->setGfx(g_gui.theme()->getImageSurface(image));
 	} else
 #endif
-		button = new ButtonWidget(this, name, desc, tooltip, cmd);
+		button = new ButtonWidget(this, name, Common::convertToU32String(desc), tooltip, cmd);
 
 	return button;
 }
@@ -385,16 +385,16 @@ SaveLoadChooserSimple::SaveLoadChooserSimple(const String &title, const String &
 
 	_gfxWidget = new GraphicsWidget(this, 0, 0, 10, 10);
 
-	_date = new StaticTextWidget(this, 0, 0, 10, 10, _("No date saved"), Graphics::kTextAlignCenter);
-	_time = new StaticTextWidget(this, 0, 0, 10, 10, _("No time saved"), Graphics::kTextAlignCenter);
-	_playtime = new StaticTextWidget(this, 0, 0, 10, 10, _("No playtime saved"), Graphics::kTextAlignCenter);
+	_date = new StaticTextWidget(this, 0, 0, 10, 10, Common::convertToU32String(_("No date saved")), Graphics::kTextAlignCenter);
+	_time = new StaticTextWidget(this, 0, 0, 10, 10, Common::convertToU32String(_("No time saved")), Graphics::kTextAlignCenter);
+	_playtime = new StaticTextWidget(this, 0, 0, 10, 10, Common::convertToU32String(_("No playtime saved")), Graphics::kTextAlignCenter);
 
 	// Buttons
-	new ButtonWidget(this, "SaveLoadChooser.Cancel", _("Cancel"), nullptr, kCloseCmd);
-	_chooseButton = new ButtonWidget(this, "SaveLoadChooser.Choose", buttonLabel, nullptr, kChooseCmd);
+	new ButtonWidget(this, "SaveLoadChooser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
+	_chooseButton = new ButtonWidget(this, "SaveLoadChooser.Choose", Common::U32String(buttonLabel), nullptr, kChooseCmd);
 	_chooseButton->setEnabled(false);
 
-	_deleteButton = new ButtonWidget(this, "SaveLoadChooser.Delete", _("Delete"), nullptr, kDelCmd);
+	_deleteButton = new ButtonWidget(this, "SaveLoadChooser.Delete", Common::convertToU32String(_("Delete")), nullptr, kDelCmd);
 	_deleteButton->setEnabled(false);
 
 	_delSupport = _metaInfoSupport = _thumbnailSupport = false;
@@ -564,9 +564,9 @@ void SaveLoadChooserSimple::updateSelection(bool redraw) {
 	// We used to support letting the themes specify the fill color with our
 	// initial theme based GUI. But this support was dropped.
 	_gfxWidget->setGfx(-1, -1, 0, 0, 0);
-	_date->setLabel(_("No date saved"));
-	_time->setLabel(_("No time saved"));
-	_playtime->setLabel(_("No playtime saved"));
+	_date->setLabel(Common::convertToU32String(_("No date saved")));
+	_time->setLabel(Common::convertToU32String(_("No time saved")));
+	_playtime->setLabel(Common::convertToU32String(_("No playtime saved")));
 
 	if (selItem >= 0 && _metaInfoSupport) {
 		SaveStateDescriptor desc = (_saveList[selItem].getLocked() ? _saveList[selItem] : _metaEngine->querySaveMetaInfos(_target.c_str(), _saveList[selItem].getSaveSlot()));
@@ -764,11 +764,11 @@ SaveLoadChooserGrid::SaveLoadChooserGrid(const Common::String &title, bool saveM
 	list->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
 
 	// Buttons
-	new ButtonWidget(this, "SaveLoadChooser.Delete", _("Cancel"), nullptr, kCloseCmd);
-	_nextButton = new ButtonWidget(this, "SaveLoadChooser.Choose", _("Next"), nullptr, kNextCmd);
+	new ButtonWidget(this, "SaveLoadChooser.Delete", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
+	_nextButton = new ButtonWidget(this, "SaveLoadChooser.Choose", Common::convertToU32String(_("Next")), nullptr, kNextCmd);
 	_nextButton->setEnabled(false);
 
-	_prevButton = new ButtonWidget(this, "SaveLoadChooser.Cancel", _("Prev"), nullptr, kPrevCmd);
+	_prevButton = new ButtonWidget(this, "SaveLoadChooser.Cancel", Common::convertToU32String(_("Prev")), nullptr, kPrevCmd);
 	_prevButton->setEnabled(false);
 
 	// Page display
@@ -975,7 +975,7 @@ void SaveLoadChooserGrid::reflowLayout() {
 			// In the save mode we will always create a new save button as the first button.
 			if (_saveMode && curLine == 0 && curColumn == 0) {
 				_newSaveContainer = new ContainerWidget(this, curX, y, containerWidth, containerHeight);
-				ButtonWidget *newSave = new ButtonWidget(_newSaveContainer, dstX, dstY, buttonWidth, buttonHeight, _("New Save"), _("Create a new saved game"), kNewSaveCmd);
+				ButtonWidget *newSave = new ButtonWidget(_newSaveContainer, dstX, dstY, buttonWidth, buttonHeight, Common::convertToU32String(_("New Save")), _("Create a new saved game"), kNewSaveCmd);
 				// In case no more slots are free, we will disable the new save button
 				if (_nextFreeSaveSlot == -1) {
 					newSave->setEnabled(false);
@@ -1162,8 +1162,8 @@ SavenameDialog::SavenameDialog()
 	: Dialog("SavenameDialog") {
 	_title = new StaticTextWidget(this, "SavenameDialog.DescriptionText", Common::String());
 
-	new ButtonWidget(this, "SavenameDialog.Cancel", _("Cancel"), nullptr, kCloseCmd);
-	new ButtonWidget(this, "SavenameDialog.Ok", _("OK"), nullptr, kOKCmd);
+	new ButtonWidget(this, "SavenameDialog.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
+	new ButtonWidget(this, "SavenameDialog.Ok", Common::convertToU32String(_("OK")), nullptr, kOKCmd);
 
 	_description = new EditTextWidget(this, "SavenameDialog.Description", Common::String(), nullptr, 0, kOKCmd);
 
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp
index b78b35daad..b2ccc3631f 100644
--- a/gui/themebrowser.cpp
+++ b/gui/themebrowser.cpp
@@ -42,7 +42,7 @@ enum {
 ThemeBrowser::ThemeBrowser() : Dialog("Browser") {
 	_fileList = nullptr;
 
-	new StaticTextWidget(this, "Browser.Headline", _("Select a Theme"));
+	new StaticTextWidget(this, "Browser.Headline", Common::convertToU32String(_("Select a Theme")));
 
 	// Add file list
 	_fileList = new ListWidget(this, "Browser.List");
@@ -52,8 +52,8 @@ ThemeBrowser::ThemeBrowser() : Dialog("Browser") {
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
 	// Buttons
-	new ButtonWidget(this, "Browser.Cancel", _("Cancel"), nullptr, kCloseCmd);
-	new ButtonWidget(this, "Browser.Choose", _("Choose"), nullptr, kChooseCmd);
+	new ButtonWidget(this, "Browser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
+	new ButtonWidget(this, "Browser.Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
 }
 
 void ThemeBrowser::open() {
diff --git a/gui/unknown-game-dialog.cpp b/gui/unknown-game-dialog.cpp
index 68150c8db0..9ea1150f4f 100644
--- a/gui/unknown-game-dialog.cpp
+++ b/gui/unknown-game-dialog.cpp
@@ -46,22 +46,22 @@ UnknownGameDialog::UnknownGameDialog(const DetectedGame &detectedGame) :
 		_detectedGame(detectedGame) {
 
 	if (detectedGame.canBeAdded) {
-		_addAnywayButton = new ButtonWidget(this, "UnknownGameDialog.Add", _("Add anyway"), nullptr, kAddAnyway);
+		_addAnywayButton = new ButtonWidget(this, "UnknownGameDialog.Add", Common::convertToU32String(_("Add anyway")), nullptr, kAddAnyway);
 	} else {
 		_addAnywayButton = nullptr;
 	}
 
-	_closeButton = new ButtonWidget(this, "UnknownGameDialog.Close", detectedGame.canBeAdded ? _("Cancel") : _("Close"), nullptr, kClose);
+	_closeButton = new ButtonWidget(this, "UnknownGameDialog.Close", detectedGame.canBeAdded ? Common::convertToU32String(_("Cancel")) : Common::convertToU32String(_("Close")), nullptr, kClose);
 
 	//Check if we have clipboard functionality
 	if (g_system->hasFeature(OSystem::kFeatureClipboardSupport)) {
-		_copyToClipboardButton = new ButtonWidget(this, "UnknownGameDialog.Copy", _("Copy to clipboard"), nullptr, kCopyToClipboard);
+		_copyToClipboardButton = new ButtonWidget(this, "UnknownGameDialog.Copy", Common::convertToU32String(_("Copy to clipboard")), nullptr, kCopyToClipboard);
 	} else
 		_copyToClipboardButton = nullptr;
 
 	//Check if we have support for opening URLs
 	if (g_system->hasFeature(OSystem::kFeatureOpenUrl)) {
-		_openBugTrackerUrlButton = new ButtonWidget(this, "UnknownGameDialog.Report", _("Report game"), nullptr, kOpenBugtrackerURL);
+		_openBugTrackerUrlButton = new ButtonWidget(this, "UnknownGameDialog.Report", Common::convertToU32String(_("Report game")), nullptr, kOpenBugtrackerURL);
 	} else
 		_openBugTrackerUrlButton = nullptr;
 
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 14bfc28da7..3f41b5e7c1 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -230,7 +230,7 @@ bool Widget::useRTL() const {
 	return _useRTL;
 }
 
-uint8 Widget::parseHotkey(const Common::String &label) {
+uint8 Widget::parseHotkey(const Common::U32String &label) {
 	if (!label.contains('~'))
 		return 0;
 
@@ -267,14 +267,14 @@ uint8 Widget::parseHotkey(const Common::String &label) {
 	return 0;
 }
 
-Common::String Widget::cleanupHotkey(const Common::String &label) {
+Common::U32String Widget::cleanupHotkey(const Common::U32String &label) {
 	Common::String res;
 
 	for (uint i = 0; i < label.size(); i++)
-		if (label[i] != '~')
+		if (label[i] != '~') 
 			res = res + label[i];
 
-	return res;
+	return Common::U32String(res);
 }
 
 void Widget::read(Common::String str) {
@@ -291,8 +291,8 @@ void Widget::read(Common::String str) {
 
 #pragma mark -
 
-StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip, ThemeEngine::FontStyle font)
-	: Widget(boss, x, y, w, h, tooltip) {
+StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, const char *tooltip, ThemeEngine::FontStyle font)
+	: Widget(boss, x, y, w, h, tooltip), _align(align) {
 	setFlags(WIDGET_ENABLED);
 	_type = kStaticTextWidget;
 	_label = text;
@@ -300,7 +300,7 @@ StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h,
 	_align = Graphics::convertTextAlignH(align, g_gui.useRTL() && _useRTL);
 }
 
-StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip, ThemeEngine::FontStyle font)
+StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::U32String &text, const char *tooltip, ThemeEngine::FontStyle font)
 	: Widget(boss, name, tooltip) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG);
 	_type = kStaticTextWidget;
@@ -315,7 +315,7 @@ void StaticTextWidget::setValue(int value) {
 	_label = Common::String::format("%d", value);
 }
 
-void StaticTextWidget::setLabel(const Common::String &label) {
+void StaticTextWidget::setLabel(const Common::U32String &label) {
 	if (_label != label) {
 		_label = label;
 
@@ -342,7 +342,7 @@ void StaticTextWidget::drawWidget() {
 
 #pragma mark -
 
-ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
+ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
 	: StaticTextWidget(boss, x, y, w, h, cleanupHotkey(label), Graphics::kTextAlignCenter, tooltip), CommandSender(boss),
 	  _cmd(cmd), _hotkey(hotkey), _duringPress(false) {
 
@@ -353,7 +353,7 @@ ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Co
 	_type = kButtonWidget;
 }
 
-ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
+ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
 	: StaticTextWidget(boss, name, cleanupHotkey(label), tooltip), CommandSender(boss),
 	  _cmd(cmd), _hotkey(hotkey), _duringPress(false) {
 	if (hotkey == 0)
@@ -386,7 +386,7 @@ void ButtonWidget::drawWidget() {
 	g_gui.theme()->drawButton(Common::Rect(_x, _y, _x + _w, _y + _h), _label, _state, getFlags());
 }
 
-void ButtonWidget::setLabel(const Common::String &label) {
+void ButtonWidget::setLabel(const Common::U32String &label) {
 	StaticTextWidget::setLabel(cleanupHotkey(label));
 }
 
@@ -404,9 +404,9 @@ ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32
 	} else
 #endif
 		if (!name.empty())
-			button = new ButtonWidget(boss, name, "C", _("Clear value"), cmd);
+			button = new ButtonWidget(boss, name, Common::convertToU32String("C"), _("Clear value"), cmd);
 		else
-			button = new ButtonWidget(boss, x, y, w, h, "C", _("Clear value"), cmd);
+			button = new ButtonWidget(boss, x, y, w, h, Common::convertToU32String("C"), _("Clear value"), cmd);
 
 	return button;
 }
@@ -429,14 +429,14 @@ void ButtonWidget::setUnpressedState() {
 
 #pragma mark -
 
-DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey) :
+DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey) :
 		ButtonWidget(boss, x, y, w, h, label, tooltip, cmd, hotkey) {
 	setFlags(getFlags() | WIDGET_TRACK_MOUSE);
 
 	reset();
 }
 
-DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey) :
+DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey) :
 		ButtonWidget(boss, name, label, tooltip, cmd, hotkey) {
 	setFlags(getFlags() | WIDGET_TRACK_MOUSE);
 
@@ -512,7 +512,7 @@ void DropdownButtonWidget::getMinSize(int &minWidth, int &minHeight) {
 	}
 }
 
-void DropdownButtonWidget::appendEntry(const Common::String &label, uint32 cmd) {
+void DropdownButtonWidget::appendEntry(const Common::U32String &label, uint32 cmd) {
 	Entry e;
 	e.label = label;
 	e.cmd = cmd;
@@ -536,7 +536,7 @@ void DropdownButtonWidget::drawWidget() {
 #pragma mark -
 
 PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd, uint8 hotkey)
-	: ButtonWidget(boss, x, y, w, h, "", tooltip, cmd, hotkey),
+	: ButtonWidget(boss, x, y, w, h, Common::convertToU32String(""), tooltip, cmd, hotkey),
 	  _alpha(255), _transparency(false), _showButton(true) {
 
 	setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG);
@@ -544,7 +544,7 @@ PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, co
 }
 
 PicButtonWidget::PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip, uint32 cmd, uint8 hotkey)
-	: ButtonWidget(boss, name, "", tooltip, cmd, hotkey),
+	: ButtonWidget(boss, name, Common::convertToU32String(""), tooltip, cmd, hotkey),
 	  _alpha(255), _transparency(false), _showButton(true) {
 	setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG);
 	_type = kButtonWidget;
@@ -584,7 +584,7 @@ void PicButtonWidget::setGfx(int w, int h, int r, int g, int b, int statenum) {
 
 void PicButtonWidget::drawWidget() {
 	if (_showButton)
-		g_gui.theme()->drawButton(Common::Rect(_x, _y, _x + _w, _y + _h), "", _state, getFlags());
+		g_gui.theme()->drawButton(Common::Rect(_x, _y, _x + _w, _y + _h), Common::convertToU32String(""), _state, getFlags());
 
 	Graphics::Surface *gfx;
 
@@ -617,13 +617,13 @@ void PicButtonWidget::drawWidget() {
 
 #pragma mark -
 
-CheckboxWidget::CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
+CheckboxWidget::CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
 	: ButtonWidget(boss, x, y, w, h, label, tooltip, cmd, hotkey), _state(false) {
 	setFlags(WIDGET_ENABLED);
 	_type = kCheckboxWidget;
 }
 
-CheckboxWidget::CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
+CheckboxWidget::CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
 	: ButtonWidget(boss, name, label, tooltip, cmd, hotkey), _state(false) {
 	setFlags(WIDGET_ENABLED);
 	_type = kCheckboxWidget;
@@ -679,14 +679,14 @@ void RadiobuttonGroup::setEnabled(bool ena) {
 
 #pragma mark -
 
-RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip, uint8 hotkey)
+RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::U32String &label, const char *tooltip, uint8 hotkey)
 	: ButtonWidget(boss, x, y, w, h, label, tooltip, 0, hotkey), _state(false), _value(value), _group(group) {
 	setFlags(WIDGET_ENABLED);
 	_type = kRadiobuttonWidget;
 	_group->addButton(this);
 }
 
-RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip, uint8 hotkey)
+RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::U32String &label, const char *tooltip, uint8 hotkey)
 	: ButtonWidget(boss, name, label, tooltip, 0, hotkey), _state(false), _value(value), _group(group) {
 	setFlags(WIDGET_ENABLED);
 	_type = kRadiobuttonWidget;
diff --git a/gui/widget.h b/gui/widget.h
index 7a81017f7d..7d1e796101 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -166,8 +166,8 @@ public:
 
 	bool useRTL() const;
 
-	uint8 parseHotkey(const Common::String &label);
-	Common::String cleanupHotkey(const Common::String &label);
+	uint8 parseHotkey(const Common::U32String &label);
+	Common::U32String cleanupHotkey(const Common::U32String &label);
 
 	bool hasTooltip() const { return !_tooltip.empty(); }
 	const Common::String &getTooltip() const { return _tooltip; }
@@ -196,19 +196,19 @@ protected:
 /* StaticTextWidget */
 class StaticTextWidget : public Widget {
 protected:
-	Common::String			_label;
+	Common::U32String		_label;
 	Graphics::TextAlign		_align;
 	ThemeEngine::FontStyle	_font;
 public:
-	StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &text, Graphics::TextAlign align, const char *tooltip = nullptr, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
-	StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip = nullptr, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
+	StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, const char *tooltip = nullptr, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
+	StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::U32String &text, const char *tooltip = nullptr, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
 	void setValue(int value);
-	void setLabel(const Common::String &label);
+	void setLabel(const Common::U32String &label);
 	void handleMouseEntered(int button) override	{ readLabel(); }
-	const Common::String &getLabel() const		{ return _label; }
+	const Common::U32String &getLabel() const		{ return _label; }
 	void setAlign(Graphics::TextAlign align);
 	Graphics::TextAlign getAlign() const		{ return _align; }
-	void readLabel() { read(_label); }
+	void readLabel() { read(Common::convertFromU32String(_label)); }
 
 protected:
 	void drawWidget() override;
@@ -221,15 +221,15 @@ protected:
 	uint32	_cmd;
 	uint8	_hotkey;
 public:
-	ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
-	ButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	ButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
 
 	void getMinSize(int &minWidth, int &minHeight) override;
 
 	void setCmd(uint32 cmd)				{ _cmd = cmd; }
 	uint32 getCmd() const				{ return _cmd; }
 
-	void setLabel(const Common::String &label);
+	void setLabel(const Common::U32String &label);
 
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
 	void handleMouseDown(int x, int y, int button, int clickCount) override;
@@ -247,8 +247,8 @@ protected:
 /* DropdownButtonWidget */
 class DropdownButtonWidget : public ButtonWidget {
 public:
-	DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
-	DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
 
 	void handleMouseMoved(int x, int y, int button) override;
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
@@ -256,12 +256,12 @@ public:
 	void getMinSize(int &minWidth, int &minHeight) override;
 
 
-	void appendEntry(const Common::String &label, uint32 cmd);
+	void appendEntry(const Common::U32String &label, uint32 cmd);
 	void clearEntries();
 
 protected:
 	struct Entry {
-		Common::String label;
+		Common::U32String label;
 		uint32 cmd;
 	};
 	typedef Common::Array<Entry> EntryList;
@@ -307,8 +307,8 @@ class CheckboxWidget : public ButtonWidget {
 protected:
 	bool	_state;
 public:
-	CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
-	CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
 
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
 	void handleMouseEntered(int button) override	{ readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
@@ -353,8 +353,8 @@ protected:
 	int _value;
 
 public:
-	RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip = nullptr, uint8 hotkey = 0);
-	RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip = nullptr, uint8 hotkey = 0);
+	RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::U32String &label, const char *tooltip = nullptr, uint8 hotkey = 0);
+	RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::U32String &label, const char *tooltip = nullptr, uint8 hotkey = 0);
 
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
 	void handleMouseEntered(int button) override	{ readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index e557fc0402..917c74cb0e 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -84,7 +84,7 @@ void PopUpDialog::open() {
 		_w = 0;
 
 		for (uint i = 0; i < _entries.size(); i++) {
-			int width = g_gui.getStringWidth(_entries[i]);
+			int width = g_gui.getStringWidth(Common::convertFromU32String(_entries[i]));
 
 			if (width > _w)
 				_w = width;
@@ -190,7 +190,7 @@ void PopUpDialog::handleMouseMoved(int x, int y, int button) {
 	// ...and update the selection accordingly
 	setSelection(item);
 	if (_lastRead != item && _entries.size() > 0 && item != -1) {
-		read(_entries[item]);
+		read(Common::convertFromU32String(_entries[item]));
 		_lastRead = item;
 	}
 }
@@ -288,7 +288,7 @@ void PopUpDialog::setWidth(uint16 width) {
 	_w = width;
 }
 
-void PopUpDialog::appendEntry(const Common::String &entry) {
+void PopUpDialog::appendEntry(const Common::U32String &entry) {
 	_entries.push_back(entry);
 }
 
@@ -390,7 +390,7 @@ void PopUpDialog::drawMenuEntry(int entry, bool hilite) {
 		w = _w - 2;
 	}
 
-	Common::String &name(_entries[entry]);
+	Common::U32String &name(_entries[entry]);
 
 	Common::Rect r1(x, y, x + w, y + _lineHeight);
 	Common::Rect r2(x + 1, y + 2, x + w, y + 2 + _lineHeight);
@@ -496,7 +496,7 @@ void PopUpWidget::reflowLayout() {
 	Widget::reflowLayout();
 }
 
-void PopUpWidget::appendEntry(const String &entry, uint32 tag) {
+void PopUpWidget::appendEntry(const U32String &entry, uint32 tag) {
 	Entry e;
 	e.name = entry;
 	e.tag = tag;
@@ -529,7 +529,7 @@ void PopUpWidget::setSelectedTag(uint32 tag) {
 }
 
 void PopUpWidget::drawWidget() {
-	Common::String sel;
+	Common::U32String sel;
 	if (_selectedItem >= 0)
 		sel = _entries[_selectedItem].name;
 
diff --git a/gui/widgets/popup.h b/gui/widgets/popup.h
index 7696d04a13..095cf8a48d 100644
--- a/gui/widgets/popup.h
+++ b/gui/widgets/popup.h
@@ -43,10 +43,11 @@ enum {
  */
 class PopUpWidget : public Widget, public CommandSender {
 	typedef Common::String String;
+	typedef Common::U32String U32String;
 
 	struct Entry {
-		String	name;
-		uint32	tag;
+		U32String	name;
+		uint32		tag;
 	};
 	typedef Common::Array<Entry> EntryList;
 protected:
@@ -63,7 +64,7 @@ public:
 	void handleMouseDown(int x, int y, int button, int clickCount) override;
 	void handleMouseWheel(int x, int y, int direction) override;
 
-	void appendEntry(const String &entry, uint32 tag = (uint32)-1);
+	void appendEntry(const U32String &entry, uint32 tag = (uint32)-1);
 	void clearEntries();
 	int numEntries() { return _entries.size(); }
 
@@ -77,7 +78,7 @@ public:
 	uint32 getSelectedTag() const				{ return (_selectedItem >= 0) ? _entries[_selectedItem].tag : (uint32)-1; }
 //	const String& getSelectedString() const		{ return (_selectedItem >= 0) ? _entries[_selectedItem].name : String::emptyString; }
 
-	void handleMouseEntered(int button) override	{ if (_selectedItem != -1) read(_entries[_selectedItem].name); setFlags(WIDGET_HILITED); markAsDirty(); }
+	void handleMouseEntered(int button) override	{ if (_selectedItem != -1) read(Common::convertFromU32String(_entries[_selectedItem].name)); setFlags(WIDGET_HILITED); markAsDirty(); }
 	void handleMouseLeft(int button) override	{ clearFlags(WIDGET_HILITED); markAsDirty(); }
 
 	void reflowLayout() override;
@@ -106,7 +107,7 @@ protected:
 
 	int			_lastRead;
 
-	typedef Common::Array<Common::String> EntryList;
+	typedef Common::Array<Common::U32String> EntryList;
 	EntryList		_entries;
 
 public:
@@ -127,7 +128,7 @@ public:
 	void setLineHeight(int lineHeight);
 	void setWidth(uint16 width);
 
-	void appendEntry(const Common::String &entry);
+	void appendEntry(const Common::U32String &entry);
 	void clearEntries();
 	void setSelection(int item);
 
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp
index 4fde8410ed..e60648f88c 100644
--- a/gui/widgets/tab.cpp
+++ b/gui/widgets/tab.cpp
@@ -73,8 +73,8 @@ void TabWidget::init() {
 	String leftArrow = g_gui.useRTL() ? ">" : "<";
 	String rightArrow = g_gui.useRTL() ? "<" : ">";
 
-	_navLeft = new ButtonWidget(this, x, y, _butW, _butH, leftArrow, nullptr, kCmdLeft);
-	_navRight = new ButtonWidget(this, x + _butW + 2, y, _butW, _butH, rightArrow, nullptr, kCmdRight);
+	_navLeft = new ButtonWidget(this, x, y, _butW, _butH, Common::convertToU32String(leftArrow), nullptr, kCmdLeft);
+	_navRight = new ButtonWidget(this, x + _butW + 2, y, _butW, _butH, Common::convertToU32String(rightArrow), nullptr, kCmdRight);
 
 	_navLeft->setEnabled(false);
 	_navRight->setEnabled(true);
@@ -112,7 +112,7 @@ uint16 TabWidget::getHeight() const {
 	return _h + _tabHeight;
 }
 
-int TabWidget::addTab(const String &title, const String &dialogName) {
+int TabWidget::addTab(const U32String &title, const String &dialogName) {
 	// Add a new tab page
 	Tab newTab;
 	newTab.title = title;
@@ -120,7 +120,7 @@ int TabWidget::addTab(const String &title, const String &dialogName) {
 	newTab.firstWidget = nullptr;
 
 	// Determine the new tab width
-	int newWidth = g_gui.getStringWidth(title) + kTabTitleSpacing;
+	int newWidth = g_gui.getStringWidth(Common::convertFromU32String(title)) + kTabTitleSpacing;
 	if (newWidth < _minTabWidth)
 		newWidth = _minTabWidth;
 	newTab._tabWidth = newWidth;
@@ -260,7 +260,7 @@ void TabWidget::handleMouseMoved(int x, int y, int button) {
 
 	if (tabID <= _lastVisibleTab) {
 		if (tabID != _lastRead) {
-			read(_tabs[tabID].title);
+			read(Common::convertFromU32String(_tabs[tabID].title));
 			_lastRead = tabID;
 		}
 	}
@@ -350,7 +350,7 @@ void TabWidget::reflowLayout() {
 
 	for (uint i = 0; i < _tabs.size(); ++i) {
 		// Determine the new tab width
-		int newWidth = g_gui.getStringWidth(_tabs[i].title) + kTabTitleSpacing;
+		int newWidth = g_gui.getStringWidth(Common::convertFromU32String(_tabs[i].title)) + kTabTitleSpacing;
 		if (newWidth < _minTabWidth)
 			newWidth = _minTabWidth;
 		_tabs[i]._tabWidth = newWidth;
@@ -384,7 +384,7 @@ void TabWidget::reflowLayout() {
 }
 
 void TabWidget::drawWidget() {
-	Common::Array<Common::String> tabs;
+	Common::Array<Common::U32String> tabs;
 	Common::Array<int> widths;
 	for (int i = _firstVisibleTab; i <= _lastVisibleTab; ++i) {
 		tabs.push_back(_tabs[i].title);
diff --git a/gui/widgets/tab.h b/gui/widgets/tab.h
index d7f75bd460..e8ec2bcab8 100644
--- a/gui/widgets/tab.h
+++ b/gui/widgets/tab.h
@@ -36,8 +36,10 @@ enum {
 
 class TabWidget : public Widget {
 	typedef Common::String String;
+	typedef Common::U32String U32String;
+
 	struct Tab {
-		String title;
+		U32String title;
 		String dialogName;
 		Widget *firstWidget;
 		int _tabWidth;
@@ -74,7 +76,7 @@ public:
 	 * Add a new tab with the given title. Returns a unique ID which can be used
 	 * to identify the tab (to remove it / activate it etc.).
 	 */
-	int addTab(const String &title, const String &dialogName);
+	int addTab(const U32String &title, const String &dialogName);
 
 	/**
 	 * Remove the tab with the given tab ID. Disposes all child widgets of that tab.
@@ -98,7 +100,7 @@ public:
 	 */
 	void setActiveTab(int tabID);
 
-	void setTabTitle(int tabID, const String &title) {
+	void setTabTitle(int tabID, const U32String &title) {
 		assert(0 <= tabID && tabID < (int)_tabs.size());
 		_tabs[tabID].title = title;
 	}


Commit: a1a4e0c2d72253c34db7af7f145f411163a0ebb7
    https://github.com/scummvm/scummvm/commit/a1a4e0c2d72253c34db7af7f145f411163a0ebb7
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Overload getStringWidth to accept U32 strings as params

Changed paths:
    gui/ThemeEngine.cpp
    gui/ThemeEngine.h
    gui/gui-manager.h


diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 4121dad173..defcc365fe 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -1580,6 +1580,10 @@ int ThemeEngine::getStringWidth(const Common::String &str, FontStyle font) const
 	return ready() ? _texts[fontStyleToData(font)]->_fontPtr->getStringWidth(str) : 0;
 }
 
+int ThemeEngine::getStringWidth(const Common::U32String &str, FontStyle font) const {
+	return ready() ? _texts[fontStyleToData(font)]->_fontPtr->getStringWidth(str) : 0;
+}
+
 int ThemeEngine::getCharWidth(byte c, FontStyle font) const {
 	return ready() ? _texts[fontStyleToData(font)]->_fontPtr->getCharWidth(c) : 0;
 }
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 5f0d63fcd0..e8d3fb4831 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -389,6 +389,8 @@ public:
 
 	int getStringWidth(const Common::String &str, FontStyle font = kFontStyleBold) const;
 
+	int getStringWidth(const Common::U32String &str, FontStyle font = kFontStyleBold) const;
+
 	int getCharWidth(byte c, FontStyle font = kFontStyleBold) const;
 
 	int getKerningOffset(byte left, byte right, FontStyle font = kFontStyleBold) const;
diff --git a/gui/gui-manager.h b/gui/gui-manager.h
index a8e88a4be2..dea22189c9 100644
--- a/gui/gui-manager.h
+++ b/gui/gui-manager.h
@@ -98,6 +98,7 @@ public:
 	const Graphics::Font &getFont(ThemeEngine::FontStyle style = ThemeEngine::kFontStyleBold) const { return *(_theme->getFont(style)); }
 	int getFontHeight(ThemeEngine::FontStyle style = ThemeEngine::kFontStyleBold) const { return _theme->getFontHeight(style); }
 	int getStringWidth(const Common::String &str, ThemeEngine::FontStyle style = ThemeEngine::kFontStyleBold) const { return _theme->getStringWidth(str, style); }
+	int getStringWidth(const Common::U32String &str, ThemeEngine::FontStyle style = ThemeEngine::kFontStyleBold) const { return _theme->getStringWidth(str, style); }
 	int getCharWidth(byte c, ThemeEngine::FontStyle style = ThemeEngine::kFontStyleBold) const { return _theme->getCharWidth(c, style); }
 	int getKerningOffset(byte left, byte right, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold) const { return _theme->getKerningOffset(left, right, font); }
 


Commit: 4ea2b46ce8809885c725b0be07d328456ade0e20
    https://github.com/scummvm/scummvm/commit/4ea2b46ce8809885c725b0be07d328456ade0e20
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Add asuint64 helper to ustr

Changed paths:
    common/ustr.cpp
    common/ustr.h


diff --git a/common/ustr.cpp b/common/ustr.cpp
index 5a45a8bec1..8fea4ef8dc 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -489,4 +489,13 @@ U32String operator+(const U32String &x, const U32String &y) {
 	return temp;
 }
 
+uint64 U32String::asUint64() const {
+	uint64 result = 0;
+	for (uint32 i = 0; i < _size; ++i) {
+		if (_str[i] < '0' || _str[i] > '9') break;
+		result = result * 10L + (_str[i] - '0');
+	}
+	return result;
+}
+
 } // End of namespace Common
diff --git a/common/ustr.h b/common/ustr.h
index fd93ebd89d..ec5c4c3523 100644
--- a/common/ustr.h
+++ b/common/ustr.h
@@ -231,6 +231,8 @@ public:
     /** Python-like method **/
     String encode(CodePage page = kUtf8) const;
 
+	uint64 asUint64() const;
+
 private:
 	void makeUnique();
 	void ensureCapacity(uint32 new_size, bool keep_old);


Commit: 5f2af6b93ec6de18e5f38193a2c0bfc29b6e5e31
    https://github.com/scummvm/scummvm/commit/5f2af6b93ec6de18e5f38193a2c0bfc29b6e5e31
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Add u32 support to Editables and Dialogs

- Editable widgets
- Lists
- SaveLoad Dialogs
- Browser Dialogs

Changed paths:
    common/str-array.h
    engines/agi/saveload.cpp
    engines/dialogs.cpp
    engines/engine.cpp
    gui/browser.cpp
    gui/browser.h
    gui/chooser.cpp
    gui/chooser.h
    gui/downloaddialog.cpp
    gui/editgamedialog.cpp
    gui/filebrowser-dialog.cpp
    gui/filebrowser-dialog.h
    gui/launcher.cpp
    gui/launcher.h
    gui/massadd.cpp
    gui/massadd.h
    gui/options.cpp
    gui/predictivedialog.cpp
    gui/remotebrowser.cpp
    gui/saveload-dialog.cpp
    gui/saveload-dialog.h
    gui/saveload.cpp
    gui/saveload.h
    gui/themebrowser.cpp
    gui/widgets/editable.cpp
    gui/widgets/editable.h
    gui/widgets/edittext.cpp
    gui/widgets/edittext.h
    gui/widgets/list.cpp
    gui/widgets/list.h


diff --git a/common/str-array.h b/common/str-array.h
index 7a52a314e1..ecd10b459a 100644
--- a/common/str-array.h
+++ b/common/str-array.h
@@ -25,13 +25,15 @@
 
 #include "common/array.h"
 #include "common/str.h"
+#include "common/ustr.h"
 
 namespace Common {
 
 /**
  * An array of of strings.
  */
-typedef Array<String> StringArray;
+typedef Array<String>		StringArray;
+typedef Array<U32String>	U32StringArray;
 
 
 } // End of namespace Common
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 1f23154106..b80f812768 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -752,11 +752,11 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) {
 
 int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 	GUI::SaveLoadChooser *dialog;
-	Common::String desc;
+	Common::U32String desc;
 	int slot;
 
 	if (isSave) {
-		dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
+		dialog = new GUI::SaveLoadChooser(Common::convertToU32String(_("Save game:")), Common::convertToU32String(("Save")), true);
 
 		slot = dialog->runModalWithCurrentTarget();
 		desc = dialog->getResultString();
@@ -767,9 +767,9 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 		}
 
 		if (desc.size() > 28)
-			desc = Common::String(desc.c_str(), 28);
+			desc = Common::U32String(desc.c_str(), 28);
 	} else {
-		dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
+		dialog = new GUI::SaveLoadChooser(Common::convertToU32String(_("Restore game:")), Common::convertToU32String(_("Restore")), false);
 		slot = dialog->runModalWithCurrentTarget();
 	}
 
@@ -779,7 +779,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 		return true;
 
 	if (isSave)
-		return doSave(slot, desc);
+		return doSave(slot, Common::convertFromU32String(desc));
 	else
 		return doLoad(slot, false);
 }
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 7455c6f52e..1adc037ba6 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -99,8 +99,8 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
 		new GUI::ButtonWidget(this, "GlobalMenu.Quit", Common::convertToU32String(_("~Q~uit")), 0, kQuitCmd);
 
 	_aboutDialog = new GUI::AboutDialog();
-	_loadDialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false);
-	_saveDialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
+	_loadDialog = new GUI::SaveLoadChooser(Common::convertToU32String(_("Load game:")), Common::convertToU32String(_("Load")), false);
+	_saveDialog = new GUI::SaveLoadChooser(Common::convertToU32String(_("Save game:")), Common::convertToU32String(_("Save")), true);
 }
 
 MainMenuDialog::~MainMenuDialog() {
@@ -206,13 +206,13 @@ void MainMenuDialog::save() {
 	int slot = _saveDialog->runModalWithCurrentTarget();
 
 	if (slot >= 0) {
-		Common::String result(_saveDialog->getResultString());
+		Common::U32String result(_saveDialog->getResultString());
 		if (result.empty()) {
 			// If the user was lazy and entered no save name, come up with a default name.
 			result = _saveDialog->createDefaultSaveDescription(slot);
 		}
 
-		Common::Error status = _engine->saveGameState(slot, result);
+		Common::Error status = _engine->saveGameState(slot, Common::convertFromU32String(result));
 		if (status.getCode() != Common::kNoError) {
 			Common::String failMessage = Common::String::format(_("Failed to save game (%s)! "
 				  "Please consult the README for basic information, and for "
diff --git a/engines/engine.cpp b/engines/engine.cpp
index ef827f638c..de80b9656e 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -762,7 +762,7 @@ bool Engine::loadGameDialog() {
 		return false;
 	}
 
-	GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false);
+	GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(Common::convertToU32String(_("Load game:")), Common::convertToU32String(_("Load")), false);
 
 	int slotNum;
 	{
@@ -791,14 +791,14 @@ bool Engine::saveGameDialog() {
 		return false;
 	}
 
-	GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
+	GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(Common::convertToU32String(_("Save game:")), Common::convertToU32String(_("Save")), true);
 	int slotNum;
 	{
 		PauseToken pt = pauseEngine();
 		slotNum = dialog->runModalWithCurrentTarget();
 	}
 
-	Common::String desc = dialog->getResultString();
+	Common::U32String desc = dialog->getResultString();
 	if (desc.empty())
 		desc = dialog->createDefaultSaveDescription(slotNum);
 
@@ -807,7 +807,7 @@ bool Engine::saveGameDialog() {
 	if (slotNum < 0)
 		return false;
 
-	Common::Error saveError = saveGameState(slotNum, desc);
+	Common::Error saveError = saveGameState(slotNum, Common::convertFromU32String(desc));
 	if (saveError.getCode() != Common::kNoError) {
 		GUI::MessageDialog errorDialog(saveError.getDesc());
 		errorDialog.runModal();
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 65e9d9081b..320ed18d8c 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -49,7 +49,7 @@ enum {
  * - others???
  */
 
-BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
+BrowserDialog::BrowserDialog(Common::U32String &title, bool dirBrowser)
 	: Dialog("Browser") {
 
 	_title = title;
@@ -59,10 +59,10 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
 	_showHidden = false;
 
 	// Headline - TODO: should be customizable during creation time
-	new StaticTextWidget(this, "Browser.Headline", Common::convertToU32String(title));
+	new StaticTextWidget(this, "Browser.Headline", title);
 
 	// Current path - TODO: handle long paths ?
-	_currentPath = new EditTextWidget(this, "Browser.Path", "", nullptr, 0, kPathEditedCmd);
+	_currentPath = new EditTextWidget(this, "Browser.Path", Common::convertToU32String(""), nullptr, 0, kPathEditedCmd);
 
 	// Add file list
 	_fileList = new ListWidget(this, "Browser.List");
@@ -89,7 +89,7 @@ int BrowserDialog::runModal() {
 	Common::DialogManager *dialogManager = g_system->getDialogManager();
 	if (dialogManager) {
 		if (ConfMan.getBool("gui_browser_native", Common::ConfigManager::kApplicationDomain)) {
-			Common::DialogManager::DialogResult result = dialogManager->showFileBrowser(_title.c_str(), _choice, _isDirBrowser);
+			Common::DialogManager::DialogResult result = dialogManager->showFileBrowser(_title.encode().c_str(), _choice, _isDirBrowser);
 			if (result != Common::DialogManager::kDialogError) {
 				return result;
 			}
@@ -119,7 +119,7 @@ void BrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
 	switch (cmd) {
 	//Search for typed-in directory
 	case kPathEditedCmd:
-		_node = Common::FSNode(_currentPath->getEditString());
+		_node = Common::FSNode(Common::convertFromU32String(_currentPath->getEditString()));
 		updateListing();
 		break;
 	//Search by text input
@@ -201,7 +201,7 @@ void BrowserDialog::updateListing() {
 		Common::sort(_nodeContent.begin(), _nodeContent.end());
 
 	// Populate the ListWidget
-	ListWidget::StringArray list;
+	ListWidget::U32StringArray list;
 	ListWidget::ColorList colors;
 	for (Common::FSList::iterator i = _nodeContent.begin(); i != _nodeContent.end(); ++i) {
 		if (i->isDirectory())
diff --git a/gui/browser.h b/gui/browser.h
index 2dc0128d59..1fd53dcf72 100644
--- a/gui/browser.h
+++ b/gui/browser.h
@@ -36,7 +36,7 @@ class CommandSender;
 
 class BrowserDialog : public Dialog {
 public:
-	BrowserDialog(const char *title, bool dirBrowser);
+	BrowserDialog(Common::U32String &title, bool dirBrowser);
 
 	int runModal() override;
 	void open() override;
@@ -53,9 +53,9 @@ protected:
 	bool _showHidden;
 	CheckboxWidget *_showHiddenWidget;
 
-	Common::FSNode	_choice;
-	Common::String	_title;
-	bool			_isDirBrowser;
+	Common::FSNode		_choice;
+	Common::U32String	_title;
+	bool				_isDirBrowser;
 
 	void updateListing();
 };
diff --git a/gui/chooser.cpp b/gui/chooser.cpp
index 0e15452262..220fc1f5f2 100644
--- a/gui/chooser.cpp
+++ b/gui/chooser.cpp
@@ -48,7 +48,7 @@ ChooserDialog::ChooserDialog(const String &title, String dialogId)
 	_chooseButton->setEnabled(false);
 }
 
-void ChooserDialog::setList(const StringArray& list) {
+void ChooserDialog::setList(const U32StringArray& list) {
 	_list->setList(list);
 }
 
diff --git a/gui/chooser.h b/gui/chooser.h
index e662a38ea5..0c47e58a3b 100644
--- a/gui/chooser.h
+++ b/gui/chooser.h
@@ -40,6 +40,9 @@ class ListWidget;
 class ChooserDialog : public Dialog {
 	typedef Common::String String;
 	typedef Common::Array<Common::String> StringArray;
+
+	typedef Common::U32String U32String;
+	typedef Common::Array<Common::U32String> U32StringArray;
 protected:
 	ListWidget		*_list;
 	ButtonWidget	*_chooseButton;
@@ -47,7 +50,7 @@ protected:
 public:
 	ChooserDialog(const String &title, String dialogId = "Browser");
 
-	void setList(const StringArray& list);
+	void setList(const U32StringArray& list);
 
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 };
diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp
index ba364e86ef..057ea446a9 100644
--- a/gui/downloaddialog.cpp
+++ b/gui/downloaddialog.cpp
@@ -46,7 +46,7 @@ DownloadDialog::DownloadDialog(uint32 storageId, LauncherDialog *launcher) :
 	Dialog("GlobalOptions_Cloud_DownloadDialog"), _launcher(launcher), _close(false) {
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
-	_browser = new BrowserDialog(_("Select directory where to download game data"), true);
+	_browser = new BrowserDialog(Common::convertToU32String(_("Select directory where to download game data")), true);
 	_remoteBrowser = new RemoteBrowserDialog(_("Select directory with game data"));
 
 	_remoteDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.RemoteDirectory", Common::convertToU32String(_("From: ")));
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index 1572910f72..8e785d9b46 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -438,7 +438,7 @@ void EditGameDialog::open() {
 }
 
 void EditGameDialog::apply() {
-	ConfMan.set("description", _descriptionWidget->getEditString(), _domain);
+	ConfMan.set("description", Common::convertFromU32String(_descriptionWidget->getEditString()), _domain);
 
 	Common::Language lang = (Common::Language)_langPopUp->getSelectedTag();
 	if (lang < 0)
@@ -506,7 +506,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 		break;
 	case kCmdChooseSoundFontCmd:
 	{
-		BrowserDialog browser(_("Select SoundFont"), false);
+		BrowserDialog browser(Common::convertToU32String(_("Select SoundFont")), false);
 
 		if (browser.runModal() > 0) {
 			// User made this choice...
@@ -526,7 +526,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	// Change path for the game
 	case kCmdGameBrowser:
 	{
-		BrowserDialog browser(_("Select directory with game data"), true);
+		BrowserDialog browser(Common::convertToU32String(_("Select directory with game data")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -545,7 +545,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	// Change path for extra game data (eg, using sword cutscenes when playing via CD)
 	case kCmdExtraBrowser:
 	{
-		BrowserDialog browser(_("Select additional game directory"), true);
+		BrowserDialog browser(Common::convertToU32String(_("Select additional game directory")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -558,7 +558,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	// Change path for stored save game (perm and temp) data
 	case kCmdSaveBrowser:
 	{
-		BrowserDialog browser(_("Select directory for saved games"), true);
+		BrowserDialog browser(Common::convertToU32String(_("Select directory for saved games")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -584,7 +584,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	case kOKCmd:
 	{
 		// Write back changes made to config object
-		String newDomain(_domainWidget->getEditString());
+		String newDomain(Common::convertFromU32String(_domainWidget->getEditString()));
 		if (newDomain != _domain) {
 			if (newDomain.empty()
 				|| newDomain.hasPrefix("_")
diff --git a/gui/filebrowser-dialog.cpp b/gui/filebrowser-dialog.cpp
index c5e1d52ebf..6fced5e5ad 100644
--- a/gui/filebrowser-dialog.cpp
+++ b/gui/filebrowser-dialog.cpp
@@ -49,7 +49,7 @@ FileBrowserDialog::FileBrowserDialog(const char *title, const char *fileExtensio
 	new StaticTextWidget(this, "FileBrowser.Headline", title ? Common::convertToU32String(title) :
 					mode == kFBModeLoad ? Common::convertToU32String(_("Choose file for loading")) : Common::convertToU32String(_("Enter filename for saving")));
 
-	_fileName = new EditTextWidget(this, "FileBrowser.Filename", "");
+	_fileName = new EditTextWidget(this, "FileBrowser.Filename", Common::convertToU32String(""));
 
 	if (mode == kFBModeLoad)
 		_fileName->setEnabled(false);
@@ -88,7 +88,7 @@ void FileBrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32
 		close();
 		break;
 	case kListSelectionChangedCmd:
-		_fileName->setEditString(_fileList->getList().operator[](_fileList->getSelected()).c_str());
+		_fileName->setEditString(_fileList->getList().operator[](_fileList->getSelected()));
 		_fileName->markAsDirty();
 		break;
 	case kListItemActivatedCmd:
@@ -107,7 +107,7 @@ void FileBrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32
 }
 
 void FileBrowserDialog::normalieFileName() {
-	Common::String filename = _fileName->getEditString();
+	Common::String filename = Common::convertFromU32String(_fileName->getEditString());
 
 	if (filename.matchString(_fileMask, true))
 		return;
@@ -122,7 +122,7 @@ bool FileBrowserDialog::isProceedSave() {
 	if (_mode == kFBModeLoad)
 		return true;
 
-	for (ListWidget::StringArray::const_iterator file = _fileList->getList().begin(); file != _fileList->getList().end(); ++file) {
+	for (ListWidget::U32StringArray::const_iterator file = _fileList->getList().begin(); file != _fileList->getList().end(); ++file) {
 		if (*file == _fileName->getEditString()) {
 			matched = true;
 			break;
@@ -142,13 +142,13 @@ bool FileBrowserDialog::isProceedSave() {
 void FileBrowserDialog::updateListing() {
 	Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
 
-	ListWidget::StringArray list;
+	ListWidget::U32StringArray list;
 
 	Common::StringArray filenames = saveFileMan->listSavefiles(_fileMask);
 	Common::sort(filenames.begin(), filenames.end());
 
 	for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
-		list.push_back(file->c_str());
+		list.push_back(Common::U32String(*file));
 	}
 
 	_fileList->setList(list);
diff --git a/gui/filebrowser-dialog.h b/gui/filebrowser-dialog.h
index ceee9a5274..c59e3fa4e5 100644
--- a/gui/filebrowser-dialog.h
+++ b/gui/filebrowser-dialog.h
@@ -45,7 +45,7 @@ public:
 
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
-	const char *getResult() { return Dialog::getResult() ? _fileName->getEditString().c_str() : nullptr; }
+	const char *getResult() { return Dialog::getResult() ? _fileName->getEditString().encode().c_str() : nullptr; }
 
 protected:
 	EditTextWidget *_fileName;
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index f84ea2ea9f..64f57f015f 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -204,10 +204,10 @@ void LauncherDialog::build() {
 	updateButtons();
 
 	// Create file browser dialog
-	_browser = new BrowserDialog(_("Select directory with game data"), true);
+	_browser = new BrowserDialog(Common::convertToU32String(_("Select directory with game data")), true);
 
 	// Create Load dialog
-	_loadDialog = new SaveLoadChooser(_("Load game:"), _("Load"), false);
+	_loadDialog = new SaveLoadChooser(Common::convertToU32String(_("Load game:")), Common::convertToU32String(_("Load")), false);
 }
 
 void LauncherDialog::clean() {
@@ -255,7 +255,7 @@ void LauncherDialog::close() {
 }
 
 void LauncherDialog::updateListing() {
-	StringArray l;
+	U32StringArray l;
 	ListWidget::ColorList colors;
 	ThemeEngine::FontColor color;
 
@@ -293,7 +293,7 @@ void LauncherDialog::updateListing() {
 			// Insert the game into the launcher list
 			int pos = 0, size = l.size();
 
-			while (pos < size && (scumm_compareDictionary(description.c_str(), l[pos].c_str()) > 0))
+			while (pos < size && (scumm_compareDictionary(description.c_str(), l[pos].encode().c_str()) > 0))
 				pos++;
 
 			color = ThemeEngine::kFontColorNormal;
@@ -323,7 +323,7 @@ void LauncherDialog::updateListing() {
 
 	// Update the filter settings, those are lost when "setList"
 	// is called.
-	_list->setFilter(_searchWidget->getEditString());
+	_list->setFilter(Common::convertFromU32String(_searchWidget->getEditString()));
 }
 
 void LauncherDialog::addGame() {
@@ -562,7 +562,7 @@ bool LauncherDialog::doGameDetection(const Common::String &path) {
 		idx = 0;
 	} else {
 		// Display the candidates to the user and let her/him pick one
-		StringArray list;
+		U32StringArray list;
 		for (idx = 0; idx < (int)candidates.size(); idx++) {
 			Common::String description = candidates[idx].description;
 
@@ -673,11 +673,11 @@ void LauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 		break;
 	case kSearchCmd:
 		// Update the active search filter.
-		_list->setFilter(_searchWidget->getEditString());
+		_list->setFilter(Common::convertFromU32String(_searchWidget->getEditString()));
 		break;
 	case kSearchClearCmd:
 		// Reset the active search filter, thus showing all games again
-		_searchWidget->setEditString("");
+		_searchWidget->setEditString(Common::convertToU32String(""));
 		_list->setFilter("");
 		break;
 	default:
diff --git a/gui/launcher.h b/gui/launcher.h
index 5367d0e15d..b44ca91622 100644
--- a/gui/launcher.h
+++ b/gui/launcher.h
@@ -41,6 +41,9 @@ class SaveLoadChooser;
 class LauncherDialog : public Dialog {
 	typedef Common::String String;
 	typedef Common::Array<Common::String> StringArray;
+
+	typedef Common::U32String U32String;
+	typedef Common::Array<Common::U32String> U32StringArray;
 public:
 	LauncherDialog();
 	~LauncherDialog() override;
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 6989b35a2f..f773186a02 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -64,7 +64,7 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
 	_dirProgressText(nullptr),
 	_gameProgressText(nullptr) {
 
-	StringArray l;
+	U32StringArray l;
 
 	// The dir we start our scan at
 	_scanStack.push(startDir);
diff --git a/gui/massadd.h b/gui/massadd.h
index a4476d63c3..d58ddc6ad2 100644
--- a/gui/massadd.h
+++ b/gui/massadd.h
@@ -36,6 +36,7 @@ class StaticTextWidget;
 
 class MassAddDialog : public Dialog {
 	typedef Common::Array<Common::String> StringArray;
+	typedef Common::Array<Common::U32String> U32StringArray;
 public:
 	MassAddDialog(const Common::FSNode &startDir);
 
diff --git a/gui/options.cpp b/gui/options.cpp
index 9127150fba..351c181c37 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2123,7 +2123,7 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
 		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", Common::convertToU32String(_c("2. Get the code and enter it here:", "lowres")));
 	else
 		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", Common::convertToU32String(_("2. Get the code and enter it here:")));
-	_storageWizardCodeBox = new EditTextWidget(boss, prefix + "StorageWizardCodeBox", "", nullptr, 0, 0, ThemeEngine::kFontStyleConsole);
+	_storageWizardCodeBox = new EditTextWidget(boss, prefix + "StorageWizardCodeBox", Common::convertToU32String(""), nullptr, 0, 0, ThemeEngine::kFontStyleConsole);
 	_storageWizardPasteButton = new ButtonWidget(boss, prefix + "StorageWizardPasteButton", Common::convertToU32String(_("Paste")), _("Paste code from clipboard"), kPasteCodeStorageCmd);
 	_storageWizardConnectButton = new ButtonWidget(boss, prefix + "StorageWizardConnectButton", Common::convertToU32String(_("3. Connect")), _("Connect your cloud storage account"), kConnectStorageCmd);
 	_storageWizardConnectionStatusHint = new StaticTextWidget(boss, prefix + "StorageWizardConnectionStatusHint", Common::convertToU32String("..."));
@@ -2394,7 +2394,7 @@ void GlobalOptionsDialog::close() {
 void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 	switch (cmd) {
 	case kChooseSaveDirCmd: {
-		BrowserDialog browser(_("Select directory for saved games"), true);
+		BrowserDialog browser(Common::convertToU32String(_("Select directory for saved games")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2410,7 +2410,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		break;
 	}
 	case kChooseThemeDirCmd: {
-		BrowserDialog browser(_("Select directory for GUI themes"), true);
+		BrowserDialog browser(Common::convertToU32String(_("Select directory for GUI themes")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2420,7 +2420,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		break;
 	}
 	case kChooseExtraDirCmd: {
-		BrowserDialog browser(_("Select directory for extra files"), true);
+		BrowserDialog browser(Common::convertToU32String(_("Select directory for extra files")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2431,7 +2431,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 	}
 #ifdef DYNAMIC_MODULES
 	case kChoosePluginsDirCmd: {
-		BrowserDialog browser(_("Select directory for plugins"), true);
+		BrowserDialog browser(Common::convertToU32String(_("Select directory for plugins")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2444,7 +2444,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 #ifdef USE_CLOUD
 #ifdef USE_SDL_NET
 	case kChooseRootDirCmd: {
-		BrowserDialog browser(_("Select directory for Files Manager /root/"), true);
+		BrowserDialog browser(Common::convertToU32String(_("Select directory for Files Manager /root/")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2480,7 +2480,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 #endif
 #endif
 	case kChooseSoundFontCmd: {
-		BrowserDialog browser(_("Select SoundFont"), false);
+		BrowserDialog browser(Common::convertToU32String(_("Select SoundFont")), false);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode file(browser.getResult());
@@ -2513,7 +2513,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 	}
 	case kPopUpItemSelectedCmd: {
 		if (_storageWizardCodeBox)
-			_storageWizardCodeBox->setEditString("");
+			_storageWizardCodeBox->setEditString(Common::convertToU32String(""));
 		// update container's scrollbar
 		reflowLayout();
 		break;
@@ -2572,7 +2572,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		break;
 	}
 	case kConnectStorageCmd: {
-		Common::String code = "";
+		Common::U32String code = "";
 		if (_storageWizardCodeBox)
 			code = _storageWizardCodeBox->getEditString();
 		if (code.size() == 0)
@@ -2605,7 +2605,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		if (_storageWizardConnectionStatusHint)
 			_storageWizardConnectionStatusHint->setLabel(Common::convertToU32String(_("Connecting...")));
 		CloudMan.connectStorage(
-			_selectedStorageIndex, code,
+			_selectedStorageIndex, Common::convertFromU32String(code),
 			new Common::Callback<GlobalOptionsDialog, Networking::ErrorResponse>(this, &GlobalOptionsDialog::storageConnectionCallback)
 		);
 		_connectingStorage = true;
@@ -2614,7 +2614,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 	}
 	case kDisconnectStorageCmd: {
 		if (_storageWizardCodeBox)
-			_storageWizardCodeBox->setEditString("");
+			_storageWizardCodeBox->setEditString(Common::convertToU32String(""));
 
 		if (_selectedStorageIndex == CloudMan.getStorageIndex() && CloudMan.isWorking()) {
 			bool cancel = true;
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index ff867a3eea..0c52bb2b6b 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -1024,7 +1024,7 @@ void PredictiveDialog::loadAllDictionary(Dict &dict) {
 void PredictiveDialog::pressEditText() {
 	Common::strlcpy(_predictiveResult, _prefix.c_str(), sizeof(_predictiveResult));
 	Common::strlcat(_predictiveResult, _currentWord.c_str(), sizeof(_predictiveResult));
-	_editText->setEditString(_predictiveResult);
+	_editText->setEditString(Common::convertToU32String(_predictiveResult));
 	//_editText->setCaretPos(_prefix.size() + _currentWord.size());
 	_editText->markAsDirty();
 }
diff --git a/gui/remotebrowser.cpp b/gui/remotebrowser.cpp
index 2556ff7722..ad8bb4fc20 100644
--- a/gui/remotebrowser.cpp
+++ b/gui/remotebrowser.cpp
@@ -144,7 +144,7 @@ void RemoteBrowserDialog::updateListing() {
 
 	if (!_navigationLocked) {
 		// Populate the ListWidget
-		ListWidget::StringArray list;
+		ListWidget::U32StringArray list;
 		ListWidget::ColorList colors;
 		for (Common::Array<Cloud::StorageFile>::iterator i = _nodeContent.begin(); i != _nodeContent.end(); ++i) {
 			if (i->isDirectory()) {
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 2a57e13c88..482ba72e4e 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -371,7 +371,7 @@ enum {
 	kDelCmd = 'DEL '
 };
 
-SaveLoadChooserSimple::SaveLoadChooserSimple(const String &title, const String &buttonLabel, bool saveMode)
+SaveLoadChooserSimple::SaveLoadChooserSimple(const U32String &title, const U32String &buttonLabel, bool saveMode)
 	: SaveLoadChooserDialog("SaveLoadChooser", saveMode), _list(nullptr), _chooseButton(nullptr), _deleteButton(nullptr), _gfxWidget(nullptr),
 	_container(nullptr) {
 	_backgroundType = ThemeEngine::kDialogBackgroundSpecial;
@@ -391,7 +391,7 @@ SaveLoadChooserSimple::SaveLoadChooserSimple(const String &title, const String &
 
 	// Buttons
 	new ButtonWidget(this, "SaveLoadChooser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
-	_chooseButton = new ButtonWidget(this, "SaveLoadChooser.Choose", Common::U32String(buttonLabel), nullptr, kChooseCmd);
+	_chooseButton = new ButtonWidget(this, "SaveLoadChooser.Choose", buttonLabel, nullptr, kChooseCmd);
 	_chooseButton->setEnabled(false);
 
 	_deleteButton = new ButtonWidget(this, "SaveLoadChooser.Delete", Common::convertToU32String(_("Delete")), nullptr, kDelCmd);
@@ -424,7 +424,7 @@ int SaveLoadChooserSimple::runIntern() {
 	return Dialog::runModal();
 }
 
-const Common::String &SaveLoadChooserSimple::getResultString() const {
+const Common::U32String &SaveLoadChooserSimple::getResultString() const {
 	int selItem = _list->getSelected();
 	return (selItem >= 0) ? _list->getSelectedString() : _resultString;
 }
@@ -616,7 +616,7 @@ void SaveLoadChooserSimple::updateSelection(bool redraw) {
 
 			if (_chooseButton->isEnabled() && _list->getSelectedString() == _("Untitled saved game") &&
 					_list->getSelectionColor() == ThemeEngine::kFontColorAlternate) {
-				_list->setEditString("");
+				_list->setEditString(Common::convertToU32String(""));
 				_list->setEditColor(ThemeEngine::kFontColorNormal);
 			}
 		}
@@ -666,7 +666,7 @@ void SaveLoadChooserSimple::close() {
 	_metaEngine = nullptr;
 	_target.clear();
 	_saveList.clear();
-	_list->setList(StringArray());
+	_list->setList(U32StringArray());
 
 	SaveLoadChooserDialog::close();
 }
@@ -676,7 +676,7 @@ void SaveLoadChooserSimple::updateSaveList() {
 
 	int curSlot = 0;
 	int saveSlot = 0;
-	StringArray saveNames;
+	U32StringArray saveNames;
 	ListWidget::ColorList colors;
 	for (SaveStateList::const_iterator x = _saveList.begin(); x != _saveList.end(); ++x) {
 		// Handle gaps in the list of save games
@@ -752,7 +752,7 @@ enum {
 	kNewSaveCmd = 'SAVE'
 };
 
-SaveLoadChooserGrid::SaveLoadChooserGrid(const Common::String &title, bool saveMode)
+SaveLoadChooserGrid::SaveLoadChooserGrid(const Common::U32String &title, bool saveMode)
 	: SaveLoadChooserDialog("SaveLoadChooser", saveMode), _lines(0), _columns(0), _entriesPerPage(0),
 	_curPage(0), _newSaveContainer(nullptr), _nextFreeSaveSlot(0), _buttons() {
 	_backgroundType = ThemeEngine::kDialogBackgroundSpecial;
@@ -772,7 +772,7 @@ SaveLoadChooserGrid::SaveLoadChooserGrid(const Common::String &title, bool saveM
 	_prevButton->setEnabled(false);
 
 	// Page display
-	_pageDisplay = new StaticTextWidget(this, "SaveLoadChooser.PageDisplay", Common::String());
+	_pageDisplay = new StaticTextWidget(this, "SaveLoadChooser.PageDisplay", Common::U32String());
 	_pageDisplay->setAlign(Graphics::kTextAlignEnd);
 }
 
@@ -784,7 +784,7 @@ SaveLoadChooserGrid::~SaveLoadChooserGrid() {
 	delete _pageDisplay;
 }
 
-const Common::String &SaveLoadChooserGrid::getResultString() const {
+const Common::U32String &SaveLoadChooserGrid::getResultString() const {
 	return _resultString;
 }
 
@@ -1170,11 +1170,11 @@ SavenameDialog::SavenameDialog()
 	_targetSlot = 0;
 }
 
-void SavenameDialog::setDescription(const Common::String &desc) {
+void SavenameDialog::setDescription(const Common::U32String &desc) {
 	_description->setEditString(desc);
 }
 
-const Common::String &SavenameDialog::getDescription() {
+const Common::U32String &SavenameDialog::getDescription() {
 	return _description->getEditString();
 }
 
diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h
index ce8b84d987..27b8a6683c 100644
--- a/gui/saveload-dialog.h
+++ b/gui/saveload-dialog.h
@@ -92,7 +92,7 @@ public:
 #endif // !DISABLE_SAVELOADCHOOSER_GRID
 
 	int run(const Common::String &target, const MetaEngine *metaEngine);
-	virtual const Common::String &getResultString() const = 0;
+	virtual const Common::U32String &getResultString() const = 0;
 
 protected:
 	virtual int runIntern() = 0;
@@ -133,12 +133,15 @@ protected:
 class SaveLoadChooserSimple : public SaveLoadChooserDialog {
 	typedef Common::String String;
 	typedef Common::Array<Common::String> StringArray;
+
+	typedef Common::U32String U32String;
+	typedef Common::Array<Common::U32String> U32StringArray;
 public:
-	SaveLoadChooserSimple(const String &title, const String &buttonLabel, bool saveMode);
+	SaveLoadChooserSimple(const U32String &title, const U32String &buttonLabel, bool saveMode);
 
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
-	const Common::String &getResultString() const override;
+	const Common::U32String &getResultString() const override;
 
 	void reflowLayout() override;
 
@@ -163,7 +166,7 @@ private:
 	StaticTextWidget	*_playtime;
 	StaticTextWidget	*_pageTitle;
 
-	String					_resultString;
+	U32String			_resultString;
 
 	void addThumbnailContainer();
 	void updateSelection(bool redraw);
@@ -177,8 +180,8 @@ class SavenameDialog : public Dialog {
 public:
 	SavenameDialog();
 
-	void setDescription(const Common::String &desc);
-	const Common::String &getDescription();
+	void setDescription(const Common::U32String &desc);
+	const Common::U32String &getDescription();
 
 	void setTargetSlot(int slot) { _targetSlot = slot; }
 
@@ -193,10 +196,10 @@ private:
 
 class SaveLoadChooserGrid : public SaveLoadChooserDialog {
 public:
-	SaveLoadChooserGrid(const Common::String &title, bool saveMode);
+	SaveLoadChooserGrid(const Common::U32String &title, bool saveMode);
 	~SaveLoadChooserGrid() override;
 
-	const Common::String &getResultString() const override;
+	const Common::U32String &getResultString() const override;
 
 	void open() override;
 
@@ -224,7 +227,7 @@ private:
 
 	ContainerWidget *_newSaveContainer;
 	int _nextFreeSaveSlot;
-	Common::String _resultString;
+	Common::U32String _resultString;
 
 	SavenameDialog _savenameDialog;
 	bool selectDescription();
diff --git a/gui/saveload.cpp b/gui/saveload.cpp
index a6036eaef4..edaa8de4cd 100644
--- a/gui/saveload.cpp
+++ b/gui/saveload.cpp
@@ -30,7 +30,7 @@
 
 namespace GUI {
 
-SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode)
+SaveLoadChooser::SaveLoadChooser(const U32String &title, const U32String &buttonLabel, bool saveMode)
 	: _impl(nullptr), _title(title), _buttonLabel(buttonLabel), _saveMode(saveMode) {
 }
 
@@ -63,7 +63,7 @@ void SaveLoadChooser::selectChooser(const MetaEngine &engine) {
 #endif // !DISABLE_SAVELOADCHOOSER_GRID
 }
 
-Common::String SaveLoadChooser::createDefaultSaveDescription(const int slot) const {
+Common::U32String SaveLoadChooser::createDefaultSaveDescription(const int slot) const {
 #if defined(USE_SAVEGAME_TIMESTAMP)
 	TimeDate curTime;
 	g_system->getTimeAndDate(curTime);
@@ -113,7 +113,7 @@ int SaveLoadChooser::runModalWithPluginAndTarget(const Plugin *plugin, const Str
 	return ret;
 }
 
-const Common::String &SaveLoadChooser::getResultString() const {
+const Common::U32String &SaveLoadChooser::getResultString() const {
 	assert(_impl);
 	return _impl->getResultString();
 }
diff --git a/gui/saveload.h b/gui/saveload.h
index be0bc4206f..e26ba0886e 100644
--- a/gui/saveload.h
+++ b/gui/saveload.h
@@ -32,16 +32,17 @@ class SaveLoadChooserDialog;
 
 class SaveLoadChooser {
 	typedef Common::String String;
+	typedef Common::U32String U32String;
 protected:
 	SaveLoadChooserDialog *_impl;
 
-	const String _title;
-	const String _buttonLabel;
+	const U32String _title;
+	const U32String _buttonLabel;
 	const bool _saveMode;
 
 	void selectChooser(const MetaEngine &engine);
 public:
-	SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode);
+	SaveLoadChooser(const U32String &title, const U32String &buttonLabel, bool saveMode);
 	~SaveLoadChooser();
 
 	/**
@@ -53,7 +54,7 @@ public:
 	int runModalWithCurrentTarget();
 	int runModalWithPluginAndTarget(const Plugin *plugin, const String &target);
 
-	const Common::String &getResultString() const;
+	const Common::U32String &getResultString() const;
 
 	/**
 	 * Creates a default save description for the specified slot. Depending
@@ -68,7 +69,7 @@ public:
 	 * @param slot The slot number (must be >= 0).
 	 * @return The slot description.
 	 */
-	Common::String createDefaultSaveDescription(const int slot) const;
+	Common::U32String createDefaultSaveDescription(const int slot) const;
 };
 
 } // End of namespace GUI
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp
index b2ccc3631f..b6d0894f66 100644
--- a/gui/themebrowser.cpp
+++ b/gui/themebrowser.cpp
@@ -102,7 +102,7 @@ void ThemeBrowser::updateListing() {
 	const Common::String currentThemeId = g_gui.theme()->getThemeId();
 	int currentThemeIndex = 0, index = 0;
 
-	ListWidget::StringArray list;
+	ListWidget::U32StringArray list;
 	for (ThemeDescList::const_iterator i = _themes.begin(); i != _themes.end(); ++i, ++index) {
 		list.push_back(i->name);
 
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index 1934056c34..bfbf25aa08 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -69,7 +69,7 @@ void EditableWidget::reflowLayout() {
 	}
 }
 
-void EditableWidget::setEditString(const String &str) {
+void EditableWidget::setEditString(const U32String &str) {
 	// TODO: We probably should filter the input string here,
 	// e.g. using tryInsertChar.
 	_editString = str;
@@ -212,7 +212,7 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) {
 	case Common::KEYCODE_c:
 		if (state.flags & Common::KBD_CTRL) {
 			if (!getEditString().empty())
-				g_system->setTextInClipboard(getEditString());
+				g_system->setTextInClipboard(Common::convertFromU32String(getEditString()));
 		} else {
 			defaultKeyDownHandler(state, dirty, forcecaret, handled);
 		}
diff --git a/gui/widgets/editable.h b/gui/widgets/editable.h
index f1b86f75fd..776bbae25f 100644
--- a/gui/widgets/editable.h
+++ b/gui/widgets/editable.h
@@ -42,8 +42,9 @@ namespace GUI {
 class EditableWidget : public Widget, public CommandSender {
 public:
 	typedef Common::String String;
+	typedef Common::U32String U32String;
 protected:
-	String		_editString;
+	U32String	_editString;
 
 	uint32		_cmd;
 
@@ -69,8 +70,8 @@ public:
 
 	void init();
 
-	virtual void setEditString(const String &str);
-	virtual const String &getEditString() const		{ return _editString; }
+	virtual void setEditString(const U32String &str);
+	virtual const U32String &getEditString() const		{ return _editString; }
 
 	void handleTickle() override;
 	bool handleKeyDown(Common::KeyState state) override;
diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp
index b4116f5353..5f1ac81e9f 100644
--- a/gui/widgets/edittext.cpp
+++ b/gui/widgets/edittext.cpp
@@ -28,7 +28,7 @@
 
 namespace GUI {
 
-EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font)
+EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &text, const char *tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font)
 	: EditableWidget(boss, x, y - 1, w, h + 2, tooltip, cmd) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE);
 	_type = kEditTextWidget;
@@ -40,7 +40,7 @@ EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, cons
 	_leftPadding = _rightPadding = 0;
 }
 
-EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font)
+EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const U32String &text, const char *tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font)
 	: EditableWidget(boss, name, tooltip, cmd) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE);
 	_type = kEditTextWidget;
@@ -52,7 +52,7 @@ EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String
 	_leftPadding = _rightPadding = 0;
 }
 
-void EditTextWidget::setEditString(const String &str) {
+void EditTextWidget::setEditString(const U32String &str) {
 	EditableWidget::setEditString(str);
 	_backupString = str;
 }
diff --git a/gui/widgets/edittext.h b/gui/widgets/edittext.h
index d31717517b..b57ec7bc0e 100644
--- a/gui/widgets/edittext.h
+++ b/gui/widgets/edittext.h
@@ -33,17 +33,18 @@ namespace GUI {
 class EditTextWidget : public EditableWidget {
 protected:
 	typedef Common::String String;
+	typedef Common::U32String U32String;
 
-	String		_backupString;
+	U32String		_backupString;
 
 	int				_leftPadding;
 	int				_rightPadding;
 
 public:
-	EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip = nullptr, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
-	EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltp = nullptr, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
+	EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &text, const char *tooltip = nullptr, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
+	EditTextWidget(GuiObject *boss, const String &name, const U32String &text, const char *tooltp = nullptr, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
 
-	void setEditString(const String &str) override;
+	void setEditString(const U32String &str) override;
 
 	void handleMouseDown(int x, int y, int button, int clickCount) override;
 
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index 2ee3a6793b..e0c6fb962f 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -165,7 +165,7 @@ ThemeEngine::FontColor ListWidget::getSelectionColor() const {
 		return _listColors[_listIndex[_selectedItem]];
 }
 
-void ListWidget::setList(const StringArray &list, const ColorList *colors) {
+void ListWidget::setList(const U32StringArray &list, const ColorList *colors) {
 	if (_editMode && _caretVisible)
 		drawCaret(true);
 
@@ -287,7 +287,7 @@ void ListWidget::handleMouseMoved(int x, int y, int button) {
 
 	if (item != -1) {
 		if(_lastRead != item) {
-			read(_dataList[item]);
+			read(Common::convertFromU32String(_dataList[item]));
 			_lastRead = item;
 		}
 	}
@@ -350,8 +350,8 @@ bool ListWidget::handleKeyDown(Common::KeyState state) {
 			int newSelectedItem = 0;
 			int bestMatch = 0;
 			bool stop;
-			for (StringArray::const_iterator i = _list.begin(); i != _list.end(); ++i) {
-				const int match = matchingCharsIgnoringCase(i->c_str(), _quickSelectStr.c_str(), stop, _dictionarySelect);
+			for (U32StringArray::const_iterator i = _list.begin(); i != _list.end(); ++i) {
+				const int match = matchingCharsIgnoringCase(i->encode().c_str(), _quickSelectStr.c_str(), stop, _dictionarySelect);
 				if (match > bestMatch || stop) {
 					_selectedItem = newSelectedItem;
 					bestMatch = match;
@@ -535,7 +535,7 @@ void ListWidget::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 
 void ListWidget::drawWidget() {
 	int i, pos, len = _list.size();
-	Common::String buffer;
+	Common::U32String buffer;
 
 	// Draw a thin frame around the list.
 	g_gui.theme()->drawWidgetBackground(Common::Rect(_x, _y, _x + _w, _y + _h),
@@ -758,8 +758,8 @@ void ListWidget::setFilter(const String &filter, bool redraw) {
 		_list.clear();
 		_listIndex.clear();
 
-		for (StringArray::iterator i = _dataList.begin(); i != _dataList.end(); ++i, ++n) {
-			tmp = *i;
+		for (U32StringArray::iterator i = _dataList.begin(); i != _dataList.end(); ++i, ++n) {
+			tmp = Common::convertFromU32String(*i);
 			tmp.toLowercase();
 			bool matches = true;
 			tok.reset();
diff --git a/gui/widgets/list.h b/gui/widgets/list.h
index 4368686845..c2c0164ece 100644
--- a/gui/widgets/list.h
+++ b/gui/widgets/list.h
@@ -51,10 +51,14 @@ class ListWidget : public EditableWidget {
 public:
 	typedef Common::String String;
 	typedef Common::Array<Common::String> StringArray;
+
+	typedef Common::U32String U32String;
+	typedef Common::Array<Common::U32String> U32StringArray;
+
 	typedef Common::Array<ThemeEngine::FontColor> ColorList;
 protected:
-	StringArray		_list;
-	StringArray		_dataList;
+	U32StringArray	_list;
+	U32StringArray		_dataList;
 	ColorList		_listColors;
 	Common::Array<int>		_listIndex;
 	bool			_editable;
@@ -94,15 +98,15 @@ public:
 	bool containsWidget(Widget *) const override;
 	Widget *findWidget(int x, int y) override;
 
-	void setList(const StringArray &list, const ColorList *colors = nullptr);
-	const StringArray &getList()	const			{ return _dataList; }
+	void setList(const U32StringArray &list, const ColorList *colors = nullptr);
+	const U32StringArray &getList()	const			{ return _dataList; }
 
 	void append(const String &s, ThemeEngine::FontColor color = ThemeEngine::kFontColorNormal);
 
 	void setSelected(int item);
 	int getSelected() const						{ return (_filter.empty() || _selectedItem == -1) ? _selectedItem : _listIndex[_selectedItem]; }
 
-	const String &getSelectedString() const		{ return _list[_selectedItem]; }
+	const U32String &getSelectedString() const		{ return _list[_selectedItem]; }
 	ThemeEngine::FontColor getSelectionColor() const;
 
 	void setNumberingMode(NumberingMode numberingMode)	{ _numberingMode = numberingMode; }


Commit: ad78777bc67c5b554157f51fdeb02f23b2a97efb
    https://github.com/scummvm/scummvm/commit/ad78777bc67c5b554157f51fdeb02f23b2a97efb
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: Handle ellipsis shortening of text when drawing u32 strings

Changed paths:
    graphics/VectorRendererSpec.cpp
    graphics/font.cpp
    graphics/font.h


diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index d10b10df2a..d7eb9bf34c 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -1115,7 +1115,7 @@ drawString(const Graphics::Font *font, const Common::U32String &text, const Comm
 
 	if (!drawArea.isEmpty()) {
 		Surface textAreaSurface = _activeSurface->getSubArea(drawArea);
-		font->drawString(&textAreaSurface, text, area.left - drawArea.left, offset - drawArea.top, area.width() - deltax, _fgColor, alignH, deltax);
+		font->drawString(&textAreaSurface, text, area.left - drawArea.left, offset - drawArea.top, area.width() - deltax, _fgColor, alignH, deltax, ellipsis);
 	}
 }
 
diff --git a/graphics/font.cpp b/graphics/font.cpp
index 32eefc3c3a..62490ba8f7 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -334,17 +334,23 @@ Common::Rect Font::getBoundingBox(const Common::String &input, int x, int y, con
 	return getBoundingBoxImpl(*this, str, x, y, w, align, deltax);
 }
 
-Common::Rect Font::getBoundingBox(const Common::U32String &str, int x, int y, const int w, TextAlign align) const {
+Common::Rect Font::getBoundingBox(const Common::U32String &input, int x, int y, const int w, TextAlign align, int deltax, bool useEllipsis) const {
 	// In case no width was given we cannot any alignment apart from left
 	// alignment.
 	if (w == 0) {
+		if (useEllipsis) {
+			warning("Font::getBoundingBox: Requested ellipsis when no width was specified");
+		}
+
 		if (align != kTextAlignLeft) {
 			warning("Font::getBoundingBox: Requested text alignment when no width was specified");
 		}
 
+		useEllipsis = false;
 		align = kTextAlignLeft;
 	}
 
+	const Common::U32String str = useEllipsis ? handleEllipsis(input, w) : input;
 	return getBoundingBoxImpl(*this, str, x, y, w, align, 0);
 }
 
@@ -369,8 +375,9 @@ void Font::drawString(Surface *dst, const Common::String &str, int x, int y, int
 	drawStringImpl(*this, dst, renderStr, x, y, w, color, align, deltax);
 }
 
-void Font::drawString(Surface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align, int deltax) const {
-	drawStringImpl(*this, dst, str, x, y, w, color, align, deltax);
+void Font::drawString(Surface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const {
+	Common::U32String renderStr = useEllipsis ? handleEllipsis(str, w) : str;
+	drawStringImpl(*this, dst, renderStr, x, y, w, color, align, deltax);
 }
 
 void Font::drawString(ManagedSurface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const {
@@ -380,10 +387,10 @@ void Font::drawString(ManagedSurface *dst, const Common::String &str, int x, int
 	}
 }
 
-void Font::drawString(ManagedSurface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align, int deltax) const {
-	drawString(&dst->_innerSurface, str, x, y, w, color, align, deltax);
+void Font::drawString(ManagedSurface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const {
+	drawString(&dst->_innerSurface, str, x, y, w, color, align, deltax, useEllipsis);
 	if (w != 0) {
-		dst->addDirtyRect(getBoundingBox(str, x, y, w, align));
+		dst->addDirtyRect(getBoundingBox(str, x, y, w, align, useEllipsis));
 	}
 }
 
@@ -477,4 +484,81 @@ TextAlign convertTextAlignH(TextAlign alignH, bool rtl) {
 	}
 }
 
+Common::U32String Font::handleEllipsis(const Common::U32String &input, int w) const {
+	Common::U32String s = input;
+	int width = getStringWidth(s);
+	bool hasEllipsisAtEnd = false;
+
+	if (s.size() > 3 && s[s.size() - 1] == '.' && s[s.size() - 2] == '.' && s[s.size() - 3] == '.') {
+		hasEllipsisAtEnd = true;
+	}
+
+	if (width > w && hasEllipsisAtEnd) {
+		// String is too wide. Check whether it ends in an ellipsis
+		// ("..."). If so, remove that and try again!
+		s.deleteLastChar();
+		s.deleteLastChar();
+		s.deleteLastChar();
+		width = getStringWidth(s);
+	}
+
+	if (width > w) {
+		Common::U32String str;
+		Common::U32String ellipsis("...");
+
+		// String is too wide. So we shorten it "intelligently" by
+		// replacing parts of the string by an ellipsis. There are
+		// three possibilities for this: replace the start, the end, or
+		// the middle of the string. What is best really depends on the
+		// context; but unless we want to make this configurable,
+		// replacing the middle seems to be a good compromise.
+
+		const int ellipsisWidth = getStringWidth(ellipsis);
+
+		// SLOW algorithm to remove enough of the middle. But it is good enough
+		// for now.
+		const int halfWidth = (w - ellipsisWidth) / 2;
+		int w2 = 0;
+		Common::String::unsigned_type last = 0;
+		uint i = 0;
+
+		for (; i < s.size(); ++i) {
+			const Common::String::unsigned_type cur = s[i];
+			int charWidth = getCharWidth(cur) + getKerningOffset(last, cur);
+			if (w2 + charWidth > halfWidth)
+				break;
+			last = cur;
+			w2 += charWidth;
+			str += cur;
+		}
+
+		// At this point we know that the first 'i' chars are together 'w2'
+		// pixels wide. We took the first i-1, and add "..." to them.
+		str += ellipsis;
+		last = '.';
+
+		// The original string is width wide. Of those we already skipped past
+		// w2 pixels, which means (width - w2) remain.
+		// The new str is (w2+ellipsisWidth) wide, so we can accommodate about
+		// (w - (w2+ellipsisWidth)) more pixels.
+		// Thus we skip ((width - w2) - (w - (w2+ellipsisWidth))) =
+		// (width + ellipsisWidth - w)
+		int skip = width + ellipsisWidth - w;
+		for (; i < s.size() && skip > 0; ++i) {
+			const Common::String::unsigned_type cur = s[i];
+			skip -= getCharWidth(cur) + getKerningOffset(last, cur);
+			last = cur;
+		}
+
+		// Append the remaining chars, if any
+		for (; i < s.size(); ++i) {
+			str += s[i];
+		}
+
+		return str;
+	}
+
+	return s;
+}
+
 } // End of namespace Graphics
diff --git a/graphics/font.h b/graphics/font.h
index 487f11b8ca..afd4bc75cf 100644
--- a/graphics/font.h
+++ b/graphics/font.h
@@ -128,7 +128,7 @@ public:
 	 * @return The actual area where the string is drawn.
 	 */
 	Common::Rect getBoundingBox(const Common::String &str, int x = 0, int y = 0, const int w = 0, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = false) const;
-	Common::Rect getBoundingBox(const Common::U32String &str, int x = 0, int _y = 0, const int w = 0, TextAlign align = kTextAlignLeft) const;
+	Common::Rect getBoundingBox(const Common::U32String &str, int x = 0, int _y = 0, const int w = 0, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = false) const;
 
 	/**
 	 * Draw a character at a specific point on a surface.
@@ -155,9 +155,9 @@ public:
 
 	// TODO: Add doxygen comments to this
 	void drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const;
-	void drawString(Surface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0) const;
+	void drawString(Surface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const;
 	void drawString(ManagedSurface *dst, const Common::String &str, int x, int _y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const;
-	void drawString(ManagedSurface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0) const;
+	void drawString(ManagedSurface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const;
 
 	/**
 	 * Compute and return the width the string str has when rendered using this font.
@@ -191,6 +191,7 @@ public:
 
 private:
 	Common::String handleEllipsis(const Common::String &str, int w) const;
+	Common::U32String handleEllipsis(const Common::U32String &str, int w) const;
 };
 
 } // End of namespace Graphics


Commit: aa33fc23542de56ba4de0652fb4735a0e8989329
    https://github.com/scummvm/scummvm/commit/aa33fc23542de56ba4de0652fb4735a0e8989329
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GRAPHICS: Use template for handleEllipsis

Changed paths:
    graphics/font.cpp
    graphics/font.h


diff --git a/graphics/font.cpp b/graphics/font.cpp
index 62490ba8f7..939e2b91e5 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -312,6 +312,84 @@ int wordWrapTextImpl(const Font &font, const StringType &str, int maxWidth, Comm
 	return wrapper.actualMaxLineWidth;
 }
 
+template<typename StringType>
+StringType handleEllipsis(const Font &font, const StringType &input, int w) {
+	StringType s = input;
+	int width = font.getStringWidth(s);
+	bool hasEllipsisAtEnd = false;
+
+	if (s.size() > 3 && s[s.size() - 1] == '.' && s[s.size() - 2] == '.' && s[s.size() - 3] == '.') {
+		hasEllipsisAtEnd = true;
+	}
+
+	if (width > w && hasEllipsisAtEnd) {
+		// String is too wide. Check whether it ends in an ellipsis
+		// ("..."). If so, remove that and try again!
+		s.deleteLastChar();
+		s.deleteLastChar();
+		s.deleteLastChar();
+		width = font.getStringWidth(s);
+	}
+
+	if (width > w) {
+		StringType str;
+		StringType ellipsis("...");
+
+		// String is too wide. So we shorten it "intelligently" by
+		// replacing parts of the string by an ellipsis. There are
+		// three possibilities for this: replace the start, the end, or
+		// the middle of the string. What is best really depends on the
+		// context; but unless we want to make this configurable,
+		// replacing the middle seems to be a good compromise.
+
+		const int ellipsisWidth = font.getStringWidth(ellipsis);
+
+		// SLOW algorithm to remove enough of the middle. But it is good enough
+		// for now.
+		const int halfWidth = (w - ellipsisWidth) / 2;
+		int w2 = 0;
+		Common::String::unsigned_type last = 0;
+		uint i = 0;
+
+		for (; i < s.size(); ++i) {
+			const Common::String::unsigned_type cur = s[i];
+			int charWidth = font.getCharWidth(cur) + font.getKerningOffset(last, cur);
+			if (w2 + charWidth > halfWidth)
+				break;
+			last = cur;
+			w2 += charWidth;
+			str += cur;
+		}
+
+		// At this point we know that the first 'i' chars are together 'w2'
+		// pixels wide. We took the first i-1, and add "..." to them.
+		str += ellipsis;
+		last = '.';
+
+		// The original string is width wide. Of those we already skipped past
+		// w2 pixels, which means (width - w2) remain.
+		// The new str is (w2+ellipsisWidth) wide, so we can accommodate about
+		// (w - (w2+ellipsisWidth)) more pixels.
+		// Thus we skip ((width - w2) - (w - (w2+ellipsisWidth))) =
+		// (width + ellipsisWidth - w)
+		int skip = width + ellipsisWidth - w;
+		for (; i < s.size() && skip > 0; ++i) {
+			const Common::String::unsigned_type cur = s[i];
+			skip -= font.getCharWidth(cur) + font.getKerningOffset(last, cur);
+			last = cur;
+		}
+
+		// Append the remaining chars, if any
+		for (; i < s.size(); ++i) {
+			str += s[i];
+		}
+
+		return str;
+	}
+
+	return s;
+}
+
 } // End of anonymous namespace
 
 Common::Rect Font::getBoundingBox(const Common::String &input, int x, int y, const int w, TextAlign align, int deltax, bool useEllipsis) const {
@@ -330,7 +408,7 @@ Common::Rect Font::getBoundingBox(const Common::String &input, int x, int y, con
 		align = kTextAlignLeft;
 	}
 
-	const Common::String str = useEllipsis ? handleEllipsis(input, w) : input;
+	const Common::String str = useEllipsis ? handleEllipsis(*this, input, w) : input;
 	return getBoundingBoxImpl(*this, str, x, y, w, align, deltax);
 }
 
@@ -350,7 +428,7 @@ Common::Rect Font::getBoundingBox(const Common::U32String &input, int x, int y,
 		align = kTextAlignLeft;
 	}
 
-	const Common::U32String str = useEllipsis ? handleEllipsis(input, w) : input;
+	const Common::U32String str = useEllipsis ? handleEllipsis(*this, input, w) : input;
 	return getBoundingBoxImpl(*this, str, x, y, w, align, 0);
 }
 
@@ -371,12 +449,12 @@ void Font::drawChar(ManagedSurface *dst, uint32 chr, int x, int y, uint32 color)
 }
 
 void Font::drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const {
-	Common::String renderStr = useEllipsis ? handleEllipsis(str, w) : str;
+	Common::String renderStr = useEllipsis ? handleEllipsis(*this, str, w) : str;
 	drawStringImpl(*this, dst, renderStr, x, y, w, color, align, deltax);
 }
 
 void Font::drawString(Surface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const {
-	Common::U32String renderStr = useEllipsis ? handleEllipsis(str, w) : str;
+	Common::U32String renderStr = useEllipsis ? handleEllipsis(*this, str, w) : str;
 	drawStringImpl(*this, dst, renderStr, x, y, w, color, align, deltax);
 }
 
@@ -402,77 +480,6 @@ int Font::wordWrapText(const Common::U32String &str, int maxWidth, Common::Array
 	return wordWrapTextImpl(*this, str, maxWidth, lines, initWidth, evenWidthLinesModeEnabled, wrapOnExplicitNewLines);
 }
 
-Common::String Font::handleEllipsis(const Common::String &input, int w) const {
-	Common::String s = input;
-	int width = getStringWidth(s);
-
-	if (width > w && s.hasSuffix("...")) {
-		// String is too wide. Check whether it ends in an ellipsis
-		// ("..."). If so, remove that and try again!
-		s.deleteLastChar();
-		s.deleteLastChar();
-		s.deleteLastChar();
-		width = getStringWidth(s);
-	}
-
-	if (width > w) {
-		Common::String str;
-
-		// String is too wide. So we shorten it "intelligently" by
-		// replacing parts of the string by an ellipsis. There are
-		// three possibilities for this: replace the start, the end, or
-		// the middle of the string. What is best really depends on the
-		// context; but unless we want to make this configurable,
-		// replacing the middle seems to be a good compromise.
-
-		const int ellipsisWidth = getStringWidth("...");
-
-		// SLOW algorithm to remove enough of the middle. But it is good enough
-		// for now.
-		const int halfWidth = (w - ellipsisWidth) / 2;
-		int w2 = 0;
-		Common::String::unsigned_type last = 0;
-		uint i = 0;
-
-		for (; i < s.size(); ++i) {
-			const Common::String::unsigned_type cur = s[i];
-			int charWidth = getCharWidth(cur) + getKerningOffset(last, cur);
-			if (w2 + charWidth > halfWidth)
-				break;
-			last = cur;
-			w2 += charWidth;
-			str += cur;
-		}
-
-		// At this point we know that the first 'i' chars are together 'w2'
-		// pixels wide. We took the first i-1, and add "..." to them.
-		str += "...";
-		last = '.';
-
-		// The original string is width wide. Of those we already skipped past
-		// w2 pixels, which means (width - w2) remain.
-		// The new str is (w2+ellipsisWidth) wide, so we can accommodate about
-		// (w - (w2+ellipsisWidth)) more pixels.
-		// Thus we skip ((width - w2) - (w - (w2+ellipsisWidth))) =
-		// (width + ellipsisWidth - w)
-		int skip = width + ellipsisWidth - w;
-		for (; i < s.size() && skip > 0; ++i) {
-			const Common::String::unsigned_type cur = s[i];
-			skip -= getCharWidth(cur) + getKerningOffset(last, cur);
-			last = cur;
-		}
-
-		// Append the remaining chars, if any
-		for (; i < s.size(); ++i) {
-			str += s[i];
-		}
-
-		return str;
-	} else {
-		return s;
-	}
-}
-
 TextAlign convertTextAlignH(TextAlign alignH, bool rtl) {
 	switch (alignH) {
 	case kTextAlignStart:
@@ -484,81 +491,4 @@ TextAlign convertTextAlignH(TextAlign alignH, bool rtl) {
 	}
 }
 
-Common::U32String Font::handleEllipsis(const Common::U32String &input, int w) const {
-	Common::U32String s = input;
-	int width = getStringWidth(s);
-	bool hasEllipsisAtEnd = false;
-
-	if (s.size() > 3 && s[s.size() - 1] == '.' && s[s.size() - 2] == '.' && s[s.size() - 3] == '.') {
-		hasEllipsisAtEnd = true;
-	}
-
-	if (width > w && hasEllipsisAtEnd) {
-		// String is too wide. Check whether it ends in an ellipsis
-		// ("..."). If so, remove that and try again!
-		s.deleteLastChar();
-		s.deleteLastChar();
-		s.deleteLastChar();
-		width = getStringWidth(s);
-	}
-
-	if (width > w) {
-		Common::U32String str;
-		Common::U32String ellipsis("...");
-
-		// String is too wide. So we shorten it "intelligently" by
-		// replacing parts of the string by an ellipsis. There are
-		// three possibilities for this: replace the start, the end, or
-		// the middle of the string. What is best really depends on the
-		// context; but unless we want to make this configurable,
-		// replacing the middle seems to be a good compromise.
-
-		const int ellipsisWidth = getStringWidth(ellipsis);
-
-		// SLOW algorithm to remove enough of the middle. But it is good enough
-		// for now.
-		const int halfWidth = (w - ellipsisWidth) / 2;
-		int w2 = 0;
-		Common::String::unsigned_type last = 0;
-		uint i = 0;
-
-		for (; i < s.size(); ++i) {
-			const Common::String::unsigned_type cur = s[i];
-			int charWidth = getCharWidth(cur) + getKerningOffset(last, cur);
-			if (w2 + charWidth > halfWidth)
-				break;
-			last = cur;
-			w2 += charWidth;
-			str += cur;
-		}
-
-		// At this point we know that the first 'i' chars are together 'w2'
-		// pixels wide. We took the first i-1, and add "..." to them.
-		str += ellipsis;
-		last = '.';
-
-		// The original string is width wide. Of those we already skipped past
-		// w2 pixels, which means (width - w2) remain.
-		// The new str is (w2+ellipsisWidth) wide, so we can accommodate about
-		// (w - (w2+ellipsisWidth)) more pixels.
-		// Thus we skip ((width - w2) - (w - (w2+ellipsisWidth))) =
-		// (width + ellipsisWidth - w)
-		int skip = width + ellipsisWidth - w;
-		for (; i < s.size() && skip > 0; ++i) {
-			const Common::String::unsigned_type cur = s[i];
-			skip -= getCharWidth(cur) + getKerningOffset(last, cur);
-			last = cur;
-		}
-
-		// Append the remaining chars, if any
-		for (; i < s.size(); ++i) {
-			str += s[i];
-		}
-
-		return str;
-	}
-
-	return s;
-}
-
 } // End of namespace Graphics
diff --git a/graphics/font.h b/graphics/font.h
index afd4bc75cf..ef4e056d48 100644
--- a/graphics/font.h
+++ b/graphics/font.h
@@ -189,9 +189,6 @@ public:
 	int wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines, int initWidth = 0, bool evenWidthLinesModeEnabled = false, bool wrapOnExplicitNewLines = true) const;
 	int wordWrapText(const Common::U32String &str, int maxWidth, Common::Array<Common::U32String> &lines, int initWidth = 0, bool evenWidthLinesModeEnabled = false, bool wrapOnExplicitNewLines = true) const;
 
-private:
-	Common::String handleEllipsis(const Common::String &str, int w) const;
-	Common::U32String handleEllipsis(const Common::U32String &str, int w) const;
 };
 
 } // End of namespace Graphics


Commit: f800ca4ada8b20f4e898fd60e1f741b5f99b9e5b
    https://github.com/scummvm/scummvm/commit/f800ca4ada8b20f4e898fd60e1f741b5f99b9e5b
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Convert majority of code to use U32

This commit also includes some additional major changes.

- Return U32String from TransMan getTranslation()
- Change tooltips to be U32Strings
- Remove temporary code of convertToU32String
- U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc)
- U32 for music plugins
- U32 for OSD messages
- Add some helper functions to ustr.cpp
- Change default tooltips from nullptr & 0 -> ""
- Some runtime exceptions may occur when changing languages due to incorrect String::Format

Changed paths:
    audio/mididrv.cpp
    audio/mididrv.h
    audio/musicplugin.cpp
    audio/musicplugin.h
    audio/softsynth/mt32.cpp
    backends/base-backend.cpp
    backends/base-backend.h
    backends/cloud/cloudmanager.cpp
    backends/cloud/storage.cpp
    backends/dialogs/win32/win32-dialogs.cpp
    backends/graphics/graphics.h
    backends/graphics/opengl/opengl-graphics.cpp
    backends/graphics/opengl/opengl-graphics.h
    backends/graphics/openglsdl/openglsdl-graphics.cpp
    backends/graphics/sdl/sdl-graphics.cpp
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    backends/graphics/surfacesdl/surfacesdl-graphics.h
    backends/keymapper/action.cpp
    backends/keymapper/action.h
    backends/keymapper/keymap.cpp
    backends/keymapper/keymap.h
    backends/keymapper/remap-widget.cpp
    backends/networking/sdl_net/handlers/createdirectoryhandler.cpp
    backends/networking/sdl_net/handlers/downloadfilehandler.cpp
    backends/networking/sdl_net/handlers/filesajaxpagehandler.cpp
    backends/networking/sdl_net/handlers/filespagehandler.cpp
    backends/networking/sdl_net/handlers/indexpagehandler.cpp
    backends/networking/sdl_net/handlers/listajaxhandler.cpp
    backends/networking/sdl_net/handlers/uploadfilehandler.cpp
    backends/networking/sdl_net/handlerutils.cpp
    backends/networking/sdl_net/handlerutils.h
    backends/networking/sdl_net/uploadfileclienthandler.cpp
    base/main.cpp
    common/achievements.cpp
    common/osd_message_queue.cpp
    common/osd_message_queue.h
    common/system.h
    common/translation.cpp
    common/translation.h
    common/ustr.cpp
    common/ustr.h
    engines/agi/detection.cpp
    engines/agi/saveload.cpp
    engines/dialogs.cpp
    engines/engine.cpp
    engines/game.cpp
    engines/savestate.cpp
    engines/savestate.h
    gui/EventRecorder.cpp
    gui/Tooltip.cpp
    gui/Tooltip.h
    gui/about.cpp
    gui/browser.cpp
    gui/browser.h
    gui/chooser.cpp
    gui/chooser.h
    gui/downloaddialog.cpp
    gui/downloaddialog.h
    gui/editgamedialog.cpp
    gui/editrecorddialog.cpp
    gui/error.cpp
    gui/error.h
    gui/filebrowser-dialog.cpp
    gui/fluidsynth-dialog.cpp
    gui/launcher.cpp
    gui/massadd.cpp
    gui/message.cpp
    gui/message.h
    gui/onscreendialog.cpp
    gui/options.cpp
    gui/predictivedialog.cpp
    gui/recorderdialog.cpp
    gui/remotebrowser.cpp
    gui/remotebrowser.h
    gui/saveload-dialog.cpp
    gui/saveload-dialog.h
    gui/themebrowser.cpp
    gui/themes/scummtheme.py
    gui/unknown-game-dialog.cpp
    gui/updates-dialog.cpp
    gui/widget.cpp
    gui/widget.h
    gui/widgets/editable.cpp
    gui/widgets/editable.h
    gui/widgets/edittext.cpp
    gui/widgets/edittext.h
    gui/widgets/list.cpp
    gui/widgets/list.h
    gui/widgets/popup.cpp
    gui/widgets/popup.h
    gui/widgets/tab.cpp


diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp
index 02ca01058e..1cbe08b854 100644
--- a/audio/mididrv.cpp
+++ b/audio/mididrv.cpp
@@ -146,7 +146,7 @@ MusicType MidiDriver::getMusicType(MidiDriver::DeviceHandle handle) {
 	return MT_INVALID;
 }
 
-Common::String MidiDriver::getDeviceString(DeviceHandle handle, DeviceStringType type) {
+Common::U32String MidiDriver::getDeviceString(DeviceHandle handle, DeviceStringType type) {
 	if (handle) {
 		const PluginList p = MusicMan.getPlugins();
 		for (PluginList::const_iterator m = p.begin(); m != p.end(); m++) {
@@ -250,12 +250,14 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 		break;
 	}
 
-	Common::String failedDevStr;
+	Common::U32String failedDevStr;
 	if (getMusicType(hdl) == MT_INVALID) {
 		// If the expressly selected driver or device cannot be found (no longer compiled in, turned off, etc.)
 		// we display a warning and continue.
 		failedDevStr = selDevStr;
-		Common::String warningMsg = Common::String::format(_("The selected audio device '%s' was not found (e.g. might be turned off or disconnected)."), failedDevStr.c_str()) + " " + _("Attempting to fall back to the next available device...");
+		Common::U32String warningMsg = Common::String::format(
+			Common::convertFromU32String(_("The selected audio device '%s' was not found (e.g. might be turned off or disconnected).")).c_str(),
+			failedDevStr.c_str()) + " " + Common::convertFromU32String(_("Attempting to fall back to the next available device...")).c_str();
 		GUI::MessageDialog dialog(warningMsg);
 		dialog.runModal();
 	}
@@ -267,7 +269,9 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 		} else {
 			// If the expressly selected device cannot be used we display a warning and continue.
 			failedDevStr = getDeviceString(hdl, MidiDriver::kDeviceName);
-			Common::String warningMsg = Common::String::format(_("The selected audio device '%s' cannot be used. See log file for more information."), failedDevStr.c_str()) + " " + _("Attempting to fall back to the next available device...");
+			Common::String warningMsg = Common::String::format(
+				Common::convertFromU32String(_("The selected audio device '%s' cannot be used. See log file for more information.")).c_str(),
+				failedDevStr.c_str()) + " " + Common::convertFromU32String(_("Attempting to fall back to the next available device...")).c_str();
 			GUI::MessageDialog dialog(warningMsg);
 			dialog.runModal();
 		}
@@ -303,7 +307,9 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 					// we display a warning and continue. Don't warn about the missing device if we did already (this becomes relevant if the
 					// missing device is selected as preferred device and also as GM or MT-32 device).
 					if (failedDevStr != devStr) {
-						Common::String warningMsg = Common::String::format(_("The preferred audio device '%s' was not found (e.g. might be turned off or disconnected)."), devStr.c_str()) + " " + _("Attempting to fall back to the next available device...");
+						Common::String warningMsg = Common::String::format(
+							Common::convertFromU32String(_("The preferred audio device '%s' was not found (e.g. might be turned off or disconnected).")).c_str(),
+							devStr.c_str()) + " " + Common::convertFromU32String(_("Attempting to fall back to the next available device...")).c_str();
 						GUI::MessageDialog dialog(warningMsg);
 						dialog.runModal();
 					}
@@ -318,7 +324,9 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 						// Don't warn about the failing device if we did already (this becomes relevant if the failing
 						// device is selected as preferred device and also as GM or MT-32 device).
 						if (failedDevStr != getDeviceString(hdl, MidiDriver::kDeviceName)) {
-							Common::String warningMsg = Common::String::format(_("The preferred audio device '%s' cannot be used. See log file for more information."), getDeviceString(hdl, MidiDriver::kDeviceName).c_str()) + " " + _("Attempting to fall back to the next available device...");
+							Common::String warningMsg = Common::String::format(
+								Common::convertFromU32String(_("The preferred audio device '%s' cannot be used. See log file for more information.")).c_str(),
+								getDeviceString(hdl, MidiDriver::kDeviceName).c_str()) + " " + Common::convertFromU32String(_("Attempting to fall back to the next available device...")).c_str();
 							GUI::MessageDialog dialog(warningMsg);
 							dialog.runModal();
 						}
@@ -438,7 +446,7 @@ bool MidiDriver::checkDevice(MidiDriver::DeviceHandle handle) {
 	return false;
 }
 
-MidiDriver::DeviceHandle MidiDriver::getDeviceHandle(const Common::String &identifier) {
+MidiDriver::DeviceHandle MidiDriver::getDeviceHandle(const Common::U32String &identifier) {
 	const PluginList p = MusicMan.getPlugins();
 
 	if (p.begin() == p.end())
diff --git a/audio/mididrv.h b/audio/mididrv.h
index 6f37125cd7..7b5025eab4 100644
--- a/audio/mididrv.h
+++ b/audio/mididrv.h
@@ -253,7 +253,7 @@ public:
 	static DeviceHandle detectDevice(int flags);
 
 	/** Find the music driver matching the given driver name/description. */
-	static DeviceHandle getDeviceHandle(const Common::String &identifier);
+	static DeviceHandle getDeviceHandle(const Common::U32String &identifier);
 
 	/** Check whether the device with the given handle is available. */
 	static bool checkDevice(DeviceHandle handle);
@@ -262,7 +262,7 @@ public:
 	static MusicType getMusicType(DeviceHandle handle);
 
 	/** Get the device description string matching the given device handle and the given type. */
-	static Common::String getDeviceString(DeviceHandle handle, DeviceStringType type);
+	static Common::U32String getDeviceString(DeviceHandle handle, DeviceStringType type);
 
 	/** Common operations to be done by all drivers on start of send */
 	void midiDriverCommonSend(uint32 b);
diff --git a/audio/musicplugin.cpp b/audio/musicplugin.cpp
index 1903bc9bf1..e18274cffc 100644
--- a/audio/musicplugin.cpp
+++ b/audio/musicplugin.cpp
@@ -29,8 +29,8 @@ MusicDevice::MusicDevice(MusicPluginObject const *musicPlugin, Common::String na
 	_name(_(name)), _type(mt) {
 }
 
-Common::String MusicDevice::getCompleteName() {
-	Common::String name;
+Common::U32String MusicDevice::getCompleteName() {
+	Common::U32String name;
 
 	if (_name.empty()) {
 		// Default device, just show the driver name
@@ -38,18 +38,18 @@ Common::String MusicDevice::getCompleteName() {
 	} else {
 		// Show both device and driver names
 		name = _name;
-		name += " [";
+		name += Common::U32String(" [");
 		name += _musicDriverName;
-		name += "]";
+		name += Common::U32String("]");
 	}
 
 	return name;
 }
 
-Common::String MusicDevice::getCompleteId() {
-	Common::String id = _musicDriverId;
+Common::U32String MusicDevice::getCompleteId() {
+	Common::U32String id = _musicDriverId;
 	if (!_name.empty()) {
-		id += "_";
+		id += Common::U32String("_");
 		id += _name;
 	}
 
@@ -57,5 +57,5 @@ Common::String MusicDevice::getCompleteId() {
 }
 
 MidiDriver::DeviceHandle MusicDevice::getHandle() {
-	return (MidiDriver::DeviceHandle)Common::hashit(getCompleteId().c_str());
+	return (MidiDriver::DeviceHandle)Common::hashit(getCompleteId().encode().c_str());
 }
diff --git a/audio/musicplugin.h b/audio/musicplugin.h
index 705d7a9552..9ae19e545b 100644
--- a/audio/musicplugin.h
+++ b/audio/musicplugin.h
@@ -26,6 +26,7 @@
 #include "base/plugins.h"
 #include "audio/mididrv.h"
 #include "common/list.h"
+#include "common/ustr.h"
 
 namespace Common {
 class Error;
@@ -42,29 +43,29 @@ class MusicDevice {
 public:
 	MusicDevice(MusicPluginObject const *musicPlugin, Common::String name, MusicType mt);
 
-	const Common::String &getName() const { return _name; }
-	const Common::String &getMusicDriverName() const { return _musicDriverName; }
-	const Common::String &getMusicDriverId() const { return _musicDriverId; }
+	const Common::U32String &getName() const { return _name; }
+	const Common::U32String &getMusicDriverName() const { return _musicDriverName; }
+	const Common::U32String &getMusicDriverId() const { return _musicDriverId; }
 	MusicType getMusicType() const { return _type; }
 
 	/**
 	 * Returns a user readable string that contains the name of the current
 	 * device name (if it isn't the default one) and the name of the driver.
 	 */
-	Common::String getCompleteName();
+	Common::U32String getCompleteName();
 
 	/**
 	 * Returns a user readable string that contains the name of the current
 	 * device name (if it isn't the default one) and the id of the driver.
 	 */
-	Common::String getCompleteId();
+	Common::U32String getCompleteId();
 
 	MidiDriver::DeviceHandle getHandle();
 
 private:
-	Common::String _name;
-	Common::String _musicDriverName;
-	Common::String _musicDriverId;
+	Common::U32String _name;
+	Common::U32String _musicDriverName;
+	Common::U32String _musicDriverId;
 	MusicType _type;
 };
 
diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index a1590307a1..1079c4de78 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -67,17 +67,17 @@ public:
 
 	// Callbacks for reporting various errors and information
 	void onErrorControlROM() {
-		GUI::MessageDialog dialog("MT32Emu: Init Error - Missing or invalid Control ROM image", "OK");
+		GUI::MessageDialog dialog(_("MT32Emu: Init Error - Missing or invalid Control ROM image"), _("OK"));
 		dialog.runModal();
 		error("MT32emu: Init Error - Missing or invalid Control ROM image");
 	}
 	void onErrorPCMROM() {
-		GUI::MessageDialog dialog("MT32Emu: Init Error - Missing PCM ROM image", "OK");
+		GUI::MessageDialog dialog(_("MT32Emu: Init Error - Missing PCM ROM image"), _("OK"));
 		dialog.runModal();
 		error("MT32emu: Init Error - Missing PCM ROM image");
 	}
 	void showLCDMessage(const char *message) {
-		Common::OSDMessageQueue::instance().addMessage(message);
+		Common::OSDMessageQueue::instance().addMessage(Common::convertToU32String(message));
 	}
 
 	// Unused callbacks
diff --git a/backends/base-backend.cpp b/backends/base-backend.cpp
index d232a193a8..5fcee25b9f 100644
--- a/backends/base-backend.cpp
+++ b/backends/base-backend.cpp
@@ -33,7 +33,7 @@
 
 #include "gui/message.h"
 
-void BaseBackend::displayMessageOnOSD(const char *msg) {
+void BaseBackend::displayMessageOnOSD(const Common::U32String &msg) {
 	// Display the message for 1.5 seconds
 	GUI::TimedMessageDialog dialog(msg, 1500);
 	dialog.runModal();
diff --git a/backends/base-backend.h b/backends/base-backend.h
index 657a24a099..0e776574f8 100644
--- a/backends/base-backend.h
+++ b/backends/base-backend.h
@@ -30,7 +30,7 @@ class BaseBackend : public OSystem {
 public:
 	virtual void initBackend();
 
-	virtual void displayMessageOnOSD(const char *msg);
+	virtual void displayMessageOnOSD(const Common::U32String &msg);
 	virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) {}
 	virtual void fillScreen(uint32 col);
 };
diff --git a/backends/cloud/cloudmanager.cpp b/backends/cloud/cloudmanager.cpp
index 2828422d4a..65ce5f8748 100644
--- a/backends/cloud/cloudmanager.cpp
+++ b/backends/cloud/cloudmanager.cpp
@@ -153,8 +153,8 @@ void CloudManager::replaceStorage(Storage *storage, uint32 index) {
 	_currentStorageIndex = index;
 	if (_storages[index].username == "") {
 		// options' Cloud tab believes Storage is connected once it has non-empty username
-		_storages[index].username = _("<syncing...>");
-		_storages[index].lastSyncDate = _("<right now>");
+		_storages[index].username = Common::convertFromU32String(_("<syncing...>"));
+		_storages[index].lastSyncDate = Common::convertFromU32String(_("<right now>"));
 		_storages[index].usedBytes = 0;
 	}
 	save();
diff --git a/backends/cloud/storage.cpp b/backends/cloud/storage.cpp
index 753c26c03d..90a554bf9d 100644
--- a/backends/cloud/storage.cpp
+++ b/backends/cloud/storage.cpp
@@ -343,13 +343,15 @@ void Storage::directoryDownloadedCallback(FileArrayResponse response) {
 	_downloadFolderRequest = nullptr;
 	_runningRequestsMutex.unlock();
 
-	Common::String message;
+	Common::U32String message;
 	if (response.value.size()) {
-		message = Common::String::format(_("Download complete.\nFailed to download %u files."), response.value.size());
+		message = Common::String::format(
+			Common::convertFromU32String(_("Download complete.\nFailed to download %u files.")).c_str(),
+			response.value.size());
 	} else {
 		message = _("Download complete.");
 	}
-	Common::OSDMessageQueue::instance().addMessage(message.c_str());
+	Common::OSDMessageQueue::instance().addMessage(message);
 }
 
 void Storage::directoryDownloadedErrorCallback(Networking::ErrorResponse error) {
diff --git a/backends/dialogs/win32/win32-dialogs.cpp b/backends/dialogs/win32/win32-dialogs.cpp
index a8217ba7e0..36c5eb6673 100644
--- a/backends/dialogs/win32/win32-dialogs.cpp
+++ b/backends/dialogs/win32/win32-dialogs.cpp
@@ -134,7 +134,7 @@ Common::DialogManager::DialogResult Win32DialogManager::showFileBrowser(const ch
 		hr = dialog->SetTitle(str);
 		free(str);
 
-		str = Win32::ansiToUnicode(_("Choose"), Win32::getCurrentCharset());
+		str = Win32::ansiToUnicode(Common::convertFromU32String(_("Choose")).c_str(), Win32::getCurrentCharset());
 		hr = dialog->SetOkButtonLabel(str);
 		free(str);
 
diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h
index f672fb2286..48404cdeca 100644
--- a/backends/graphics/graphics.h
+++ b/backends/graphics/graphics.h
@@ -103,7 +103,7 @@ public:
 	virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) = 0;
 	virtual void setCursorPalette(const byte *colors, uint start, uint num) = 0;
 
-	virtual void displayMessageOnOSD(const char *msg) {}
+	virtual void displayMessageOnOSD(const Common::U32String &msg) {}
 	virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) {}
 
 
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index ee098b9dde..006006546a 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -785,7 +785,7 @@ void OpenGLGraphicsManager::setCursorPalette(const byte *colors, uint start, uin
 	updateCursorPalette();
 }
 
-void OpenGLGraphicsManager::displayMessageOnOSD(const char *msg) {
+void OpenGLGraphicsManager::displayMessageOnOSD(const Common::U32String &msg) {
 #ifdef USE_OSD
 	_osdMessageChangeRequest = true;
 
@@ -796,8 +796,8 @@ void OpenGLGraphicsManager::displayMessageOnOSD(const char *msg) {
 #ifdef USE_OSD
 void OpenGLGraphicsManager::osdMessageUpdateSurface() {
 	// Split up the lines.
-	Common::Array<Common::String> osdLines;
-	Common::StringTokenizer tokenizer(_osdMessageNextData, "\n");
+	Common::Array<Common::U32String> osdLines;
+	Common::StringTokenizer tokenizer(Common::convertFromU32String(_osdMessageNextData), "\n");
 	while (!tokenizer.empty()) {
 		osdLines.push_back(tokenizer.nextToken());
 	}
@@ -857,7 +857,7 @@ void OpenGLGraphicsManager::osdMessageUpdateSurface() {
 			ConfMan.getBool("tts_enabled", "scummvm")) {
 		Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 		if (ttsMan)
-			ttsMan->say(_osdMessageNextData);
+			ttsMan->say(Common::convertFromU32String(_osdMessageNextData));
 	}
 #endif // USE_TTS
 	// Clear the text update request
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index e849c017b4..0204db257e 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -29,6 +29,7 @@
 
 #include "common/frac.h"
 #include "common/mutex.h"
+#include "common/ustr.h"
 
 #include "graphics/surface.h"
 
@@ -111,7 +112,7 @@ public:
 	virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) override;
 	virtual void setCursorPalette(const byte *colors, uint start, uint num) override;
 
-	virtual void displayMessageOnOSD(const char *msg) override;
+	virtual void displayMessageOnOSD(const Common::U32String &msg) override;
 	virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) override;
 
 	// PaletteManager interface
@@ -432,7 +433,7 @@ private:
 	 * If this value is not empty, the OSD message will be set
 	 * to it on the next frame.
 	 */
-	Common::String _osdMessageNextData;
+	Common::U32String _osdMessageNextData;
 
 	/**
 	 * Set the OSD message surface with the value of the next OSD message.
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 321ed6f643..ecf4ddb182 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -583,8 +583,8 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 #ifdef USE_OSD
 		int windowWidth = 0, windowHeight = 0;
 		getWindowSizeFromSdl(&windowWidth, &windowHeight);
-		const Common::String osdMsg = Common::String::format(_("Resolution: %dx%d"), windowWidth, windowHeight);
-		displayMessageOnOSD(osdMsg.c_str());
+		const Common::U32String osdMsg = Common::String::format(Common::convertFromU32String(_("Resolution: %dx%d")).c_str(), windowWidth, windowHeight);
+		displayMessageOnOSD(osdMsg);
 #endif
 
 		return true;
@@ -659,11 +659,11 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 		endGFXTransaction();
 
 #ifdef USE_OSD
-		Common::String message = Common::String::format("%s: %s",
+		Common::U32String message = Common::String::format("%s: %s",
 			_("Stretch mode"),
 			_(stretchModes[index].description)
 			);
-		displayMessageOnOSD(message.c_str());
+		displayMessageOnOSD(message);
 #endif
 
 		return true;
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index c798ee0625..b56a768cdc 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -419,7 +419,7 @@ Common::Keymap *SdlGraphicsManager::getKeymap() {
 #ifdef USE_SCALERS
 	struct ActionEntry {
 		const char *id;
-		const char *description;
+		U32String description;
 	};
 	static const ActionEntry filters[] = {
 			{ "FLT1", _s("Switch to nearest neighbour scaling") },
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 61e031e605..0d9b3ef9c9 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2221,11 +2221,11 @@ void SurfaceSdlGraphicsManager::drawMouse() {
 #pragma mark -
 
 #ifdef USE_OSD
-void SurfaceSdlGraphicsManager::displayMessageOnOSD(const char *msg) {
+void SurfaceSdlGraphicsManager::displayMessageOnOSD(const Common::U32String &msg) {
 	assert(_transactionMode == kTransactionNone);
-	assert(msg);
+	assert(!msg.empty());
 #ifdef USE_TTS
-	Common::String textToSay = msg;
+	Common::String textToSay = Common::convertFromU32String(msg);
 #endif // USE_TTS
 
 	Common::StackLock lock(_graphicsMutex);	// Lock the mutex until this function ends
@@ -2236,15 +2236,17 @@ void SurfaceSdlGraphicsManager::displayMessageOnOSD(const char *msg) {
 	const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont);
 
 	// Split the message into separate lines.
-	Common::Array<Common::String> lines;
-	const char *ptr;
-	for (ptr = msg; *ptr; ++ptr) {
-		if (*ptr == '\n') {
-			lines.push_back(Common::String(msg, ptr - msg));
-			msg = ptr + 1;
+	Common::Array<Common::U32String> lines;
+	Common::U32String singleMessage;
+
+	for (Common::U32String::const_iterator itr = msg.begin(); itr != msg.end(); itr++) {
+		if (*itr == '\n') {
+			lines.push_back(singleMessage);
+			singleMessage.clear();
+			continue;
 		}
+		singleMessage += (*itr);
 	}
-	lines.push_back(Common::String(msg, ptr - msg));
 
 	// Determine a rect which would contain the message string (clipped to the
 	// screen dimensions).
@@ -2462,13 +2464,13 @@ void SurfaceSdlGraphicsManager::handleScalerHotkeys(int scalefactor, int scalerT
 			g++;
 		}
 		if (newScalerName) {
-			const Common::String message = Common::String::format(
+			const Common::U32String message = Common::String::format(
 				"%s %s\n%d x %d -> %d x %d",
 				_("Active graphics filter:"),
 				newScalerName,
 				_videoMode.screenWidth, _videoMode.screenHeight,
 				_hwScreen->w, _hwScreen->h);
-			displayMessageOnOSD(message.c_str());
+			displayMessageOnOSD(message);
 		}
 #endif
 
@@ -2495,7 +2497,7 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 			setFeatureState(OSystem::kFeatureAspectRatioCorrection, !_videoMode.aspectRatioCorrection);
 		endGFXTransaction();
 #ifdef USE_OSD
-		Common::String message;
+		Common::U32String message;
 		if (_videoMode.aspectRatioCorrection)
 			message = Common::String::format("%s\n%d x %d -> %d x %d",
 			                                 _("Enabled aspect ratio correction"),
@@ -2508,7 +2510,7 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 			                                 _videoMode.screenWidth, _videoMode.screenHeight,
 			                                 _hwScreen->w, _hwScreen->h
 			);
-		displayMessageOnOSD(message.c_str());
+		displayMessageOnOSD(message);
 #endif
 		internUpdateScreen();
 		return true;
@@ -2550,11 +2552,11 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 		endGFXTransaction();
 
 #ifdef USE_OSD
-		Common::String message = Common::String::format("%s: %s",
+		Common::U32String message = Common::String::format("%s: %s",
 		                                                _("Stretch mode"),
 		                                                _(s_supportedStretchModes[index].description)
 		);
-		displayMessageOnOSD(message.c_str());
+		displayMessageOnOSD(message);
 #endif
 		_forceRedraw = true;
 		internUpdateScreen();
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h
index 0bd98dc6dd..138186fdb5 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.h
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h
@@ -134,7 +134,7 @@ public:
 	virtual void setCursorPalette(const byte *colors, uint start, uint num) override;
 
 #ifdef USE_OSD
-	virtual void displayMessageOnOSD(const char *msg) override;
+	virtual void displayMessageOnOSD(const Common::U32String &msg) override;
 	virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) override;
 #endif
 
diff --git a/backends/keymapper/action.cpp b/backends/keymapper/action.cpp
index 948c359441..d7c75e94e5 100644
--- a/backends/keymapper/action.cpp
+++ b/backends/keymapper/action.cpp
@@ -26,7 +26,7 @@
 
 namespace Common {
 
-Action::Action(const char *i, const String &des) :
+Action::Action(const char *i, const U32String &des) :
 		id(i),
 		description(des),
 		_shouldTriggerOnKbdRepeats(false) {
diff --git a/backends/keymapper/action.h b/backends/keymapper/action.h
index 50c2627d43..9de4d0d592 100644
--- a/backends/keymapper/action.h
+++ b/backends/keymapper/action.h
@@ -28,6 +28,7 @@
 #include "common/array.h"
 #include "common/events.h"
 #include "common/str.h"
+#include "common/ustr.h"
 
 namespace Common {
 
@@ -42,7 +43,7 @@ struct Action {
 	/** unique id used for saving/loading to config */
 	const char *id;
 	/** Human readable description */
-	String description;
+	U32String description;
 
 	/** Event to be sent when mapped key is pressed */
 	Event event;
@@ -52,7 +53,7 @@ private:
 	bool _shouldTriggerOnKbdRepeats;
 
 public:
-	Action(const char *id, const String &description);
+	Action(const char *id, const U32String &description);
 
 	void setEvent(const Event &evt) {
 		event = evt;
diff --git a/backends/keymapper/keymap.cpp b/backends/keymapper/keymap.cpp
index 5e45e0a786..c86a982abb 100644
--- a/backends/keymapper/keymap.cpp
+++ b/backends/keymapper/keymap.cpp
@@ -33,7 +33,7 @@
 
 namespace Common {
 
-Keymap::Keymap(KeymapType type, const String &id, const String &description) :
+Keymap::Keymap(KeymapType type, const String &id, const U32String &description) :
 		_type(type),
 		_id(id),
 		_description(description),
diff --git a/backends/keymapper/keymap.h b/backends/keymapper/keymap.h
index 2db3653147..3fca37873c 100644
--- a/backends/keymapper/keymap.h
+++ b/backends/keymapper/keymap.h
@@ -80,7 +80,7 @@ public:
 
 	typedef Array<Action *> ActionArray;
 
-	Keymap(KeymapType type, const String &id, const String &description);
+	Keymap(KeymapType type, const String &id, const U32String &description);
 	~Keymap();
 	void setConfigDomain(ConfigManager::Domain *configDomain);
 	void setHardwareInputs(HardwareInputSet *hardwareInputSet);
@@ -155,7 +155,7 @@ public:
 	void saveMappings();
 
 	const String &getId() const { return _id; }
-	const String &getDescription() const { return _description; }
+	const U32String &getDescription() const { return _description; }
 	KeymapType getType() const { return _type; }
 
 	/**
@@ -180,7 +180,7 @@ private:
 
 	KeymapType _type;
 	String _id;
-	String _description;
+	U32String _description;
 
 	bool _enabled;
 
diff --git a/backends/keymapper/remap-widget.cpp b/backends/keymapper/remap-widget.cpp
index c40ee94f99..c5de0fe3d5 100644
--- a/backends/keymapper/remap-widget.cpp
+++ b/backends/keymapper/remap-widget.cpp
@@ -220,7 +220,7 @@ void RemapWidget::startRemapping(uint actionIndex) {
 	_remapInputWatcher->startWatching();
 
 	_actions[actionIndex].keyButton->setLabel(Common::convertToU32String("..."));
-	_actions[actionIndex].keyButton->setTooltip("");
+	_actions[actionIndex].keyButton->setTooltip(Common::convertToU32String(""));
 	_actions[actionIndex].keyButton->markAsDirty();
 
 	g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
@@ -278,12 +278,12 @@ void RemapWidget::refreshKeymap() {
 		ActionRow &row = _actions[i];
 
 		if (!row.actionText) {
-			row.actionText = new GUI::StaticTextWidget(widgetsBoss(), 0, 0, 0, 0, Common::convertToU32String(""), Graphics::kTextAlignStart, nullptr, GUI::ThemeEngine::kFontStyleNormal);
+			row.actionText = new GUI::StaticTextWidget(widgetsBoss(), 0, 0, 0, 0, U32String(""), Graphics::kTextAlignStart, U32String(""), GUI::ThemeEngine::kFontStyleNormal);
 			row.actionText->setLabel(row.action->description);
 
-			row.keyButton = new GUI::DropdownButtonWidget(widgetsBoss(), 0, 0, 0, 0, Common::convertToU32String(""), nullptr, kRemapCmd + i);
-			row.keyButton->appendEntry(Common::convertToU32String(_("Reset to defaults")), kResetActionCmd + i);
-			row.keyButton->appendEntry(Common::convertToU32String(_("Clear mapping")), kClearCmd + i);
+			row.keyButton = new GUI::DropdownButtonWidget(widgetsBoss(), 0, 0, 0, 0, U32String(""), U32String(""), kRemapCmd + i);
+			row.keyButton->appendEntry((_("Reset to defaults")), kResetActionCmd + i);
+			row.keyButton->appendEntry((_("Clear mapping")), kClearCmd + i);
 		}
 
 		Array<HardwareInput> mappedInputs = row.keymap->getActionMapping(row.action);
@@ -302,17 +302,17 @@ void RemapWidget::refreshKeymap() {
 			row.keyButton->setTooltip(keysLabel);
 		} else {
 			row.keyButton->setLabel(Common::convertToU32String("-"));
-			row.keyButton->setTooltip("");
+			row.keyButton->setTooltip(Common::convertToU32String(""));
 		}
 
 		KeymapTitleRow &keymapTitle = _keymapSeparators[row.keymap];
 		if (!keymapTitle.descriptionText) {
 			keymapTitle.descriptionText = new GUI::StaticTextWidget(widgetsBoss(), 0, 0, 0, 0, row.keymap->getDescription(), Graphics::kTextAlignStart);
-			keymapTitle.resetButton = new GUI::ButtonWidget(widgetsBoss(), 0, 0, 0, 0, Common::convertToU32String(""), nullptr, kResetKeymapCmd + i);
+			keymapTitle.resetButton = new GUI::ButtonWidget(widgetsBoss(), 0, 0, 0, 0, U32String(""), U32String(""), kResetKeymapCmd + i);
 
 			// I18N: Button to reset keymap mappings to defaults
-			keymapTitle.resetButton->setLabel(Common::convertToU32String(_("Reset")));
-			keymapTitle.resetButton->setTooltip(_("Reset to defaults"));
+			keymapTitle.resetButton->setLabel((_("Reset")));
+			keymapTitle.resetButton->setTooltip((_("Reset to defaults")));
 		}
 	}
 }
diff --git a/backends/networking/sdl_net/handlers/createdirectoryhandler.cpp b/backends/networking/sdl_net/handlers/createdirectoryhandler.cpp
index a1d1d9b7fc..e00e583485 100644
--- a/backends/networking/sdl_net/handlers/createdirectoryhandler.cpp
+++ b/backends/networking/sdl_net/handlers/createdirectoryhandler.cpp
@@ -57,35 +57,35 @@ void CreateDirectoryHandler::handle(Client &client) {
 
 	// check that <path> is not an absolute root
 	if (path == "" || path == "/") {
-		handleError(client, HandlerUtils::toUtf8(_("Can't create directory here!")));
+		handleError(client, Common::convertFromU32String(_("Can't create directory here!")).c_str());
 		return;
 	}
 
 	// check that <path> contains no '../'
 	if (HandlerUtils::hasForbiddenCombinations(path)) {
-		handleError(client, HandlerUtils::toUtf8(_("Invalid path!")));
+		handleError(client, Common::convertFromU32String(_("Invalid path!")));
 		return;
 	}
 
 	// transform virtual path to actual file system one
 	Common::String prefixToRemove = "", prefixToAdd = "";
 	if (!transformPath(path, prefixToRemove, prefixToAdd) || path.empty()) {
-		handleError(client, HandlerUtils::toUtf8(_("Invalid path!")));
+		handleError(client, Common::convertFromU32String(_("Invalid path!")));
 		return;
 	}
 
 	// check that <path> exists, is directory and isn't forbidden
 	AbstractFSNode *node = g_system->getFilesystemFactory()->makeFileNodePath(path);
 	if (!HandlerUtils::permittedPath(node->getPath())) {
-		handleError(client, HandlerUtils::toUtf8(_("Invalid path!")));
+		handleError(client, Common::convertFromU32String(_("Invalid path!")));
 		return;
 	}
 	if (!node->exists()) {
-		handleError(client, HandlerUtils::toUtf8(_("Parent directory doesn't exists!")));
+		handleError(client, Common::convertFromU32String(_("Parent directory doesn't exists!")));
 		return;
 	}
 	if (!node->isDirectory()) {
-		handleError(client, HandlerUtils::toUtf8(_("Can't create a directory within a file!")));
+		handleError(client, Common::convertFromU32String(_("Can't create a directory within a file!")));
 		return;
 	}
 
@@ -95,20 +95,20 @@ void CreateDirectoryHandler::handle(Client &client) {
 	node = g_system->getFilesystemFactory()->makeFileNodePath(path + name);
 	if (node->exists()) {
 		if (!node->isDirectory()) {
-			handleError(client, HandlerUtils::toUtf8(_("There is a file with that name in the parent directory!")));
+			handleError(client, Common::convertFromU32String(_("There is a file with that name in the parent directory!")));
 			return;
 		}
 	} else {
 		// create the <directory_name> in <path>
 		if (!node->createDirectory()) {
-			handleError(client, HandlerUtils::toUtf8(_("Failed to create the directory!")));
+			handleError(client, Common::convertFromU32String(_("Failed to create the directory!")));
 			return;
 		}
 	}
 
 	// if json requested, respond with it
 	if (client.queryParameter("answer_json") == "true") {
-		setJsonResponseHandler(client, "success", HandlerUtils::toUtf8(_("Directory created successfully!")));
+		setJsonResponseHandler(client, "success", Common::convertFromU32String(_("Directory created successfully!")));
 		return;
 	}
 
@@ -117,9 +117,9 @@ void CreateDirectoryHandler::handle(Client &client) {
 		client,
 		Common::String::format(
 			"%s<br/><a href=\"files?path=%s\">%s</a>",
-			HandlerUtils::toUtf8(_("Directory created successfully!")).c_str(),
+			Common::convertFromU32String(_("Directory created successfully!")).c_str(),
 			client.queryParameter("path").c_str(),
-			HandlerUtils::toUtf8(_("Back to parent directory")).c_str()
+			Common::convertFromU32String(_("Back to parent directory")).c_str()
 		),
 		(client.queryParameter("ajax") == "true" ? "/filesAJAX?path=" : "/files?path=") +
 		LocalWebserver::urlEncodeQueryParameterValue(client.queryParameter("path"))
diff --git a/backends/networking/sdl_net/handlers/downloadfilehandler.cpp b/backends/networking/sdl_net/handlers/downloadfilehandler.cpp
index 8f434ed75e..ed79d40b98 100644
--- a/backends/networking/sdl_net/handlers/downloadfilehandler.cpp
+++ b/backends/networking/sdl_net/handlers/downloadfilehandler.cpp
@@ -40,40 +40,40 @@ void DownloadFileHandler::handle(Client &client) {
 
 	// check that <path> is not an absolute root
 	if (path == "" || path == "/") {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("Invalid path!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("Invalid path!")));
 		return;
 	}
 
 	// check that <path> contains no '../'
 	if (HandlerUtils::hasForbiddenCombinations(path)) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("Invalid path!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("Invalid path!")));
 		return;
 	}
 
 	// transform virtual path to actual file system one
 	Common::String prefixToRemove = "", prefixToAdd = "";
 	if (!transformPath(path, prefixToRemove, prefixToAdd, false) || path.empty()) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("Invalid path!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("Invalid path!")));
 		return;
 	}
 
 	// check that <path> exists, is directory and isn't forbidden
 	AbstractFSNode *node = g_system->getFilesystemFactory()->makeFileNodePath(path);
 	if (!HandlerUtils::permittedPath(node->getPath())) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("Invalid path!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("Invalid path!")));
 		return;
 	}
 	if (!node->exists()) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("The file doesn't exist!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("The file doesn't exist!")));
 		return;
 	}
 	if (node->isDirectory()) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("Can't download a directory!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("Can't download a directory!")));
 		return;
 	}
 	Common::SeekableReadStream *stream = node->createReadStream();
 	if (stream == nullptr) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("Failed to read the file!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("Failed to read the file!")));
 		return;
 	}
 
diff --git a/backends/networking/sdl_net/handlers/filesajaxpagehandler.cpp b/backends/networking/sdl_net/handlers/filesajaxpagehandler.cpp
index eda5d1305d..3b8a412b35 100644
--- a/backends/networking/sdl_net/handlers/filesajaxpagehandler.cpp
+++ b/backends/networking/sdl_net/handlers/filesajaxpagehandler.cpp
@@ -56,7 +56,7 @@ void FilesAjaxPageHandler::handle(Client &client) {
 	// load stylish response page from the archive
 	Common::SeekableReadStream *const stream = HandlerUtils::getArchiveFile(FILES_PAGE_NAME);
 	if (stream == nullptr) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("The page is not available without the resources. Make sure file wwwroot.zip from ScummVM distribution is available in 'themepath'.")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("The page is not available without the resources. Make sure file wwwroot.zip from ScummVM distribution is available in 'themepath'.")));
 		return;
 	}
 
@@ -64,16 +64,16 @@ void FilesAjaxPageHandler::handle(Client &client) {
 	Common::String path = client.queryParameter("path");
 
 	//these occur twice:
-	replace(response, "{create_directory_button}", HandlerUtils::toUtf8(_("Create directory")));
-	replace(response, "{create_directory_button}", HandlerUtils::toUtf8(_("Create directory")));
-	replace(response, "{upload_files_button}", HandlerUtils::toUtf8(_("Upload files"))); //tab
-	replace(response, "{upload_file_button}", HandlerUtils::toUtf8(_("Upload files"))); //button in the tab
-	replace(response, "{create_directory_desc}", HandlerUtils::toUtf8(_("Type new directory name:")));
-	replace(response, "{upload_file_desc}", HandlerUtils::toUtf8(_("Select a file to upload:")));
-	replace(response, "{or_upload_directory_desc}", HandlerUtils::toUtf8(_("Or select a directory (works in Chrome only):")));
-	replace(response, "{index_of}", HandlerUtils::toUtf8(_("Index of ")));
+	replace(response, "{create_directory_button}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Create directory")).c_str()));
+	replace(response, "{create_directory_button}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Create directory")).c_str()));
+	replace(response, "{upload_files_button}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Upload files")).c_str())); //tab
+	replace(response, "{upload_file_button}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Upload files")).c_str())); //button in the tab
+	replace(response, "{create_directory_desc}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Type new directory name:")).c_str()));
+	replace(response, "{upload_file_desc}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Select a file to upload:")).c_str()));
+	replace(response, "{or_upload_directory_desc}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Or select a directory (works in Chrome only):")).c_str()));
+	replace(response, "{index_of}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Index of ")).c_str()));
 	replace(response, "{loading}", HandlerUtils::toUtf8(("Loading...")));
-	replace(response, "{error}", HandlerUtils::toUtf8(_("Error occurred")));
+	replace(response, "{error}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Error occurred")).c_str()));
 	replace(response, "{start_path}", encodeDoubleQuotesAndSlashes(path));
 	LocalWebserver::setClientGetHandler(client, response);
 }
diff --git a/backends/networking/sdl_net/handlers/filespagehandler.cpp b/backends/networking/sdl_net/handlers/filespagehandler.cpp
index f8b1899a4d..b560a0a827 100644
--- a/backends/networking/sdl_net/handlers/filespagehandler.cpp
+++ b/backends/networking/sdl_net/handlers/filespagehandler.cpp
@@ -78,8 +78,8 @@ Common::String getDisplayPath(Common::String s) {
 bool FilesPageHandler::listDirectory(Common::String path, Common::String &content, const Common::String &itemTemplate) {
 	if (path == "" || path == "/") {
 		if (ConfMan.hasKey("rootpath", "cloud"))
-			addItem(content, itemTemplate, IT_DIRECTORY, "/root/", HandlerUtils::toUtf8(_("File system root")));
-		addItem(content, itemTemplate, IT_DIRECTORY, "/saves/", HandlerUtils::toUtf8(_("Saved games")));
+			addItem(content, itemTemplate, IT_DIRECTORY, "/root/", Common::convertFromU32String(_("File system root")));
+		addItem(content, itemTemplate, IT_DIRECTORY, "/saves/", Common::convertFromU32String(_("Saved games")));
 		return true;
 	}
 
@@ -116,7 +116,7 @@ bool FilesPageHandler::listDirectory(Common::String path, Common::String &conten
 			filePath = "/";
 		else
 			filePath = parentPath(prefixToAdd + filePath);
-		addItem(content, itemTemplate, IT_PARENT_DIRECTORY, filePath, HandlerUtils::toUtf8(_("Parent directory")));
+		addItem(content, itemTemplate, IT_PARENT_DIRECTORY, filePath, Common::convertFromU32String(_("Parent directory")));
 	}
 
 	// fill the content
@@ -215,21 +215,21 @@ void FilesPageHandler::handle(Client &client) {
 
 	// show an error message if failed to list directory
 	if (!listDirectory(path, content, itemTemplate)) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("ScummVM couldn't list the directory you specified.")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("ScummVM couldn't list the directory you specified.")).c_str());
 		return;
 	}
 
 	//these occur twice:
-	replace(response, "{create_directory_button}", HandlerUtils::toUtf8(_("Create directory")));
-	replace(response, "{create_directory_button}", HandlerUtils::toUtf8(_("Create directory")));
+	replace(response, "{create_directory_button}", Common::convertFromU32String(_("Create directory")));
+	replace(response, "{create_directory_button}", Common::convertFromU32String(_("Create directory")));
 	replace(response, "{path}", encodeDoubleQuotes(client.queryParameter("path")));
 	replace(response, "{path}", encodeDoubleQuotes(client.queryParameter("path")));
-	replace(response, "{upload_files_button}", HandlerUtils::toUtf8(_("Upload files"))); //tab
-	replace(response, "{upload_file_button}", HandlerUtils::toUtf8(_("Upload files"))); //button in the tab
-	replace(response, "{create_directory_desc}", HandlerUtils::toUtf8(_("Type new directory name:")));
-	replace(response, "{upload_file_desc}", HandlerUtils::toUtf8(_("Select a file to upload:")));
-	replace(response, "{or_upload_directory_desc}", HandlerUtils::toUtf8(_("Or select a directory (works in Chrome only):")));
-	replace(response, "{index_of_directory}", Common::String::format("%s %s", HandlerUtils::toUtf8(_("Index of")).c_str(), encodeHtmlEntities(getDisplayPath(client.queryParameter("path"))).c_str()));
+	replace(response, "{upload_files_button}", Common::convertFromU32String(_("Upload files"))); //tab
+	replace(response, "{upload_file_button}", Common::convertFromU32String(_("Upload files"))); //button in the tab
+	replace(response, "{create_directory_desc}", Common::convertFromU32String(_("Type new directory name:")));
+	replace(response, "{upload_file_desc}", Common::convertFromU32String(_("Select a file to upload:")));
+	replace(response, "{or_upload_directory_desc}", Common::convertFromU32String(_("Or select a directory (works in Chrome only):")));
+	replace(response, "{index_of_directory}", Common::String::format("%s %s", Common::convertFromU32String(_("Index of")).c_str(), encodeHtmlEntities(getDisplayPath(client.queryParameter("path"))).c_str()));
 	replace(response, "{content}", content);
 	LocalWebserver::setClientGetHandler(client, response);
 }
diff --git a/backends/networking/sdl_net/handlers/indexpagehandler.cpp b/backends/networking/sdl_net/handlers/indexpagehandler.cpp
index f872810bad..3cd39b8e81 100644
--- a/backends/networking/sdl_net/handlers/indexpagehandler.cpp
+++ b/backends/networking/sdl_net/handlers/indexpagehandler.cpp
@@ -39,8 +39,8 @@ void IndexPageHandler::handle(Client &client) {
 		client,
 		Common::String::format(
 			"%s<br/><a href=\"files\">%s</a>",
-			HandlerUtils::toUtf8(_("This is a local webserver index page.")).c_str(),
-			HandlerUtils::toUtf8(_("Open Files manager")).c_str()
+			Common::convertFromU32String(_("This is a local webserver index page.")).c_str(),
+			Common::convertFromU32String(_("Open Files manager")).c_str()
 		),
 		"/filesAJAX"
 	);
diff --git a/backends/networking/sdl_net/handlers/listajaxhandler.cpp b/backends/networking/sdl_net/handlers/listajaxhandler.cpp
index e364712283..d0f6365a3d 100644
--- a/backends/networking/sdl_net/handlers/listajaxhandler.cpp
+++ b/backends/networking/sdl_net/handlers/listajaxhandler.cpp
@@ -42,8 +42,8 @@ Common::JSONObject ListAjaxHandler::listDirectory(Common::String path) {
 
 	if (path == "" || path == "/") {
 		if (ConfMan.hasKey("rootpath", "cloud"))
-			addItem(itemsList, IT_DIRECTORY, "/root/", HandlerUtils::toUtf8(_("File system root")));
-		addItem(itemsList, IT_DIRECTORY, "/saves/", HandlerUtils::toUtf8(_("Saved games")));
+			addItem(itemsList, IT_DIRECTORY, "/root/", Common::convertFromU32String(_("File system root")));
+		addItem(itemsList, IT_DIRECTORY, "/saves/", Common::convertFromU32String(_("Saved games")));
 		successResult.setVal("items", new Common::JSONValue(itemsList));
 		return successResult;
 	}
@@ -81,7 +81,7 @@ Common::JSONObject ListAjaxHandler::listDirectory(Common::String path) {
 			filePath = "/";
 		else
 			filePath = parentPath(prefixToAdd + filePath);
-		addItem(itemsList, IT_PARENT_DIRECTORY, filePath, HandlerUtils::toUtf8(_("Parent directory")));
+		addItem(itemsList, IT_PARENT_DIRECTORY, filePath, Common::convertFromU32String(_("Parent directory")));
 	}
 
 	// fill the content
diff --git a/backends/networking/sdl_net/handlers/uploadfilehandler.cpp b/backends/networking/sdl_net/handlers/uploadfilehandler.cpp
index c3454a9c41..35e8c87498 100644
--- a/backends/networking/sdl_net/handlers/uploadfilehandler.cpp
+++ b/backends/networking/sdl_net/handlers/uploadfilehandler.cpp
@@ -40,35 +40,35 @@ void UploadFileHandler::handle(Client &client) {
 
 	// check that <path> is not an absolute root
 	if (path == "" || path == "/" || path == "\\") {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("Invalid path!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("Invalid path!")));
 		return;
 	}
 
 	// check that <path> contains no '../'
 	if (HandlerUtils::hasForbiddenCombinations(path)) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("Invalid path!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("Invalid path!")));
 		return;
 	}
 
 	// transform virtual path to actual file system one
 	Common::String prefixToRemove = "", prefixToAdd = "";
 	if (!transformPath(path, prefixToRemove, prefixToAdd, false) || path.empty()) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("Invalid path!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("Invalid path!")));
 		return;
 	}
 
 	// check that <path> exists, is directory and isn't forbidden
 	AbstractFSNode *node = g_system->getFilesystemFactory()->makeFileNodePath(path);
 	if (!HandlerUtils::permittedPath(node->getPath())) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("Invalid path!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("Invalid path!")));
 		return;
 	}
 	if (!node->exists()) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("The parent directory doesn't exist!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("The parent directory doesn't exist!")));
 		return;
 	}
 	if (!node->isDirectory()) {
-		HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("Can't upload into a file!")));
+		HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("Can't upload into a file!")));
 		return;
 	}
 
diff --git a/backends/networking/sdl_net/handlerutils.cpp b/backends/networking/sdl_net/handlerutils.cpp
index 22bea0755a..fb2385a0c3 100644
--- a/backends/networking/sdl_net/handlerutils.cpp
+++ b/backends/networking/sdl_net/handlerutils.cpp
@@ -210,7 +210,7 @@ void HandlerUtils::setFilesManagerErrorMessageHandler(Client &client, Common::St
 			message.c_str(),
 			client.queryParameter("ajax") == "true" ? "AJAX" : "",
 			"%2F", //that's encoded "/"
-			toUtf8(_("Back to the files manager")).c_str()
+			Common::convertFromU32String(_("Back to the files manager")).c_str()
 		),
 		redirectTo
 	);
diff --git a/backends/networking/sdl_net/handlerutils.h b/backends/networking/sdl_net/handlerutils.h
index 10ef2dc66a..39daac781b 100644
--- a/backends/networking/sdl_net/handlerutils.h
+++ b/backends/networking/sdl_net/handlerutils.h
@@ -41,7 +41,7 @@ public:
 	static bool hasPermittedPrefix(const Common::String &path);
 	static bool permittedPath(const Common::String path);
 
-	static Common::String toUtf8(const char*);
+	static Common::String toUtf8(const char *);
 
 	static void setMessageHandler(Client &client, Common::String message, Common::String redirectTo = "");
 	static void setFilesManagerErrorMessageHandler(Client &client, Common::String message, Common::String redirectTo = "");
diff --git a/backends/networking/sdl_net/uploadfileclienthandler.cpp b/backends/networking/sdl_net/uploadfileclienthandler.cpp
index fb00b6bf5e..5b7fcb5060 100644
--- a/backends/networking/sdl_net/uploadfileclienthandler.cpp
+++ b/backends/networking/sdl_net/uploadfileclienthandler.cpp
@@ -66,7 +66,7 @@ void UploadFileClientHandler::handle(Client *client) {
 
 			// fail on suspicious headers
 			if (_headersStream->size() > Reader::SUSPICIOUS_HEADERS_SIZE) {
-				setErrorMessageHandler(*client, HandlerUtils::toUtf8(_("Invalid request: headers are too long!")));
+				setErrorMessageHandler(*client, Common::convertFromU32String(_("Invalid request: headers are too long!")));
 			}
 			break;
 
@@ -108,7 +108,7 @@ void UploadFileClientHandler::handleBlockHeaders(Client *client) {
 
 	// fail on suspicious headers
 	if (_headersStream->size() > Reader::SUSPICIOUS_HEADERS_SIZE) {
-		setErrorMessageHandler(*client, HandlerUtils::toUtf8(_("Invalid request: headers are too long!")));
+		setErrorMessageHandler(*client, Common::convertFromU32String(_("Invalid request: headers are too long!")));
 	}
 
 	// search for "upload_file" field
@@ -134,11 +134,11 @@ void UploadFileClientHandler::handleBlockHeaders(Client *client) {
 		path += '/';
 	AbstractFSNode *originalNode = g_system->getFilesystemFactory()->makeFileNodePath(path + filename);
 	if (!HandlerUtils::permittedPath(originalNode->getPath())) {
-		setErrorMessageHandler(*client, HandlerUtils::toUtf8(_("Invalid path!")));
+		setErrorMessageHandler(*client, Common::convertFromU32String(_("Invalid path!")));
 		return;
 	}
 	if (originalNode->exists()) {
-		setErrorMessageHandler(*client, HandlerUtils::toUtf8(_("There is a file with that name in the parent directory!")));
+		setErrorMessageHandler(*client, Common::convertFromU32String(_("There is a file with that name in the parent directory!")));
 		return;
 	}
 
@@ -152,7 +152,7 @@ void UploadFileClientHandler::handleBlockHeaders(Client *client) {
 	Common::DumpFile *f = new Common::DumpFile();
 	if (!f->open(originalNode->getPath(), true)) {
 		delete f;
-		setErrorMessageHandler(*client, HandlerUtils::toUtf8(_("Failed to upload the file!")));
+		setErrorMessageHandler(*client, Common::convertFromU32String(_("Failed to upload the file!")));
 		return;
 	}
 
@@ -181,7 +181,7 @@ void UploadFileClientHandler::handleBlockContent(Client *client) {
 	if (client->noMoreContent()) {
 		// if no file field was found - failure
 		if (_uploadedFiles == 0) {
-			setErrorMessageHandler(*client, HandlerUtils::toUtf8(_("No file was passed!")));
+			setErrorMessageHandler(*client, Common::convertFromU32String(_("No file was passed!")));
 		} else {
 			setSuccessHandler(*client);
 		}
@@ -199,9 +199,9 @@ void UploadFileClientHandler::setSuccessHandler(Client &client) {
 		client,
 		Common::String::format(
 			"%s<br/><a href=\"files?path=%s\">%s</a>",
-			HandlerUtils::toUtf8(_("Uploaded successfully!")).c_str(),
+			Common::convertFromU32String(_("Uploaded successfully!")).c_str(),
 			client.queryParameter("path").c_str(),
-			HandlerUtils::toUtf8(_("Back to parent directory")).c_str()
+			Common::convertFromU32String(_("Back to parent directory")).c_str()
 			),
 		(client.queryParameter("ajax") == "true" ? "/filesAJAX?path=" : "/files?path=") +
 		LocalWebserver::urlEncodeQueryParameterValue(client.queryParameter("path"))
diff --git a/base/main.cpp b/base/main.cpp
index 5307b76af1..be3f5190d0 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -260,7 +260,7 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
 		if (token.equalsIgnoreCase("all"))
 			DebugMan.enableAllDebugChannels();
 		else if (!DebugMan.enableDebugChannel(token))
-			warning(_("Engine does not support debug level '%s'"), token.c_str());
+			warning(Common::convertFromU32String(_("Engine does not support debug level '%s'")).c_str(), token.c_str());
 	}
 
 #ifdef USE_TRANSLATION
diff --git a/common/achievements.cpp b/common/achievements.cpp
index dc16ec2c5d..6f3cf6d3a0 100644
--- a/common/achievements.cpp
+++ b/common/achievements.cpp
@@ -88,9 +88,9 @@ bool AchievementsManager::setAchievement(const String &id, const String &display
 	_iniFile->saveToSaveFile(_iniFileName);
 
 	if (!displayedMessage.empty() && g_system) {
-		String msg;
+		U32String msg;
 		msg = Common::String::format("%s\n%s", _("Achievement unlocked!"), displayedMessage.c_str());
-		g_system->displayMessageOnOSD(msg.c_str());
+		g_system->displayMessageOnOSD(msg);
 	}
 
 	return true;
diff --git a/common/osd_message_queue.cpp b/common/osd_message_queue.cpp
index d150737165..431ce90d18 100644
--- a/common/osd_message_queue.cpp
+++ b/common/osd_message_queue.cpp
@@ -38,7 +38,7 @@ void OSDMessageQueue::registerEventSource() {
 	g_system->getEventManager()->getEventDispatcher()->registerSource(this, false);
 }
 
-void OSDMessageQueue::addMessage(const char *msg) {
+void OSDMessageQueue::addMessage(const Common::U32String &msg) {
 	_mutex.lock();
 	_messages.push(msg);
 	_mutex.unlock();
@@ -50,8 +50,8 @@ bool OSDMessageQueue::pollEvent(Common::Event &event) {
 		uint t = g_system->getMillis();
 		if (t - _lastUpdate >= kMinimumDelay) {
 			_lastUpdate = t;
-			String msg = _messages.pop();
-			g_system->displayMessageOnOSD(msg.c_str());
+			Common::U32String msg = _messages.pop();
+			g_system->displayMessageOnOSD(msg);
 		}
 	}
 	_mutex.unlock();
diff --git a/common/osd_message_queue.h b/common/osd_message_queue.h
index 10fe96bc6a..4da2f1d2e6 100644
--- a/common/osd_message_queue.h
+++ b/common/osd_message_queue.h
@@ -26,6 +26,7 @@
 #include "common/events.h"
 #include "common/singleton.h"
 #include "common/str.h"
+#include "common/ustr.h"
 #include "common/queue.h"
 #include "common/mutex.h"
 
@@ -48,7 +49,7 @@ public:
 	/**
 	 * Add a message to the OSD message queue.
 	 */
-	void addMessage(const char *msg);
+	void addMessage(const Common::U32String &msg);
 
 	/**
 	 * Common::EventSource interface
@@ -63,7 +64,7 @@ public:
 
 private:
 	Mutex _mutex;
-	Queue<String> _messages;
+	Queue<U32String> _messages;
 	uint32 _lastUpdate;
 };
 
diff --git a/common/system.h b/common/system.h
index a808e85278..e5c08cce1c 100644
--- a/common/system.h
+++ b/common/system.h
@@ -1305,7 +1305,7 @@ public:
 	 *
 	 * @param msg	the message to display on screen
 	 */
-	virtual void displayMessageOnOSD(const char *msg) = 0;
+	virtual void displayMessageOnOSD(const Common::U32String &msg) = 0;
 
 	/**
 	 * Display an icon indicating background activity
diff --git a/common/translation.cpp b/common/translation.cpp
index 6f1029fa0b..7a8ad64e9b 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -108,11 +108,11 @@ void TranslationManager::setLanguage(const String &lang) {
 	}
 }
 
-const char *TranslationManager::getTranslation(const char *message) const {
+U32String TranslationManager::getTranslation(const char *message) const {
 	return getTranslation(message, nullptr);
 }
 
-const char *TranslationManager::getTranslation(const char *message, const char *context) const {
+U32String TranslationManager::getTranslation(const char *message, const char *context) const {
 	// If no language is set or message is empty, return msgid as is
 	if (_currentTranslationMessages.empty() || *message == '\0')
 		return message;
@@ -161,7 +161,7 @@ const char *TranslationManager::getTranslation(const char *message, const char *
 			leftIndex = midIndex + 1;
 	}
 
-	return message;
+	return U32String(message);
 }
 
 String TranslationManager::getCurrentCharset() const {
@@ -176,11 +176,11 @@ String TranslationManager::getCurrentLanguage() const {
 	return _langs[_currentLang];
 }
 
-String TranslationManager::getTranslation(const String &message) const {
+U32String TranslationManager::getTranslation(const String &message) const {
 	return getTranslation(message.c_str());
 }
 
-String TranslationManager::getTranslation(const String &message, const String &context) const {
+U32String TranslationManager::getTranslation(const String &message, const String &context) const {
 	return getTranslation(message.c_str(), context.c_str());
 }
 
diff --git a/common/translation.h b/common/translation.h
index eab0b8705f..303bea7943 100644
--- a/common/translation.h
+++ b/common/translation.h
@@ -112,14 +112,14 @@ public:
 	 * message. In case the message isn't found in the translation catalog,
 	 * it returns the original untranslated message.
 	 */
-	const char *getTranslation(const char *message) const;
+	U32String getTranslation(const char *message) const;
 
 	/**
 	 * Returns the translation into the current language of the parameter
 	 * message. In case the message isn't found in the translation catalog,
 	 * it returns the original untranslated message.
 	 */
-	String getTranslation(const String &message) const;
+	U32String getTranslation(const String &message) const;
 
 	/**
 	 * Returns the translation into the current language of the parameter
@@ -130,7 +130,7 @@ public:
 	 * translation, otherwise it will look for a translation for the same
 	 * massage without a context or with a different context.
 	 */
-	const char *getTranslation(const char *message, const char *context) const;
+	U32String getTranslation(const char *message, const char *context) const;
 
 	/**
 	 * Returns the translation into the current language of the parameter
@@ -141,7 +141,7 @@ public:
 	 * translation, otherwise it will look for a translation for the same
 	 * massage without a context or with a different context.
 	 */
-	String getTranslation(const String &message, const String &context) const;
+	U32String getTranslation(const String &message, const String &context) const;
 
 	/**
 	 * Returns a list of supported languages.
diff --git a/common/ustr.cpp b/common/ustr.cpp
index 8fea4ef8dc..17cb4d5738 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -498,4 +498,90 @@ uint64 U32String::asUint64() const {
 	return result;
 }
 
+void U32String::trim() {
+	if (_size == 0)
+		return;
+
+	makeUnique();
+
+	// Trim trailing whitespace
+	while (_size >= 1 && isSpace(_str[_size - 1]))
+		--_size;
+	_str[_size] = 0;
+
+	// Trim leading whitespace
+	uint *t = _str;
+	while (isSpace(*t))
+		t++;
+
+	if (t != _str) {
+		_size -= t - _str;
+		memmove(_str, t, _size + 1);
+	}
+}
+
+// static
+U32String U32String::format(const char *fmt, ...) {
+	U32String output;
+
+	va_list va;
+	va_start(va, fmt);
+	output = U32String::vformat(fmt, va);
+	va_end(va);
+
+	return output;
+}
+
+// static
+U32String U32String::vformat(const char *fmt, va_list args) {
+	U32String output = "";
+	assert(output.isStorageIntern());
+	output._str;
+	va_list va;
+	scumm_va_copy(va, args);
+	int len = vsnprintf((char *)output._str, _builtinCapacity, fmt, va);
+	va_end(va);
+
+	if (len == -1 || len == _builtinCapacity - 1) {
+		// MSVC and IRIX don't return the size the full string would take up.
+		// MSVC returns -1, IRIX returns the number of characters actually written,
+		// which is at the most the size of the buffer minus one, as the string is
+		// truncated to fit.
+
+		// We assume MSVC failed to output the correct, null-terminated string
+		// if the return value is either -1 or size.
+		// For IRIX, because we lack a better mechanism, we assume failure
+		// if the return value equals size - 1.
+		// The downside to this is that whenever we try to format a string where the
+		// size is 1 below the built-in capacity, the size is needlessly increased.
+
+		// Try increasing the size of the string until it fits.
+		int size = _builtinCapacity;
+		do {
+			size *= 2;
+			output.ensureCapacity(size - 1, false);
+			assert(!output.isStorageIntern());
+			size = output._extern._capacity;
+
+			scumm_va_copy(va, args);
+			len = vsnprintf((char *)output._str, size, fmt, va);
+			va_end(va);
+		} while (len == -1 || len >= size - 1);
+		output._size = len;
+	} else if (len < (int)_builtinCapacity) {
+		// vsnprintf succeeded
+		output._size = len;
+	} else {
+		// vsnprintf didn't have enough space, so grow buffer
+		output.ensureCapacity(len, false);
+		scumm_va_copy(va, args);
+		int len2 = vsnprintf((char *)output._str, len + 1, fmt, va);
+		va_end(va);
+		assert(len == len2);
+		output._size = len2;
+	}
+
+	return output;
+}
+
 } // End of namespace Common
diff --git a/common/ustr.h b/common/ustr.h
index ec5c4c3523..7aaa3a1510 100644
--- a/common/ustr.h
+++ b/common/ustr.h
@@ -233,6 +233,22 @@ public:
 
 	uint64 asUint64() const;
 
+	void trim();
+
+	/**
+	 * Print formatted data into a String object. Similar to sprintf,
+	 * except that it stores the result in (variably sized) String
+	 * instead of a fixed size buffer.
+	 */
+	static U32String format(const char *fmt, ...) GCC_PRINTF(1, 2);
+
+	/**
+	 * Print formatted data into a String object. Similar to vsprintf,
+	 * except that it stores the result in (variably sized) String
+	 * instead of a fixed size buffer.
+	 */
+	static U32String vformat(const char *fmt, va_list args);
+
 private:
 	void makeUnique();
 	void ensureCapacity(uint32 new_size, bool keep_old);
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index e897e1258b..3cf0fd81d7 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -332,7 +332,7 @@ SaveStateList AgiMetaEngine::listSaves(const char *target) const {
 
 				delete in;
 
-				saveList.push_back(SaveStateDescriptor(slotNr, description));
+				saveList.push_back(SaveStateDescriptor(slotNr, Common::U32String(description)));
 			}
 		}
 	}
@@ -375,11 +375,11 @@ SaveStateDescriptor AgiMetaEngine::querySaveMetaInfos(const char *target, int sl
 			// broken description, ignore it
 			delete in;
 
-			SaveStateDescriptor descriptor(slotNr, "[broken saved game]");
+			SaveStateDescriptor descriptor(slotNr, Common::U32String("[broken saved game]"));
 			return descriptor;
 		}
 
-		SaveStateDescriptor descriptor(slotNr, description);
+		SaveStateDescriptor descriptor(slotNr, Common::U32String(description));
 
 		// Do not allow save slot 0 (used for auto-saving) to be deleted or
 		// overwritten.
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index b80f812768..15546033d0 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -756,7 +756,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 	int slot;
 
 	if (isSave) {
-		dialog = new GUI::SaveLoadChooser(Common::convertToU32String(_("Save game:")), Common::convertToU32String(("Save")), true);
+		dialog = new GUI::SaveLoadChooser((_("Save game:")), Common::convertToU32String(("Save")), true);
 
 		slot = dialog->runModalWithCurrentTarget();
 		desc = dialog->getResultString();
@@ -769,7 +769,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 		if (desc.size() > 28)
 			desc = Common::U32String(desc.c_str(), 28);
 	} else {
-		dialog = new GUI::SaveLoadChooser(Common::convertToU32String(_("Restore game:")), Common::convertToU32String(_("Restore")), false);
+		dialog = new GUI::SaveLoadChooser((_("Restore game:")), (_("Restore")), false);
 		slot = dialog->runModalWithCurrentTarget();
 	}
 
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 1adc037ba6..0741bc8319 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -59,48 +59,48 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
 		_logo->useThemeTransparency(true);
 		_logo->setGfx(g_gui.theme()->getImageSurface(GUI::ThemeEngine::kImageLogoSmall));
 	} else {
-		GUI::StaticTextWidget *title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", Common::convertToU32String("ScummVM"));
+		GUI::StaticTextWidget *title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", Common::U32String("ScummVM"));
 		title->setAlign(Graphics::kTextAlignCenter);
 	}
 #else
-	GUI::StaticTextWidget *title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", "ScummVM");
+	GUI::StaticTextWidget *title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", Common::U32String("ScummVM"));
 	title->setAlign(Graphics::kTextAlignCenter);
 #endif
 
 	GUI::StaticTextWidget *version = new GUI::StaticTextWidget(this, "GlobalMenu.Version", Common::convertToU32String(gScummVMVersionDate));
 	version->setAlign(Graphics::kTextAlignCenter);
 
-	new GUI::ButtonWidget(this, "GlobalMenu.Resume", Common::convertToU32String(_("~R~esume")), 0, kPlayCmd, 'P');
+	new GUI::ButtonWidget(this, "GlobalMenu.Resume", (_("~R~esume")), Common::U32String(""), kPlayCmd, 'P');
 
-	_loadButton = new GUI::ButtonWidget(this, "GlobalMenu.Load", Common::convertToU32String(_("~L~oad")), 0, kLoadCmd);
+	_loadButton = new GUI::ButtonWidget(this, "GlobalMenu.Load", (_("~L~oad")), Common::U32String(""), kLoadCmd);
 	_loadButton->setVisible(_engine->hasFeature(Engine::kSupportsLoadingDuringRuntime));
 	_loadButton->setEnabled(_engine->hasFeature(Engine::kSupportsLoadingDuringRuntime));
 
-	_saveButton = new GUI::ButtonWidget(this, "GlobalMenu.Save", Common::convertToU32String(_("~S~ave")), 0, kSaveCmd);
+	_saveButton = new GUI::ButtonWidget(this, "GlobalMenu.Save", _("~S~ave"), Common::U32String(""), kSaveCmd);
 	_saveButton->setVisible(_engine->hasFeature(Engine::kSupportsSavingDuringRuntime));
 	_saveButton->setEnabled(_engine->hasFeature(Engine::kSupportsSavingDuringRuntime));
 
-	new GUI::ButtonWidget(this, "GlobalMenu.Options", Common::convertToU32String(_("~O~ptions")), 0, kOptionsCmd);
+	new GUI::ButtonWidget(this, "GlobalMenu.Options", (_("~O~ptions")), Common::U32String(""), kOptionsCmd);
 
 	// The help button is disabled by default.
 	// To enable "Help", an engine needs to use a subclass of MainMenuDialog
 	// (at least for now, we might change how this works in the future).
-	_helpButton = new GUI::ButtonWidget(this, "GlobalMenu.Help", Common::convertToU32String(_("~H~elp")), 0, kHelpCmd);
+	_helpButton = new GUI::ButtonWidget(this, "GlobalMenu.Help", (_("~H~elp")), Common::U32String(""), kHelpCmd);
 
-	new GUI::ButtonWidget(this, "GlobalMenu.About", Common::convertToU32String(_("~A~bout")), 0, kAboutCmd);
+	new GUI::ButtonWidget(this, "GlobalMenu.About", (_("~A~bout")), Common::U32String(""), kAboutCmd);
 
 	if (g_system->getOverlayWidth() > 320)
-		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", Common::convertToU32String(_("~R~eturn to Launcher")), 0, kLauncherCmd);
+		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", (_("~R~eturn to Launcher")), Common::U32String(""), kLauncherCmd);
 	else
-		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", Common::convertToU32String(_c("~R~eturn to Launcher", "lowres")), 0, kLauncherCmd);
+		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", (_c("~R~eturn to Launcher", "lowres")), Common::U32String(""), kLauncherCmd);
 	_returnToLauncherButton->setEnabled(_engine->hasFeature(Engine::kSupportsReturnToLauncher));
 
 	if (!g_system->hasFeature(OSystem::kFeatureNoQuit))
-		new GUI::ButtonWidget(this, "GlobalMenu.Quit", Common::convertToU32String(_("~Q~uit")), 0, kQuitCmd);
+		new GUI::ButtonWidget(this, "GlobalMenu.Quit", (_("~Q~uit")), Common::U32String(""), kQuitCmd);
 
 	_aboutDialog = new GUI::AboutDialog();
-	_loadDialog = new GUI::SaveLoadChooser(Common::convertToU32String(_("Load game:")), Common::convertToU32String(_("Load")), false);
-	_saveDialog = new GUI::SaveLoadChooser(Common::convertToU32String(_("Save game:")), Common::convertToU32String(_("Save")), true);
+	_loadDialog = new GUI::SaveLoadChooser((_("Load game:")), (_("Load")), false);
+	_saveDialog = new GUI::SaveLoadChooser((_("Save game:")), (_("Save")), true);
 }
 
 MainMenuDialog::~MainMenuDialog() {
@@ -166,9 +166,9 @@ void MainMenuDialog::reflowLayout() {
 	// FIXME: it might be better to declare GUI::StaticTextWidget::setLabel() virtual
 	// and to reimplement it in GUI::ButtonWidget to handle the hotkey.
 	if (g_system->getOverlayWidth() > 320)
-		_returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(Common::convertToU32String(_("~R~eturn to Launcher"))));
+		_returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(_("~R~eturn to Launcher")));
 	else
-		_returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(Common::convertToU32String(_c("~R~eturn to Launcher", "lowres"))));
+		_returnToLauncherButton->setLabel(_returnToLauncherButton->cleanupHotkey(_c("~R~eturn to Launcher", "lowres")));
 
 #ifndef DISABLE_FANCY_THEMES
 	if (g_gui.xmlEval()->getVar("Globals.ShowGlobalMenuLogo", 0) == 1 && g_gui.theme()->supportsImages()) {
@@ -214,9 +214,9 @@ void MainMenuDialog::save() {
 
 		Common::Error status = _engine->saveGameState(slot, Common::convertFromU32String(result));
 		if (status.getCode() != Common::kNoError) {
-			Common::String failMessage = Common::String::format(_("Failed to save game (%s)! "
+			Common::U32String failMessage = Common::String::format(Common::convertFromU32String(_("Failed to save game (%s)! ")).c_str(),
 				  "Please consult the README for basic information, and for "
-				  "instructions on how to obtain further assistance."), status.getDesc().c_str());
+				  "instructions on how to obtain further assistance.");
 			GUI::MessageDialog dialog(failMessage);
 			dialog.runModal();
 		}
@@ -282,7 +282,7 @@ ConfigDialog::ConfigDialog() :
 	// The game specific options tab
 	//
 
-	int tabId = tab->addTab(Common::convertToU32String(_("Game")), "GlobalConfig_Engine");
+	int tabId = tab->addTab((_("Game")), "GlobalConfig_Engine");
 
 	if (g_engine->hasFeature(Engine::kSupportsChangingOptionsDuringRuntime)) {
 		_engineOptions = metaEngine.buildEngineOptionsWidget(tab, "GlobalConfig_Engine.Container", gameDomain);
@@ -298,7 +298,7 @@ ConfigDialog::ConfigDialog() :
 	// The Audio / Subtitles tab
 	//
 
-	tab->addTab(Common::convertToU32String(_("Audio")), "GlobalConfig_Audio");
+	tab->addTab((_("Audio")), "GlobalConfig_Audio");
 
 	//
 	// Sound controllers
@@ -323,7 +323,7 @@ ConfigDialog::ConfigDialog() :
 
 	Common::KeymapArray keymaps = metaEngine.initKeymaps(gameDomain.c_str());
 	if (!keymaps.empty()) {
-		tab->addTab(Common::convertToU32String(_("Keymaps")), "GlobalConfig_KeyMapper");
+		tab->addTab((_("Keymaps")), "GlobalConfig_KeyMapper");
 		addKeyMapperControls(tab, "GlobalConfig_KeyMapper.", keymaps, gameDomain);
 	}
 
@@ -332,7 +332,7 @@ ConfigDialog::ConfigDialog() :
 	//
 	Common::AchievementsInfo achievementsInfo = metaEngine.getAchievementsInfo(gameDomain);
 	if (achievementsInfo.descriptions.size() > 0) {
-		tab->addTab(Common::convertToU32String(_("Achievements")), "GlobalConfig_Achievements");
+		tab->addTab((_("Achievements")), "GlobalConfig_Achievements");
 		addAchievementsControls(tab, "GlobalConfig_Achievements.", achievementsInfo);
 	}
 
@@ -343,8 +343,8 @@ ConfigDialog::ConfigDialog() :
 	// Add the buttons
 	//
 
-	new GUI::ButtonWidget(this, "GlobalConfig.Ok", Common::convertToU32String(_("~O~K")), 0, GUI::kOKCmd);
-	new GUI::ButtonWidget(this, "GlobalConfig.Cancel", Common::convertToU32String(_("~C~ancel")), 0, GUI::kCloseCmd);
+	new GUI::ButtonWidget(this, "GlobalConfig.Ok", (_("~O~K")), Common::U32String(""), GUI::kOKCmd);
+	new GUI::ButtonWidget(this, "GlobalConfig.Cancel", (_("~C~ancel")), Common::U32String(""), GUI::kCloseCmd);
 
 #ifdef GUI_ENABLE_KEYSDIALOG
 	new GUI::ButtonWidget(this, "GlobalConfig.Keys", _("~K~eys"), 0, kKeysCmd);
@@ -408,7 +408,7 @@ ExtraGuiOptionsWidget::ExtraGuiOptionsWidget(GuiObject *containerBoss, const Com
 	for (iter = _options.begin(); iter != _options.end(); ++iter, ++i) {
 		Common::String id = Common::String::format("%d", i);
 		_checkboxes.push_back(new CheckboxWidget(widgetsBoss(),
-			_dialogLayout + ".customOption" + id + "Checkbox", Common::convertToU32String(_(iter->label)), _(iter->tooltip)));
+			_dialogLayout + ".customOption" + id + "Checkbox", (_(iter->label)), _(iter->tooltip)));
 	}
 }
 
diff --git a/engines/engine.cpp b/engines/engine.cpp
index de80b9656e..061d079303 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -315,7 +315,8 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
 	// Error out on size switch failure
 	if (gfxError & OSystem::kTransactionSizeChangeFailed) {
 		Common::String message;
-		message = Common::String::format(_("Could not switch to resolution '%dx%d'."), width, height);
+		message = Common::String::format(
+			Common::convertFromU32String(_("Could not switch to resolution '%dx%d'.")).c_str(), width, height);
 
 		GUIErrorMessage(message);
 		error("%s", message.c_str());
@@ -324,7 +325,7 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
 	// Just show warnings then these occur:
 #ifdef USE_RGB_COLOR
 	if (gfxError & OSystem::kTransactionFormatNotSupported) {
-		Common::String message = _("Could not initialize color format.");
+		Common::U32String message = _("Could not initialize color format.");
 
 		GUI::MessageDialog dialog(message);
 		dialog.runModal();
@@ -333,7 +334,8 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
 
 	if (gfxError & OSystem::kTransactionModeSwitchFailed) {
 		Common::String message;
-		message = Common::String::format(_("Could not switch to video mode '%s'."), ConfMan.get("gfx_mode").c_str());
+		message = Common::String::format(
+			Common::convertFromU32String(_("Could not switch to video mode '%s'.")).c_str(), ConfMan.get("gfx_mode").c_str());
 
 		GUI::MessageDialog dialog(message);
 		dialog.runModal();
@@ -341,7 +343,8 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
 
 	if (gfxError & OSystem::kTransactionStretchModeSwitchFailed) {
 		Common::String message;
-		message = Common::String::format(_("Could not switch to stretch mode '%s'."), ConfMan.get("stretch_mode").c_str());
+		message = Common::String::format(
+			Common::convertFromU32String(_("Could not switch to stretch mode '%s'.")).c_str(), ConfMan.get("stretch_mode").c_str());
 
 		GUI::MessageDialog dialog(message);
 		dialog.runModal();
@@ -516,7 +519,7 @@ void Engine::saveAutosaveIfEnabled() {
 			saveFlag = desc.getSaveSlot() == -1 || desc.isAutosave();
 		}
 
-		if (saveFlag && saveGameState(getAutosaveSlot(), _("Autosave"), true).getCode() != Common::kNoError) {
+		if (saveFlag && saveGameState(getAutosaveSlot(), Common::convertFromU32String(_("Autosave")), true).getCode() != Common::kNoError) {
 			// Couldn't autosave at the designated time
 			g_system->displayMessageOnOSD(_("Error occurred making autosave"));
 			saveFlag = false;
@@ -597,9 +600,9 @@ void Engine::openMainMenuDialog() {
 	if (_saveSlotToLoad >= 0) {
 		Common::Error status = loadGameState(_saveSlotToLoad);
 		if (status.getCode() != Common::kNoError) {
-			Common::String failMessage = Common::String::format(_("Failed to load saved game (%s)! "
+			Common::U32String failMessage = Common::String::format(Common::convertFromU32String(_("Failed to load saved game (%s)! "
 				  "Please consult the README for basic information, and for "
-				  "instructions on how to obtain further assistance."), status.getDesc().c_str());
+				  "instructions on how to obtain further assistance.")).c_str(), status.getDesc().c_str());
 			GUI::MessageDialog dialog(failMessage);
 			dialog.runModal();
 		}
@@ -762,7 +765,7 @@ bool Engine::loadGameDialog() {
 		return false;
 	}
 
-	GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(Common::convertToU32String(_("Load game:")), Common::convertToU32String(_("Load")), false);
+	GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser((_("Load game:")), (_("Load")), false);
 
 	int slotNum;
 	{
@@ -791,7 +794,7 @@ bool Engine::saveGameDialog() {
 		return false;
 	}
 
-	GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(Common::convertToU32String(_("Save game:")), Common::convertToU32String(_("Save")), true);
+	GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser((_("Save game:")), (_("Save")), true);
 	int slotNum;
 	{
 		PauseToken pt = pauseEngine();
diff --git a/engines/game.cpp b/engines/game.cpp
index b90381d2d3..7b9a67c1aa 100644
--- a/engines/game.cpp
+++ b/engines/game.cpp
@@ -169,13 +169,13 @@ Common::String generateUnknownGameReport(const DetectedGames &detectedGames, boo
 	assert(!detectedGames.empty());
 
 	const char *reportStart = _s("The game in '%s' seems to be an unknown game variant.\n\n"
-	                             "Please report the following data to the ScummVM team at %s "
-	                             "along with the name of the game you tried to add and "
-	                             "its version, language, etc.:");
+									"Please report the following data to the ScummVM team at %s "
+									"along with the name of the game you tried to add and "
+									"its version, language, etc.:");
 	const char *reportEngineHeader = _s("Matched game IDs for the %s engine:");
 
 	Common::String report = Common::String::format(
-			translate ? _(reportStart) : reportStart,
+			translate ? Common::convertFromU32String(_(reportStart)).c_str() : reportStart,
 			fullPath ? detectedGames[0].path.c_str() : detectedGames[0].shortPath.c_str(),
 			"https://bugs.scummvm.org/"
 	);
@@ -195,7 +195,7 @@ Common::String generateUnknownGameReport(const DetectedGames &detectedGames, boo
 			// If the engine is not the same as for the previous entry, print an engine line header
 			report += "\n";
 			report += Common::String::format(
-					translate ? _(reportEngineHeader) : reportEngineHeader,
+					translate ? Common::convertFromU32String(_(reportEngineHeader)).c_str() : reportEngineHeader,
 					game.engineId.c_str()
 			);
 			report += " ";
diff --git a/engines/savestate.cpp b/engines/savestate.cpp
index a83c3a2c78..e440a58f23 100644
--- a/engines/savestate.cpp
+++ b/engines/savestate.cpp
@@ -32,7 +32,7 @@ SaveStateDescriptor::SaveStateDescriptor()
 	_thumbnail(), _saveType(kSaveTypeUndetermined) {
 }
 
-SaveStateDescriptor::SaveStateDescriptor(int s, const Common::String &d)
+SaveStateDescriptor::SaveStateDescriptor(int s, const Common::U32String &d)
 	: _slot(s), _description(d), _isDeletable(true), _isWriteProtected(false),
 	  _isLocked(false), _saveDate(), _saveTime(), _playTime(), _playTimeMSecs(0),
 	_thumbnail(), _saveType(kSaveTypeUndetermined) {
diff --git a/engines/savestate.h b/engines/savestate.h
index cb755b78de..2baf47e2c4 100644
--- a/engines/savestate.h
+++ b/engines/savestate.h
@@ -25,6 +25,7 @@
 
 #include "common/array.h"
 #include "common/str.h"
+#include "common/ustr.h"
 #include "common/ptr.h"
 
 namespace Graphics {
@@ -51,7 +52,7 @@ private:
 	};
 public:
 	SaveStateDescriptor();
-	SaveStateDescriptor(int s, const Common::String &d);
+	SaveStateDescriptor(int s, const Common::U32String &d);
 
 	/**
 	 * @param slot The saveslot id, as it would be passed to the "-x" command line switch.
@@ -66,12 +67,12 @@ public:
 	/**
 	 * @param desc A human readable description of the save state.
 	 */
-	void setDescription(const Common::String &desc) { _description = desc; }
+	void setDescription(const Common::U32String &desc) { _description = desc; }
 
 	/**
 	 * @return A human readable description of the save state.
 	 */
-	const Common::String &getDescription() const { return _description; }
+	const Common::U32String &getDescription() const { return _description; }
 
 	/** Optional entries only included when querying via MetaEngine::querySaveMetaInfo */
 
@@ -181,7 +182,7 @@ public:
 	 *
 	 * This will return an empty string in case the value is not set.
 	 */
-	const Common::String &getPlayTime() const { return _playTime; }
+	const Common::U32String &getPlayTime() const { return _playTime; }
 
 	/**
 	 * Returns the time the game was played before the save state was created
@@ -209,7 +210,7 @@ private:
 	/**
 	 * A human readable description of the save state.
 	 */
-	Common::String _description;
+	Common::U32String _description;
 
 	/**
 	 * Whether the save state can be deleted.
@@ -240,7 +241,7 @@ private:
 	 * Human readable description of the time the game was played till the
 	 * save state was created.
 	 */
-	Common::String _playTime;
+	Common::U32String _playTime;
 
 	/**
 	 * The time the game was played before the save state was created
diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp
index b31fcb9711..45324167c1 100644
--- a/gui/EventRecorder.cpp
+++ b/gui/EventRecorder.cpp
@@ -649,7 +649,7 @@ bool EventRecorder::switchMode() {
 			g_system->getEventManager()->pushEvent(eventReturnToLauncher);
 		}
 	}
-	ConfMan.set("record_mode", "", Common::ConfigManager::kTransientDomain);
+	ConfMan.set("record_mode", Common::U32String(""), Common::ConfigManager::kTransientDomain);
 	ConfMan.setInt("save_slot", emptySlot, Common::ConfigManager::kTransientDomain);
 	_needcontinueGame = true;
 	return true;
diff --git a/gui/Tooltip.cpp b/gui/Tooltip.cpp
index cb5ebba8b4..4e32b175df 100644
--- a/gui/Tooltip.cpp
+++ b/gui/Tooltip.cpp
@@ -64,7 +64,7 @@ void Tooltip::setup(Dialog *parent, Widget *widget, int x, int y) {
 		Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 		if (ttsMan == nullptr)
 			return;
-		ttsMan->say(widget->getTooltip(), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
+		ttsMan->say(Common::convertFromU32String(widget->getTooltip()), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
 	}
 #endif
 }
@@ -80,7 +80,7 @@ void Tooltip::drawDialog(DrawLayer layerToDraw) {
 
 	Graphics::TextAlign textAlignment = g_gui.useRTL() ? Graphics::kTextAlignRight : Graphics::kTextAlignLeft;
 
-	for (Common::StringArray::const_iterator i = _wrappedLines.begin(); i != _wrappedLines.end(); ++i, ++num) {
+	for (Common::U32StringArray::const_iterator i = _wrappedLines.begin(); i != _wrappedLines.end(); ++i, ++num) {
 		g_gui.theme()->drawText(
 			Common::Rect(textX, textY + num * h, textX + _w, textY + (num + 1) * h),
 			*i,
diff --git a/gui/Tooltip.h b/gui/Tooltip.h
index a7a654dbbe..66e0d7bcba 100644
--- a/gui/Tooltip.h
+++ b/gui/Tooltip.h
@@ -71,7 +71,7 @@ protected:
 	int _maxWidth;
 	int _xdelta, _ydelta;
 
-	Common::StringArray _wrappedLines;
+	Common::U32StringArray _wrappedLines;
 };
 
 } // End of namespace GUI
diff --git a/gui/about.cpp b/gui/about.cpp
index 3e81b49e60..82d46a99c9 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -99,14 +99,14 @@ AboutDialog::AboutDialog()
 	version += gScummVMVersion;
 	_lines.push_back(version);
 
-	Common::String date = Common::String::format(_("(built on %s)"), gScummVMBuildDate);
+	Common::String date = Common::String::format(Common::convertFromU32String(_("(built on %s)")).c_str(), gScummVMBuildDate);
 	_lines.push_back("C2" + date);
 
 	for (i = 0; i < ARRAYSIZE(copyright_text); i++)
 		addLine(copyright_text[i]);
 
 	Common::String features("C1");
-	features += _("Features compiled in:");
+	features += Common::convertFromU32String(_("Features compiled in:"));
 	addLine(features.c_str());
 	Common::String featureList("C0");
 	featureList += gScummVMFeatures;
@@ -115,7 +115,7 @@ AboutDialog::AboutDialog()
 	_lines.push_back("");
 
 	Common::String engines("C1");
-	engines += _("Available engines:");
+	engines += Common::convertFromU32String(_("Available engines:"));
 	addLine(engines.c_str());
 
 	const PluginList &plugins = EngineMan.getPlugins();
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 320ed18d8c..80b9cad702 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -49,7 +49,7 @@ enum {
  * - others???
  */
 
-BrowserDialog::BrowserDialog(Common::U32String &title, bool dirBrowser)
+BrowserDialog::BrowserDialog(const Common::U32String &title, bool dirBrowser)
 	: Dialog("Browser") {
 
 	_title = title;
@@ -62,7 +62,7 @@ BrowserDialog::BrowserDialog(Common::U32String &title, bool dirBrowser)
 	new StaticTextWidget(this, "Browser.Headline", title);
 
 	// Current path - TODO: handle long paths ?
-	_currentPath = new EditTextWidget(this, "Browser.Path", Common::convertToU32String(""), nullptr, 0, kPathEditedCmd);
+	_currentPath = new EditTextWidget(this, "Browser.Path", Common::convertToU32String(""), Common::U32String(""), 0, kPathEditedCmd);
 
 	// Add file list
 	_fileList = new ListWidget(this, "Browser.List");
@@ -72,15 +72,15 @@ BrowserDialog::BrowserDialog(Common::U32String &title, bool dirBrowser)
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
 	// Checkbox for the "show hidden files" state.
-	_showHiddenWidget = new CheckboxWidget(this, "Browser.Hidden", Common::convertToU32String(_("Show hidden files")), _("Show files marked with the hidden attribute"), kHiddenCmd);
+	_showHiddenWidget = new CheckboxWidget(this, "Browser.Hidden", (_("Show hidden files")), _("Show files marked with the hidden attribute"), kHiddenCmd);
 
 	// Buttons
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(this, "Browser.Up", Common::convertToU32String(_("Go up")), _("Go to previous directory level"), kGoUpCmd);
+		new ButtonWidget(this, "Browser.Up", (_("Go up")), _("Go to previous directory level"), kGoUpCmd);
 	else
-		new ButtonWidget(this, "Browser.Up", Common::convertToU32String(_c("Go up", "lowres")), _("Go to previous directory level"), kGoUpCmd);
-	new ButtonWidget(this, "Browser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
-	new ButtonWidget(this, "Browser.Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
+		new ButtonWidget(this, "Browser.Up", (_c("Go up", "lowres")), _("Go to previous directory level"), kGoUpCmd);
+	new ButtonWidget(this, "Browser.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "Browser.Choose", (_("Choose")), Common::U32String(""), kChooseCmd);
 }
 
 int BrowserDialog::runModal() {
diff --git a/gui/browser.h b/gui/browser.h
index 1fd53dcf72..0b8e1e82a8 100644
--- a/gui/browser.h
+++ b/gui/browser.h
@@ -36,7 +36,7 @@ class CommandSender;
 
 class BrowserDialog : public Dialog {
 public:
-	BrowserDialog(Common::U32String &title, bool dirBrowser);
+	BrowserDialog(const Common::U32String &title, bool dirBrowser);
 
 	int runModal() override;
 	void open() override;
diff --git a/gui/chooser.cpp b/gui/chooser.cpp
index 220fc1f5f2..0ba5629785 100644
--- a/gui/chooser.cpp
+++ b/gui/chooser.cpp
@@ -31,7 +31,7 @@ enum {
 	kChooseCmd = 'Chos'
 };
 
-ChooserDialog::ChooserDialog(const String &title, String dialogId)
+ChooserDialog::ChooserDialog(const U32String &title, String dialogId)
 	: Dialog(dialogId) {
 
 	// Headline
@@ -43,8 +43,8 @@ ChooserDialog::ChooserDialog(const String &title, String dialogId)
 	_list->setEditable(false);
 
 	// Buttons
-	new ButtonWidget(this, dialogId + ".Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
-	_chooseButton = new ButtonWidget(this, dialogId + ".Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
+	new ButtonWidget(this, dialogId + ".Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
+	_chooseButton = new ButtonWidget(this, dialogId + ".Choose", (_("Choose")), Common::U32String(""), kChooseCmd);
 	_chooseButton->setEnabled(false);
 }
 
diff --git a/gui/chooser.h b/gui/chooser.h
index 0c47e58a3b..06df8fdac7 100644
--- a/gui/chooser.h
+++ b/gui/chooser.h
@@ -48,7 +48,7 @@ protected:
 	ButtonWidget	*_chooseButton;
 
 public:
-	ChooserDialog(const String &title, String dialogId = "Browser");
+	ChooserDialog(const U32String &title, String dialogId = "Browser");
 
 	void setList(const U32StringArray& list);
 
diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp
index 057ea446a9..0b66770efc 100644
--- a/gui/downloaddialog.cpp
+++ b/gui/downloaddialog.cpp
@@ -46,11 +46,11 @@ DownloadDialog::DownloadDialog(uint32 storageId, LauncherDialog *launcher) :
 	Dialog("GlobalOptions_Cloud_DownloadDialog"), _launcher(launcher), _close(false) {
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
-	_browser = new BrowserDialog(Common::convertToU32String(_("Select directory where to download game data")), true);
+	_browser = new BrowserDialog((_("Select directory where to download game data")), true);
 	_remoteBrowser = new RemoteBrowserDialog(_("Select directory with game data"));
 
-	_remoteDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.RemoteDirectory", Common::convertToU32String(_("From: ")));
-	_localDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.LocalDirectory", Common::convertToU32String(_("To: ")));
+	_remoteDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.RemoteDirectory", (_("From: ")));
+	_localDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.LocalDirectory", (_("To: ")));
 	uint32 progress = (uint32)(100 * CloudMan.getDownloadingProgress());
 	_progressBar = new SliderWidget(this, "GlobalOptions_Cloud_DownloadDialog.ProgressBar");
 	_progressBar->setMinValue(0);
@@ -61,11 +61,11 @@ DownloadDialog::DownloadDialog(uint32 storageId, LauncherDialog *launcher) :
 	_downloadSizeLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSize", Common::convertToU32String(""));
 	_downloadSpeedLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSpeed", Common::convertToU32String(""));
 	if (g_system->getOverlayWidth() > 320)
-		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", Common::convertToU32String(_("Cancel download")), nullptr, kDownloadDialogButtonCmd);
+		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", (_("Cancel download")), Common::U32String(""), kDownloadDialogButtonCmd);
 	else
-		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", Common::convertToU32String(_c("Cancel download", "lowres")), nullptr, kDownloadDialogButtonCmd);
+		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", (_c("Cancel download", "lowres")), Common::U32String(""), kDownloadDialogButtonCmd);
 
-	_closeButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.CloseButton", Common::convertToU32String(_("Hide")), nullptr, kCloseCmd);
+	_closeButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.CloseButton", (_("Hide")), Common::U32String(""), kCloseCmd);
 	refreshWidgets();
 
 	CloudMan.setDownloadTarget(this);
@@ -149,7 +149,7 @@ bool DownloadDialog::selectDirectories() {
 				return false;
 			}
 			GUI::MessageDialog alert(
-				Common::String::format(_("The \"%s\" already exists in the specified directory.\nDo you really want to download files into that directory?"), remoteDirectory.name().c_str()),
+				Common::String::format(Common::convertFromU32String(_("The \"%s\" already exists in the specified directory.\nDo you really want to download files into that directory?")).c_str(), remoteDirectory.name().c_str()),
 				_("Yes"),
 				_("No")
 				);
@@ -208,18 +208,18 @@ void DownloadDialog::reflowLayout() {
 	refreshWidgets();
 }
 
-Common::String DownloadDialog::getSizeLabelText() {
+Common::U32String DownloadDialog::getSizeLabelText() {
 	Common::String downloaded, downloadedUnits, total, totalUnits;
 	downloaded = getHumanReadableBytes(CloudMan.getDownloadBytesNumber(), downloadedUnits);
 	total = getHumanReadableBytes(CloudMan.getDownloadTotalBytesNumber(), totalUnits);
-	return Common::String::format(_("Downloaded %s %s / %s %s"), downloaded.c_str(), _(downloadedUnits.c_str()), total.c_str(), _(totalUnits.c_str()));
+	return Common::U32String::format(Common::convertFromU32String(_("Downloaded %s %s / %s %s")).c_str(), downloaded.c_str(), _(downloadedUnits.c_str()), total.c_str(), _(totalUnits.c_str()));
 }
 
-Common::String DownloadDialog::getSpeedLabelText() {
+Common::U32String DownloadDialog::getSpeedLabelText() {
 	Common::String speed, speedUnits;
 	speed = getHumanReadableBytes(CloudMan.getDownloadSpeed(), speedUnits);
 	speedUnits += "/s";
-	return Common::String::format(_("Download speed: %s %s"), speed.c_str(), _(speedUnits.c_str()));
+	return Common::U32String::format(_("Download speed: %s %s").encode().c_str(), speed.c_str(), _(speedUnits).encode().c_str());
 }
 
 void DownloadDialog::refreshWidgets() {
diff --git a/gui/downloaddialog.h b/gui/downloaddialog.h
index ef04a1d292..837d3cbc52 100644
--- a/gui/downloaddialog.h
+++ b/gui/downloaddialog.h
@@ -59,8 +59,8 @@ class DownloadDialog : public Dialog {
 	Common::String _localDirectory;
 	bool _close;
 
-	Common::String getSizeLabelText();
-	Common::String getSpeedLabelText();
+	Common::U32String getSizeLabelText();
+	Common::U32String getSpeedLabelText();
 
 	void refreshWidgets();
 	bool selectDirectories();
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index 8e785d9b46..e24676321b 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -88,7 +88,7 @@ enum {
 */
 class DomainEditTextWidget : public EditTextWidget {
 public:
-	DomainEditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltip = nullptr)
+	DomainEditTextWidget(GuiObject *boss, const String &name, const String &text, U32String tooltip = U32String(""))
 		: EditTextWidget(boss, name, text, tooltip) {}
 
 protected:
@@ -132,26 +132,26 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	// 1) The game tab
 	//
-	tab->addTab(Common::convertToU32String(_("Game")), "GameOptions_Game");
+	tab->addTab((_("Game")), "GameOptions_Game");
 
 	// GUI:  Label & edit widget for the game ID
 	if (g_system->getOverlayWidth() > 320)
-		new StaticTextWidget(tab, "GameOptions_Game.Id", Common::convertToU32String(_("ID:")), _("Short game identifier used for referring to saved games and running the game from the command line"));
+		new StaticTextWidget(tab, "GameOptions_Game.Id", (_("ID:")), _("Short game identifier used for referring to saved games and running the game from the command line"));
 	else
-		new StaticTextWidget(tab, "GameOptions_Game.Id", Common::convertToU32String(_c("ID:", "lowres")), _("Short game identifier used for referring to saved games and running the game from the command line"));
+		new StaticTextWidget(tab, "GameOptions_Game.Id", (_c("ID:", "lowres")), _("Short game identifier used for referring to saved games and running the game from the command line"));
 	_domainWidget = new DomainEditTextWidget(tab, "GameOptions_Game.Domain", _domain, _("Short game identifier used for referring to saved games and running the game from the command line"));
 
 	// GUI:  Label & edit widget for the description
 	if (g_system->getOverlayWidth() > 320)
-		new StaticTextWidget(tab, "GameOptions_Game.Name", Common::convertToU32String(_("Name:")), _("Full title of the game"));
+		new StaticTextWidget(tab, "GameOptions_Game.Name", (_("Name:")), _("Full title of the game"));
 	else
-		new StaticTextWidget(tab, "GameOptions_Game.Name", Common::convertToU32String(_c("Name:", "lowres")), _("Full title of the game"));
+		new StaticTextWidget(tab, "GameOptions_Game.Name", (_c("Name:", "lowres")), _("Full title of the game"));
 	_descriptionWidget = new EditTextWidget(tab, "GameOptions_Game.Desc", description, _("Full title of the game"));
 
 	// Language popup
-	_langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", Common::convertToU32String(_("Language:")), _("Language of the game. This will not turn your Spanish game version into English"));
+	_langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", (_("Language:")), _("Language of the game. This will not turn your Spanish game version into English"));
 	_langPopUp = new PopUpWidget(tab, "GameOptions_Game.LangPopup", _("Language of the game. This will not turn your Spanish game version into English"));
-	_langPopUp->appendEntry(Common::convertToU32String(_("<default>")), (uint32)Common::UNK_LANG);
+	_langPopUp->appendEntry((_("<default>")), (uint32)Common::UNK_LANG);
 	_langPopUp->appendEntry(Common::convertToU32String(""), (uint32)Common::UNK_LANG);
 	const Common::LanguageDescription *l = Common::g_languages;
 	for (; l->code; ++l) {
@@ -161,11 +161,11 @@ EditGameDialog::EditGameDialog(const String &domain)
 
 	// Platform popup
 	if (g_system->getOverlayWidth() > 320)
-		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", Common::convertToU32String(_("Platform:")), _("Platform the game was originally designed for"));
+		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", (_("Platform:")), _("Platform the game was originally designed for"));
 	else
-		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", Common::convertToU32String(_c("Platform:", "lowres")), _("Platform the game was originally designed for"));
+		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", (_c("Platform:", "lowres")), _("Platform the game was originally designed for"));
 	_platformPopUp = new PopUpWidget(tab, "GameOptions_Game.PlatformPopup", _("Platform the game was originally designed for"));
-	_platformPopUp->appendEntry(Common::convertToU32String(_("<default>")));
+	_platformPopUp->appendEntry((_("<default>")));
 	_platformPopUp->appendEntry(Common::convertToU32String(""));
 	const Common::PlatformDescription *p = Common::g_platforms;
 	for (; p->code; ++p) {
@@ -177,7 +177,7 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 
 	if (plugin) {
-		int tabId = tab->addTab(Common::convertToU32String(_("Engine")), "GameOptions_Engine");
+		int tabId = tab->addTab((_("Engine")), "GameOptions_Engine");
 
 		const MetaEngine &metaEngine = plugin->get<MetaEngine>();
 		metaEngine.registerDefaultSettings(_domain);
@@ -193,15 +193,15 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	// 3) The graphics tab
 	//
-	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? Common::convertToU32String(_("Graphics")) : Common::convertToU32String(_("GFX")), "GameOptions_Graphics");
+	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? (_("Graphics")) : (_("GFX")), "GameOptions_Graphics");
 	ScrollContainerWidget *graphicsContainer = new ScrollContainerWidget(tab, "GameOptions_Graphics.Container", "GameOptions_Graphics_Container", kGraphicsTabContainerReflowCmd);
 	graphicsContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
 	graphicsContainer->setTarget(this);
 
 	if (g_system->getOverlayWidth() > 320)
-		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", Common::convertToU32String(_("Override global graphic settings")), nullptr, kCmdGlobalGraphicsOverride);
+		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", (_("Override global graphic settings")), Common::U32String(""), kCmdGlobalGraphicsOverride);
 	else
-		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", Common::convertToU32String(_c("Override global graphic settings", "lowres")), nullptr, kCmdGlobalGraphicsOverride);
+		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", (_c("Override global graphic settings", "lowres")), Common::U32String(""), kCmdGlobalGraphicsOverride);
 
 	addGraphicControls(graphicsContainer, "GameOptions_Graphics_Container.");
 
@@ -211,12 +211,12 @@ EditGameDialog::EditGameDialog(const String &domain)
 
 	_globalShaderOverride = nullptr;
 	if (g_system->hasFeature(OSystem::kFeatureShader)) {
-		tab->addTab(Common::convertToU32String(_("Shader")), "GameOptions_Shader");
+		tab->addTab((_("Shader")), "GameOptions_Shader");
 
 		if (g_system->getOverlayWidth() > 320)
-			_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", Common::convertToU32String(_("Override global shader settings")), nullptr, kCmdGlobalShaderOverride);
+			_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", (_("Override global shader settings")), Common::U32String(""), kCmdGlobalShaderOverride);
 		else
-			_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", Common::convertToU32String(_c("Override global shader settings", "lowres")), nullptr, kCmdGlobalShaderOverride);
+			_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", (_c("Override global shader settings", "lowres")), Common::U32String(""), kCmdGlobalShaderOverride);
 
 		addShaderControls(tab, "GameOptions_Shader.");
 	}
@@ -230,19 +230,19 @@ EditGameDialog::EditGameDialog(const String &domain)
 	}
 
 	if (!keymaps.empty()) {
-		tab->addTab(Common::convertToU32String(_("Keymaps")), "GameOptions_KeyMapper");
+		tab->addTab((_("Keymaps")), "GameOptions_KeyMapper");
 		addKeyMapperControls(tab, "GameOptions_KeyMapper.", keymaps, domain);
 	}
 
 	//
 	// 4) The audio tab
 	//
-	tab->addTab(Common::convertToU32String(_("Audio")), "GameOptions_Audio");
+	tab->addTab((_("Audio")), "GameOptions_Audio");
 
 	if (g_system->getOverlayWidth() > 320)
-		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", Common::convertToU32String(_("Override global audio settings")), nullptr, kCmdGlobalAudioOverride);
+		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", (_("Override global audio settings")), Common::U32String(""), kCmdGlobalAudioOverride);
 	else
-		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", Common::convertToU32String(_c("Override global audio settings", "lowres")), nullptr, kCmdGlobalAudioOverride);
+		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", (_c("Override global audio settings", "lowres")), Common::U32String(""), kCmdGlobalAudioOverride);
 
 	addAudioControls(tab, "GameOptions_Audio.");
 	addSubtitleControls(tab, "GameOptions_Audio.");
@@ -251,14 +251,14 @@ EditGameDialog::EditGameDialog(const String &domain)
 	// 5) The volume tab
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(Common::convertToU32String(_("Volume")), "GameOptions_Volume");
+		tab->addTab((_("Volume")), "GameOptions_Volume");
 	else
-		tab->addTab(Common::convertToU32String(_c("Volume", "lowres")), "GameOptions_Volume");
+		tab->addTab((_c("Volume", "lowres")), "GameOptions_Volume");
 
 	if (g_system->getOverlayWidth() > 320)
-		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", Common::convertToU32String(_("Override global volume settings")), nullptr, kCmdGlobalVolumeOverride);
+		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", (_("Override global volume settings")), Common::U32String(""), kCmdGlobalVolumeOverride);
 	else
-		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", Common::convertToU32String(_c("Override global volume settings", "lowres")), nullptr, kCmdGlobalVolumeOverride);
+		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", (_c("Override global volume settings", "lowres")), Common::U32String(""), kCmdGlobalVolumeOverride);
 
 	addVolumeControls(tab, "GameOptions_Volume.");
 
@@ -269,12 +269,12 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	_globalMIDIOverride = nullptr;
 	if (showMidi) {
-		tab->addTab(Common::convertToU32String(_("MIDI")), "GameOptions_MIDI");
+		tab->addTab((_("MIDI")), "GameOptions_MIDI");
 
 		if (g_system->getOverlayWidth() > 320)
-			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", Common::convertToU32String(_("Override global MIDI settings")), nullptr, kCmdGlobalMIDIOverride);
+			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", (_("Override global MIDI settings")), Common::U32String(""), kCmdGlobalMIDIOverride);
 		else
-			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", Common::convertToU32String(_c("Override global MIDI settings", "lowres")), nullptr, kCmdGlobalMIDIOverride);
+			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", (_c("Override global MIDI settings", "lowres")), Common::U32String(""), kCmdGlobalMIDIOverride);
 
 		addMIDIControls(tab, "GameOptions_MIDI.");
 	}
@@ -284,12 +284,12 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	_globalMT32Override = nullptr;
 	if (showMidi) {
-		tab->addTab(Common::convertToU32String(_("MT-32")), "GameOptions_MT32");
+		tab->addTab((_("MT-32")), "GameOptions_MT32");
 
 		if (g_system->getOverlayWidth() > 320)
-			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", Common::convertToU32String(_("Override global MT-32 settings")), nullptr, kCmdGlobalMT32Override);
+			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", (_("Override global MT-32 settings")), Common::U32String(""), kCmdGlobalMT32Override);
 		else
-			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", Common::convertToU32String(_c("Override global MT-32 settings", "lowres")), nullptr, kCmdGlobalMT32Override);
+			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", (_c("Override global MT-32 settings", "lowres")), Common::U32String(""), kCmdGlobalMT32Override);
 
 		addMT32Controls(tab, "GameOptions_MT32.");
 	}
@@ -298,34 +298,34 @@ EditGameDialog::EditGameDialog(const String &domain)
 	// 8) The Paths tab
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(Common::convertToU32String(_("Paths")), "GameOptions_Paths");
+		tab->addTab((_("Paths")), "GameOptions_Paths");
 	else
-		tab->addTab(Common::convertToU32String(_c("Paths", "lowres")), "GameOptions_Paths");
+		tab->addTab((_c("Paths", "lowres")), "GameOptions_Paths");
 
 	// These buttons have to be extra wide, or the text will be truncated
 	// in the small version of the GUI.
 
 	// GUI:  Button + Label for the game path
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", Common::convertToU32String(_("Game Path:")), nullptr, kCmdGameBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", (_("Game Path:")), Common::U32String(""), kCmdGameBrowser);
 	else
-		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", Common::convertToU32String(_c("Game Path:", "lowres")), nullptr, kCmdGameBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", (_c("Game Path:", "lowres")), Common::U32String(""), kCmdGameBrowser);
 	_gamePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.GamepathText", gamePath);
 
 	// GUI:  Button + Label for the additional path
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(tab, "GameOptions_Paths.Extrapath", Common::convertToU32String(_("Extra Path:")), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Extrapath", (_("Extra Path:")), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
 	else
-		new ButtonWidget(tab, "GameOptions_Paths.Extrapath", Common::convertToU32String(_c("Extra Path:", "lowres")), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Extrapath", (_c("Extra Path:", "lowres")), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
 	_extraPathWidget = new StaticTextWidget(tab, "GameOptions_Paths.ExtrapathText", extraPath, _("Specifies path to additional data used by the game"));
 
 	_extraPathClearButton = addClearButton(tab, "GameOptions_Paths.ExtraPathClearButton", kCmdExtraPathClear);
 
 	// GUI:  Button + Label for the save path
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(tab, "GameOptions_Paths.Savepath", Common::convertToU32String(_("Save Path:")), _("Specifies where your saved games are put"), kCmdSaveBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Savepath", (_("Save Path:")), _("Specifies where your saved games are put"), kCmdSaveBrowser);
 	else
-		new ButtonWidget(tab, "GameOptions_Paths.Savepath", Common::convertToU32String(_c("Save Path:", "lowres")), _("Specifies where your saved games are put"), kCmdSaveBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Savepath", (_c("Save Path:", "lowres")), _("Specifies where your saved games are put"), kCmdSaveBrowser);
 	_savePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.SavepathText", savePath, _("Specifies where your saved games are put"));
 
 	_savePathClearButton = addClearButton(tab, "GameOptions_Paths.SavePathClearButton", kCmdSavePathClear);
@@ -337,7 +337,7 @@ EditGameDialog::EditGameDialog(const String &domain)
 		const MetaEngine &metaEngine = plugin->get<MetaEngine>();
 		Common::AchievementsInfo achievementsInfo = metaEngine.getAchievementsInfo(domain);
 		if (achievementsInfo.descriptions.size() > 0) {
-			tab->addTab(Common::convertToU32String(_("Achievements")), "GameOptions_Achievements");
+			tab->addTab((_("Achievements")), "GameOptions_Achievements");
 			addAchievementsControls(tab, "GameOptions_Achievements.", achievementsInfo);
 		}
 	}
@@ -347,8 +347,8 @@ EditGameDialog::EditGameDialog(const String &domain)
 	_tabWidget = tab;
 
 	// Add OK & Cancel buttons
-	new ButtonWidget(this, "GameOptions.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
-	new ButtonWidget(this, "GameOptions.Ok", Common::convertToU32String(_("OK")), nullptr, kOKCmd);
+	new ButtonWidget(this, "GameOptions.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "GameOptions.Ok", (_("OK")), Common::U32String(""), kOKCmd);
 }
 
 void EditGameDialog::setupGraphicsTab() {
@@ -361,12 +361,12 @@ void EditGameDialog::open() {
 
 	String extraPath(ConfMan.get("extrapath", _domain));
 	if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) {
-		_extraPathWidget->setLabel(Common::convertToU32String(_c("None", "path")));
+		_extraPathWidget->setLabel((_c("None", "path")));
 	}
 
 	String savePath(ConfMan.get("savepath", _domain));
 	if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) {
-		_savePathWidget->setLabel(Common::convertToU32String(_("Default")));
+		_savePathWidget->setLabel((_("Default")));
 	}
 
 	int sel, i;
@@ -451,13 +451,13 @@ void EditGameDialog::apply() {
 		ConfMan.set("path", gamePath, _domain);
 
 	String extraPath(Common::convertFromU32String(_extraPathWidget->getLabel()));
-	if (!extraPath.empty() && (extraPath != _c("None", "path")))
+	if (!extraPath.empty() && (extraPath != Common::convertFromU32String(_c("None", "path"))))
 		ConfMan.set("extrapath", extraPath, _domain);
 	else
 		ConfMan.removeKey("extrapath", _domain);
 
 	String savePath(Common::convertFromU32String(_savePathWidget->getLabel()));
-	if (!savePath.empty() && (savePath != _("Default")))
+	if (!savePath.empty() && (savePath != Common::convertFromU32String(_("Default"))))
 		ConfMan.set("savepath", savePath, _domain);
 	else
 		ConfMan.removeKey("savepath", _domain);
@@ -506,14 +506,14 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 		break;
 	case kCmdChooseSoundFontCmd:
 	{
-		BrowserDialog browser(Common::convertToU32String(_("Select SoundFont")), false);
+		BrowserDialog browser((_("Select SoundFont")), false);
 
 		if (browser.runModal() > 0) {
 			// User made this choice...
 			Common::FSNode file(browser.getResult());
 			_soundFont->setLabel(file.getPath());
 
-			if (!file.getPath().empty() && (file.getPath() != _c("None", "path")))
+			if (!file.getPath().empty() && (file.getPath() != Common::convertFromU32String(_c("None", "path"))))
 				_soundFontClearButton->setEnabled(true);
 			else
 				_soundFontClearButton->setEnabled(false);
@@ -526,7 +526,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	// Change path for the game
 	case kCmdGameBrowser:
 	{
-		BrowserDialog browser(Common::convertToU32String(_("Select directory with game data")), true);
+		BrowserDialog browser((_("Select directory with game data")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -545,7 +545,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	// Change path for extra game data (eg, using sword cutscenes when playing via CD)
 	case kCmdExtraBrowser:
 	{
-		BrowserDialog browser(Common::convertToU32String(_("Select additional game directory")), true);
+		BrowserDialog browser((_("Select additional game directory")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -558,7 +558,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	// Change path for stored save game (perm and temp) data
 	case kCmdSaveBrowser:
 	{
-		BrowserDialog browser(Common::convertToU32String(_("Select directory for saved games")), true);
+		BrowserDialog browser((_("Select directory for saved games")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -574,11 +574,11 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	}
 
 	case kCmdExtraPathClear:
-		_extraPathWidget->setLabel(Common::convertToU32String(_c("None", "path")));
+		_extraPathWidget->setLabel((_c("None", "path")));
 		break;
 
 	case kCmdSavePathClear:
-		_savePathWidget->setLabel(Common::convertToU32String(_("Default")));
+		_savePathWidget->setLabel((_("Default")));
 		break;
 
 	case kOKCmd:
diff --git a/gui/editrecorddialog.cpp b/gui/editrecorddialog.cpp
index 6e74351acc..97d0e7fdc6 100644
--- a/gui/editrecorddialog.cpp
+++ b/gui/editrecorddialog.cpp
@@ -64,8 +64,8 @@ EditRecordDialog::EditRecordDialog(const Common::String author, const Common::St
 	_authorEdit->setEditString(author);
 	_notesEdit->setEditString(notes);
 	_nameEdit->setEditString(name);
-	new GUI::ButtonWidget(this, "EditRecordDialog.Cancel", _("Cancel"), nullptr, kCloseCmd);
-	new GUI::ButtonWidget(this, "EditRecordDialog.OK", _("Ok"), nullptr, kOKCmd);
+	new GUI::ButtonWidget(this, "EditRecordDialog.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
+	new GUI::ButtonWidget(this, "EditRecordDialog.OK", _("Ok"), Common::U32String(""), kOKCmd);
 }
 
 void EditRecordDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/error.cpp b/gui/error.cpp
index 11f591ed0e..3cfc0ef020 100644
--- a/gui/error.cpp
+++ b/gui/error.cpp
@@ -28,14 +28,14 @@
 
 namespace GUI {
 
-void displayErrorDialog(const char *text) {
+void displayErrorDialog(const Common::U32String &text) {
 	GUI::MessageDialog alert(text);
 	alert.runModal();
 }
 
-void displayErrorDialog(const Common::Error &error, const char *extraText) {
-	Common::String errorText(extraText);
-	errorText += " ";
+void displayErrorDialog(const Common::Error &error, Common::U32String extraText) {
+	Common::U32String errorText(extraText);
+	errorText += Common::U32String(" ");
 	errorText += _(error.getDesc());
 	GUI::MessageDialog alert(errorText);
 	alert.runModal();
diff --git a/gui/error.h b/gui/error.h
index fa517b8e48..1da53d9e19 100644
--- a/gui/error.h
+++ b/gui/error.h
@@ -33,14 +33,14 @@ namespace GUI {
  * @param error error code
  * @param extraText extra text to be displayed in addition to default string description(optional)
  */
-void displayErrorDialog(const Common::Error &error, const char *extraText = "");
+void displayErrorDialog(const Common::Error &error, Common::U32String = Common::U32String(""));
 
 /**
  * Displays an error dialog for a given message.
  *
  * @param text message to be displayed
  */
-void displayErrorDialog(const char *text);
+void displayErrorDialog(const Common::U32String &text);
 
 } // End of namespace GUI
 
diff --git a/gui/filebrowser-dialog.cpp b/gui/filebrowser-dialog.cpp
index 6fced5e5ad..3493f32b7a 100644
--- a/gui/filebrowser-dialog.cpp
+++ b/gui/filebrowser-dialog.cpp
@@ -47,7 +47,7 @@ FileBrowserDialog::FileBrowserDialog(const char *title, const char *fileExtensio
 	_fileList = nullptr;
 
 	new StaticTextWidget(this, "FileBrowser.Headline", title ? Common::convertToU32String(title) :
-					mode == kFBModeLoad ? Common::convertToU32String(_("Choose file for loading")) : Common::convertToU32String(_("Enter filename for saving")));
+					mode == kFBModeLoad ? (_("Choose file for loading")) : (_("Enter filename for saving")));
 
 	_fileName = new EditTextWidget(this, "FileBrowser.Filename", Common::convertToU32String(""));
 
@@ -62,8 +62,8 @@ FileBrowserDialog::FileBrowserDialog(const char *title, const char *fileExtensio
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
 	// Buttons
-	new ButtonWidget(this, "FileBrowser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
-	new ButtonWidget(this, "FileBrowser.Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
+	new ButtonWidget(this, "FileBrowser.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "FileBrowser.Choose", (_("Choose")), Common::U32String(""), kChooseCmd);
 }
 
 void FileBrowserDialog::open() {
diff --git a/gui/fluidsynth-dialog.cpp b/gui/fluidsynth-dialog.cpp
index b3b5750ace..82405a9091 100644
--- a/gui/fluidsynth-dialog.cpp
+++ b/gui/fluidsynth-dialog.cpp
@@ -68,31 +68,31 @@ FluidSynthSettingsDialog::FluidSynthSettingsDialog()
 
 	_tabWidget->addTab(_("Reverb"), "FluidSynthSettings_Reverb");
 
-	_reverbActivate = new CheckboxWidget(_tabWidget, "FluidSynthSettings_Reverb.EnableTabCheckbox", _("Active"), nullptr, kActivateReverbCmd);
+	_reverbActivate = new CheckboxWidget(_tabWidget, "FluidSynthSettings_Reverb.EnableTabCheckbox", _("Active"), Common::U32String(""), kActivateReverbCmd);
 
 	_reverbRoomSizeDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeText", _("Room:"));
-	_reverbRoomSizeSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeSlider", nullptr, kReverbRoomSizeChangedCmd);
+	_reverbRoomSizeSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeSlider", Common::U32String(""), kReverbRoomSizeChangedCmd);
 	// 0.00 - 1.20, Default: 0.20
 	_reverbRoomSizeSlider->setMinValue(0);
 	_reverbRoomSizeSlider->setMaxValue(120);
 	_reverbRoomSizeLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeLabel", "20");
 
 	_reverbDampingDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingText", _("Damp:"));
-	_reverbDampingSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingSlider", nullptr, kReverbDampingChangedCmd);
+	_reverbDampingSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingSlider", Common::U32String(""), kReverbDampingChangedCmd);
 	// 0.00 - 1.00, Default: 0.00
 	_reverbDampingSlider->setMinValue(0);
 	_reverbDampingSlider->setMaxValue(100);
 	_reverbDampingLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingLabel", "0");
 
 	_reverbWidthDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthText", _("Width:"));
-	_reverbWidthSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthSlider", nullptr, kReverbWidthChangedCmd);
+	_reverbWidthSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthSlider", Common::U32String(""), kReverbWidthChangedCmd);
 	// 0 - 100, Default: 1
 	_reverbWidthSlider->setMinValue(0);
 	_reverbWidthSlider->setMaxValue(100);
 	_reverbWidthLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthLabel", "1");
 
 	_reverbLevelDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelText", _("Level:"));
-	_reverbLevelSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelSlider", nullptr, kReverbLevelChangedCmd);
+	_reverbLevelSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelSlider", Common::U32String(""), kReverbLevelChangedCmd);
 	// 0.00 - 1.00, Default: 0.90
 	_reverbLevelSlider->setMinValue(0);
 	_reverbLevelSlider->setMaxValue(100);
@@ -100,31 +100,31 @@ FluidSynthSettingsDialog::FluidSynthSettingsDialog()
 
 	_tabWidget->addTab(_("Chorus"), "FluidSynthSettings_Chorus");
 
-	_chorusActivate = new CheckboxWidget(_tabWidget, "FluidSynthSettings_Chorus.EnableTabCheckbox", _("Active"), nullptr, kActivateChorusCmd);
+	_chorusActivate = new CheckboxWidget(_tabWidget, "FluidSynthSettings_Chorus.EnableTabCheckbox", _("Active"), Common::U32String(""), kActivateChorusCmd);
 
 	_chorusVoiceCountDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountText", _("N:"));
-	_chorusVoiceCountSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountSlider", nullptr, kChorusVoiceCountChangedCmd);
+	_chorusVoiceCountSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountSlider", Common::U32String(""), kChorusVoiceCountChangedCmd);
 	// 0-99, Default: 3
 	_chorusVoiceCountSlider->setMinValue(0);
 	_chorusVoiceCountSlider->setMaxValue(99);
 	_chorusVoiceCountLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountLabel", "3");
 
 	_chorusLevelDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelText", _("Level:"));
-	_chorusLevelSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelSlider", nullptr, kChorusLevelChangedCmd);
+	_chorusLevelSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelSlider", Common::U32String(""), kChorusLevelChangedCmd);
 	// 0.00 - 1.00, Default: 1.00
 	_chorusLevelSlider->setMinValue(0);
 	_chorusLevelSlider->setMaxValue(100);
 	_chorusLevelLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelLabel", "100");
 
 	_chorusSpeedDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedText", _("Speed:"));
-	_chorusSpeedSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedSlider", nullptr, kChorusSpeedChangedCmd);
+	_chorusSpeedSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedSlider", Common::U32String(""), kChorusSpeedChangedCmd);
 	// 0.30 - 5.00, Default: 0.30
 	_chorusSpeedSlider->setMinValue(30);
 	_chorusSpeedSlider->setMaxValue(500);
 	_chorusSpeedLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedLabel", "30");
 
 	_chorusDepthDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthText", _("Depth:"));
-	_chorusDepthSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthSlider", nullptr, kChorusDepthChangedCmd);
+	_chorusDepthSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthSlider", Common::U32String(""), kChorusDepthChangedCmd);
 	// 0.00 - 21.00, Default: 8.00
 	_chorusDepthSlider->setMinValue(0);
 	_chorusDepthSlider->setMaxValue(210);
@@ -150,8 +150,8 @@ FluidSynthSettingsDialog::FluidSynthSettingsDialog()
 
 	new ButtonWidget(this, "FluidSynthSettings.ResetSettings", _("Reset"), _("Reset all FluidSynth settings to their default values."), kResetSettingsCmd);
 
-	new ButtonWidget(this, "FluidSynthSettings.Cancel", _("Cancel"), nullptr, kCloseCmd);
-	new ButtonWidget(this, "FluidSynthSettings.Ok", _("OK"), nullptr, kOKCmd);
+	new ButtonWidget(this, "FluidSynthSettings.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "FluidSynthSettings.Ok", _("OK"), Common::U32String(""), kOKCmd);
 }
 
 FluidSynthSettingsDialog::~FluidSynthSettingsDialog() {
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 64f57f015f..11bbe0f660 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -137,14 +137,14 @@ void LauncherDialog::build() {
 	new StaticTextWidget(this, "Launcher.Version", gScummVMFullVersion);
 #endif
 	if (!g_system->hasFeature(OSystem::kFeatureNoQuit))
-		new ButtonWidget(this, "Launcher.QuitButton", Common::convertToU32String(_("~Q~uit")), _("Quit ScummVM"), kQuitCmd);
-	new ButtonWidget(this, "Launcher.AboutButton", Common::convertToU32String(_("A~b~out...")), _("About ScummVM"), kAboutCmd);
-	new ButtonWidget(this, "Launcher.OptionsButton", Common::convertToU32String(_("~O~ptions...")), _("Change global ScummVM options"), kOptionsCmd);
+		new ButtonWidget(this, "Launcher.QuitButton", (_("~Q~uit")), _("Quit ScummVM"), kQuitCmd);
+	new ButtonWidget(this, "Launcher.AboutButton", (_("A~b~out...")), _("About ScummVM"), kAboutCmd);
+	new ButtonWidget(this, "Launcher.OptionsButton", (_("~O~ptions...")), _("Change global ScummVM options"), kOptionsCmd);
 	_startButton =
-		new ButtonWidget(this, "Launcher.StartButton", Common::convertToU32String(_("~S~tart")), _("Start selected game"), kStartCmd);
+		new ButtonWidget(this, "Launcher.StartButton", (_("~S~tart")), _("Start selected game"), kStartCmd);
 
 	DropdownButtonWidget *loadButton =
-	        new DropdownButtonWidget(this, "Launcher.LoadGameButton", Common::convertToU32String(_("~L~oad...")), _("Load saved game for selected game"), kLoadGameCmd);
+	        new DropdownButtonWidget(this, "Launcher.LoadGameButton", (_("~L~oad...")), _("Load saved game for selected game"), kLoadGameCmd);
 #ifdef ENABLE_EVENTRECORDER
 	loadButton->appendEntry(_("Record..."), kRecordGameCmd);
 #endif
@@ -153,24 +153,24 @@ void LauncherDialog::build() {
 	// Above the lowest button rows: two more buttons (directly below the list box)
 	if (g_system->getOverlayWidth() > 320) {
 		DropdownButtonWidget *addButton =
-			new DropdownButtonWidget(this, "Launcher.AddGameButton", Common::convertToU32String(_("~A~dd Game...")), _("Add games to the list"), kAddGameCmd);
-		addButton->appendEntry(Common::convertToU32String(_("Mass Add...")), kMassAddGameCmd);
+			new DropdownButtonWidget(this, "Launcher.AddGameButton", (_("~A~dd Game...")), _("Add games to the list"), kAddGameCmd);
+		addButton->appendEntry((_("Mass Add...")), kMassAddGameCmd);
 		_addButton = addButton;
 
 		_editButton =
-			new ButtonWidget(this, "Launcher.EditGameButton", Common::convertToU32String(_("~E~dit Game...")), _("Change game options"), kEditGameCmd);
+			new ButtonWidget(this, "Launcher.EditGameButton", (_("~E~dit Game...")), _("Change game options"), kEditGameCmd);
 		_removeButton =
-			new ButtonWidget(this, "Launcher.RemoveGameButton", Common::convertToU32String(_("~R~emove Game")), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
+			new ButtonWidget(this, "Launcher.RemoveGameButton", (_("~R~emove Game")), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
 	} else {
 		DropdownButtonWidget *addButton =
-			new DropdownButtonWidget(this, "Launcher.AddGameButton", Common::convertToU32String(_c("~A~dd Game...", "lowres")), _("Add games to the list"), kAddGameCmd);
-		addButton->appendEntry(Common::convertToU32String(_c("Mass Add...", "lowres")), kMassAddGameCmd);
+			new DropdownButtonWidget(this, "Launcher.AddGameButton", (_c("~A~dd Game...", "lowres")), _("Add games to the list"), kAddGameCmd);
+		addButton->appendEntry((_c("Mass Add...", "lowres")), kMassAddGameCmd);
 		_addButton = addButton;
 
 		_editButton =
-		new ButtonWidget(this, "Launcher.EditGameButton", Common::convertToU32String(_c("~E~dit Game...", "lowres")), _("Change game options"), kEditGameCmd);
+		new ButtonWidget(this, "Launcher.EditGameButton", (_c("~E~dit Game...", "lowres")), _("Change game options"), kEditGameCmd);
 		_removeButton =
-		new ButtonWidget(this, "Launcher.RemoveGameButton", Common::convertToU32String(_c("~R~emove Game", "lowres")), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
+		new ButtonWidget(this, "Launcher.RemoveGameButton", (_c("~R~emove Game", "lowres")), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
 	}
 
 	// Search box
@@ -182,13 +182,13 @@ void LauncherDialog::build() {
 		_searchPic->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageSearch));
 	} else
 #endif
-		_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", Common::convertToU32String(_("Search:")));
+		_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", (_("Search:")));
 
-	_searchWidget = new EditTextWidget(this, "Launcher.Search", _search, nullptr, kSearchCmd);
+	_searchWidget = new EditTextWidget(this, "Launcher.Search", _search, Common::U32String(""), kSearchCmd);
 	_searchClearButton = addClearButton(this, "Launcher.SearchClearButton", kSearchClearCmd);
 
 	// Add list with game titles
-	_list = new ListWidget(this, "Launcher.GameList", nullptr, kListSearchCmd);
+	_list = new ListWidget(this, "Launcher.GameList", Common::U32String(""), kListSearchCmd);
 	_list->setEditable(false);
 	_list->enableDictionarySelect(true);
 	_list->setNumberingMode(kListNumberingOff);
@@ -204,10 +204,10 @@ void LauncherDialog::build() {
 	updateButtons();
 
 	// Create file browser dialog
-	_browser = new BrowserDialog(Common::convertToU32String(_("Select directory with game data")), true);
+	_browser = new BrowserDialog((_("Select directory with game data")), true);
 
 	// Create Load dialog
-	_loadDialog = new SaveLoadChooser(Common::convertToU32String(_("Load game:")), Common::convertToU32String(_("Load")), false);
+	_loadDialog = new SaveLoadChooser((_("Load game:")), (_("Load")), false);
 }
 
 void LauncherDialog::clean() {
@@ -564,10 +564,10 @@ bool LauncherDialog::doGameDetection(const Common::String &path) {
 		// Display the candidates to the user and let her/him pick one
 		U32StringArray list;
 		for (idx = 0; idx < (int)candidates.size(); idx++) {
-			Common::String description = candidates[idx].description;
+			Common::U32String description = candidates[idx].description;
 
 			if (candidates[idx].hasUnknownFiles) {
-				description += " - ";
+				description += Common::U32String(" - ");
 				description += _("Unknown variant");
 			}
 
@@ -753,7 +753,7 @@ void LauncherDialog::reflowLayout() {
 		}
 	} else {
 		if (!_searchDesc)
-			_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", Common::convertToU32String(_("Search:")));
+			_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", (_("Search:")));
 
 		if (_searchPic) {
 			removeWidget(_searchPic);
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index f773186a02..e27935c308 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -73,10 +73,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
 	// new StaticTextWidget(this, "massadddialog_caption", "Mass Add Dialog");
 
 	_dirProgressText = new StaticTextWidget(this, "MassAdd.DirProgressText",
-											Common::convertToU32String(_("... progress ...")));
+											(_("... progress ...")));
 
 	_gameProgressText = new StaticTextWidget(this, "MassAdd.GameProgressText",
-											Common::convertToU32String(_("... progress ...")));
+											(_("... progress ...")));
 
 	_dirProgressText->setAlign(Graphics::kTextAlignCenter);
 	_gameProgressText->setAlign(Graphics::kTextAlignCenter);
@@ -86,10 +86,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
 	_list->setNumberingMode(kListNumberingOff);
 	_list->setList(l);
 
-	_okButton = new ButtonWidget(this, "MassAdd.Ok", Common::convertToU32String("Ok"), nullptr, kOkCmd, Common::ASCII_RETURN);
+	_okButton = new ButtonWidget(this, "MassAdd.Ok", Common::convertToU32String("Ok"), Common::U32String(""), kOkCmd, Common::ASCII_RETURN);
 	_okButton->setEnabled(false);
 
-	new ButtonWidget(this, "MassAdd.Cancel", Common::convertToU32String("Cancel"), nullptr, kCancelCmd, Common::ASCII_ESCAPE);
+	new ButtonWidget(this, "MassAdd.Cancel", Common::convertToU32String("Cancel"), Common::U32String(""), kCancelCmd, Common::ASCII_ESCAPE);
 
 	// Build a map from all configured game paths to the targets using them
 	const Common::ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
@@ -257,7 +257,7 @@ void MassAddDialog::handleTickle() {
 
 
 	// Update the dialog
-	Common::String buf;
+	Common::U32String buf;
 
 	if (_scanStack.empty()) {
 		// Enable the OK button
@@ -266,14 +266,14 @@ void MassAddDialog::handleTickle() {
 		buf = _("Scan complete!");
 		_dirProgressText->setLabel(buf);
 
-		buf = Common::String::format(_("Discovered %d new games, ignored %d previously added games."), _games.size(), _oldGamesCount);
+		buf = Common::String::format(Common::convertFromU32String(_("Discovered %d new games, ignored %d previously added games.")).c_str(), _games.size(), _oldGamesCount);
 		_gameProgressText->setLabel(buf);
 
 	} else {
-		buf = Common::String::format(_("Scanned %d directories ..."), _dirsScanned);
+		buf = Common::String::format(Common::convertFromU32String(_("Scanned %d directories ...")).c_str(), _dirsScanned);
 		_dirProgressText->setLabel(buf);
 
-		buf = Common::String::format(_("Discovered %d new games, ignored %d previously added games ..."), _games.size(), _oldGamesCount);
+		buf = Common::String::format(Common::convertFromU32String(_("Discovered %d new games, ignored %d previously added games ...")).c_str(), _games.size(), _oldGamesCount);
 		_gameProgressText->setLabel(buf);
 	}
 
diff --git a/gui/message.cpp b/gui/message.cpp
index 8bf6e06e9f..8981c71279 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -39,7 +39,7 @@ enum {
 
 // TODO: The default button should be visibly distinct from the alternate button
 
-MessageDialog::MessageDialog(const Common::String &message, const char *defaultButton, const char *altButton, Graphics::TextAlign alignment, const char *url)
+MessageDialog::MessageDialog(const Common::U32String &message, Common::U32String defaultButton, Common::U32String altButton, Graphics::TextAlign alignment, const char *url)
 	: Dialog(30, 20, 260, 124) {
 
 	_url = url;
@@ -54,12 +54,12 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB
 	// down the string into lines, and taking the maximum of their widths.
 	// Using this, and accounting for the space the button(s) need, we can set
 	// the real size of the dialog
-	Common::Array<Common::String> lines;
+	Common::Array<Common::U32String> lines;
 	int lineCount, okButtonPos, cancelButtonPos;
 	int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines);
 
 	// Calculate the desired dialog size (maxing out at 300*180 for now)
-	if (altButton)
+	if (!altButton.empty())
 		_w = MAX(maxlineWidth, (2 * buttonWidth) + 10) + 20;
 	else
 		_w = MAX(maxlineWidth, buttonWidth) + 20;
@@ -67,7 +67,7 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB
 	lineCount = lines.size();
 
 	_h = 16;
-	if (defaultButton || altButton)
+	if (!defaultButton.empty() || !altButton.empty())
 		_h += buttonHeight + 8;
 
 	// Limit the number of lines so that the dialog still fits on the screen.
@@ -86,18 +86,18 @@ MessageDialog::MessageDialog(const Common::String &message, const char *defaultB
 								lines[i], alignment);
 	}
 
-	if (defaultButton && altButton) {
+	if (!defaultButton.empty() && !altButton.empty()) {
 		okButtonPos = (_w - (buttonWidth * 2)) / 2;
 		cancelButtonPos = ((_w - (buttonWidth * 2)) / 2) + buttonWidth + 10;
 	} else {
 		okButtonPos = cancelButtonPos = (_w - buttonWidth) / 2;
 	}
 
-	if (defaultButton)
-		new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, Common::convertToU32String(defaultButton), nullptr, kOkCmd, Common::ASCII_RETURN);	// Confirm dialog
+	if (!defaultButton.empty())
+		new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, defaultButton, Common::U32String(""), kOkCmd, Common::ASCII_RETURN);	// Confirm dialog
 
-	if (altButton)
-		new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, Common::convertToU32String(altButton), nullptr, kCancelCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+	if (!altButton.empty())
+		new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, altButton, Common::U32String(""), kCancelCmd, Common::ASCII_ESCAPE);	// Cancel dialog
 }
 
 void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
@@ -120,8 +120,8 @@ void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
 	}
 }
 
-TimedMessageDialog::TimedMessageDialog(const Common::String &message, uint32 duration)
-	: MessageDialog(message, nullptr, nullptr) {
+TimedMessageDialog::TimedMessageDialog(const Common::U32String &message, uint32 duration)
+	: MessageDialog(message, Common::U32String(""), Common::U32String("")) {
 	_timer = g_system->getMillis() + duration;
 }
 
diff --git a/gui/message.h b/gui/message.h
index 327445e5f2..49a11c90b6 100644
--- a/gui/message.h
+++ b/gui/message.h
@@ -41,7 +41,7 @@ enum {
  */
 class MessageDialog : public Dialog {
 public:
-	MessageDialog(const Common::String &message, const char *defaultButton = "OK", const char *altButton = nullptr, Graphics::TextAlign alignment = Graphics::kTextAlignCenter, const char *url = nullptr);
+	MessageDialog(const Common::U32String &message, Common::U32String defaultButton = Common::U32String("OK"), Common::U32String altButton = Common::U32String(""), Graphics::TextAlign alignment = Graphics::kTextAlignCenter, const char *url = nullptr);
 
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
@@ -54,7 +54,7 @@ private:
  */
 class TimedMessageDialog : public MessageDialog {
 public:
-	TimedMessageDialog(const Common::String &message, uint32 duration);
+	TimedMessageDialog(const Common::U32String &message, uint32 duration);
 
 	void handleTickle() override;
 
diff --git a/gui/onscreendialog.cpp b/gui/onscreendialog.cpp
index 4504521fa2..64a4f3c5e3 100644
--- a/gui/onscreendialog.cpp
+++ b/gui/onscreendialog.cpp
@@ -63,7 +63,7 @@ OnScreenDialog::OnScreenDialog(bool isRecord) : Dialog("OnScreenDialog") {
 #ifndef DISABLE_FANCY_THEMES
 	if (g_gui.xmlEval()->getVar("Globals.OnScreenDialog.ShowPics") == 1 && g_gui.theme()->supportsImages()) {
 		GUI::PicButtonWidget *button;
-		button = new PicButtonWidget(this, "OnScreenDialog.StopButton", nullptr, kStopCmd, 0);
+		button = new PicButtonWidget(this, "OnScreenDialog.StopButton", Common::U32String(""), kStopCmd, 0);
 		button->useThemeTransparency(true);
 
 		if (g_system->getOverlayWidth() > 320)
@@ -72,7 +72,7 @@ OnScreenDialog::OnScreenDialog(bool isRecord) : Dialog("OnScreenDialog") {
 			button->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageStopSmallButton));
 
 		if (isRecord) {
-			button = new PicButtonWidget(this, "OnScreenDialog.EditButton", nullptr, kEditCmd, 0);
+			button = new PicButtonWidget(this, "OnScreenDialog.EditButton", Common::U32String(""), kEditCmd, 0);
 			button->useThemeTransparency(true);
 
 			if (g_system->getOverlayWidth() > 320)
@@ -80,14 +80,14 @@ OnScreenDialog::OnScreenDialog(bool isRecord) : Dialog("OnScreenDialog") {
 			else
 				button->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageEditSmallButton));
 		} else {
-			button = new PicButtonWidget(this, "OnScreenDialog.SwitchModeButton", nullptr, kSwitchModeCmd, 0);
+			button = new PicButtonWidget(this, "OnScreenDialog.SwitchModeButton", Common::U32String(""), kSwitchModeCmd, 0);
 			button->useThemeTransparency(true);
 			if (g_system->getOverlayWidth() > 320)
 				button->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageSwitchModeButton));
 			else
 				button->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageSwitchModeSmallButton));
 
-			button = new PicButtonWidget(this, "OnScreenDialog.FastReplayButton", nullptr, kFastModeCmd, 0);
+			button = new PicButtonWidget(this, "OnScreenDialog.FastReplayButton", Common::U32String(""), kFastModeCmd, 0);
 			button->useThemeTransparency(true);
 			if (g_system->getOverlayWidth() > 320)
 				button->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageFastReplayButton));
diff --git a/gui/options.cpp b/gui/options.cpp
index 351c181c37..f654c984bd 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -129,11 +129,11 @@ enum {
 	kApplyCmd = 'appl'
 };
 
-static const char *savePeriodLabels[] = { _s("Never"), _s("Every 5 mins"), _s("Every 10 mins"), _s("Every 15 mins"), _s("Every 30 mins"), nullptr };
+static const char *savePeriodLabels[] = { _s("Never"), _s("Every 5 mins"), _s("Every 10 mins"), _s("Every 15 mins"), _s("Every 30 mins"), "" };
 static const int savePeriodValues[] = { 0, 5 * 60, 10 * 60, 15 * 60, 30 * 60, -1 };
 // The keyboard mouse speed values range from 0 to 7 and correspond to speeds shown in the label
 // "10" (value 3) is the default speed corresponding to the speed before introduction of this control
-static const char *kbdMouseSpeedLabels[] = { "3", "5", "8", "10", "13", "15", "18", "20", nullptr };
+static const char *kbdMouseSpeedLabels[] = { "3", "5", "8", "10", "13", "15", "18", "20", "" };
 
 OptionsDialog::OptionsDialog(const Common::String &domain, int x, int y, int w, int h)
 	: Dialog(x, y, w, h), _domain(domain), _graphicsTabId(-1), _midiTabId(-1), _pathsTabId(-1), _tabWidget(nullptr) {
@@ -261,7 +261,7 @@ void OptionsDialog::build() {
 		int value = ConfMan.getInt("kbdmouse_speed", _domain);
 		if (_kbdMouseSpeedSlider && value < ARRAYSIZE(kbdMouseSpeedLabels) - 1 && value >= 0) {
 			_kbdMouseSpeedSlider->setValue(value);
-			_kbdMouseSpeedLabel->setLabel(Common::convertToU32String(_(kbdMouseSpeedLabels[value])));
+			_kbdMouseSpeedLabel->setLabel((_(kbdMouseSpeedLabels[value])));
 		}
 	}
 	if (g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
@@ -392,7 +392,7 @@ void OptionsDialog::build() {
 
 		Common::String soundFont(ConfMan.get("soundfont", _domain));
 		if (soundFont.empty() || !ConfMan.hasKey("soundfont", _domain)) {
-			_soundFont->setLabel(Common::convertToU32String(_c("None", "soundfont")));
+			_soundFont->setLabel((_c("None", "soundfont")));
 			_soundFontClearButton->setEnabled(false);
 		} else {
 			_soundFont->setLabel(soundFont);
@@ -610,7 +610,7 @@ void OptionsDialog::apply() {
 
 		if (gfxError != OSystem::kTransactionSuccess) {
 			// Revert ConfMan to what OSystem is using.
-			Common::String message = _("Failed to apply some of the graphic options changes:");
+			Common::U32String message = _("Failed to apply some of the graphic options changes:");
 
 			if (gfxError & OSystem::kTransactionModeSwitchFailed) {
 				const OSystem::GraphicsMode *gm = g_system->getSupportedGraphicsModes();
@@ -621,7 +621,7 @@ void OptionsDialog::apply() {
 					}
 					gm++;
 				}
-				message += "\n";
+				message += Common::U32String("\n");
 				message += _("the video mode could not be changed");
 			}
 
@@ -634,25 +634,25 @@ void OptionsDialog::apply() {
 					}
 					sm++;
 				}
-				message += "\n";
+				message += Common::U32String("\n");
 				message += _("the stretch mode could not be changed");
 			}
 
 			if (gfxError & OSystem::kTransactionAspectRatioFailed) {
 				ConfMan.setBool("aspect_ratio", g_system->getFeatureState(OSystem::kFeatureAspectRatioCorrection), _domain);
-				message += "\n";
+				message += Common::U32String("\n");
 				message += _("the aspect ratio setting could not be changed");
 			}
 
 			if (gfxError & OSystem::kTransactionFullscreenFailed) {
 				ConfMan.setBool("fullscreen", g_system->getFeatureState(OSystem::kFeatureFullscreenMode), _domain);
-				message += "\n";
+				message += Common::U32String("\n");
 				message += _("the fullscreen setting could not be changed");
 			}
 
 			if (gfxError & OSystem::kTransactionFilteringFailed) {
 				ConfMan.setBool("filtering", g_system->getFeatureState(OSystem::kFeatureFilteringMode), _domain);
-				message += "\n";
+				message += Common::U32String("\n");
 				message += _("the filtering setting could not be changed");
 			}
 
@@ -745,7 +745,7 @@ void OptionsDialog::apply() {
 			ConfMan.setInt("midi_gain", _midiGainSlider->getValue(), _domain);
 
 			Common::String soundFont(Common::convertFromU32String(_soundFont->getLabel()));
-			if (!soundFont.empty() && (soundFont != _c("None", "soundfont")))
+			if (!soundFont.empty() && (soundFont != Common::convertFromU32String(_c("None", "soundfont"))))
 				ConfMan.set("soundfont", soundFont, _domain);
 			else
 				ConfMan.removeKey("soundfont", _domain);
@@ -883,12 +883,12 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
 		_subSpeedLabel->markAsDirty();
 		break;
 	case kClearSoundFontCmd:
-		_soundFont->setLabel(Common::convertToU32String(_c("None", "soundfont")));
+		_soundFont->setLabel((_c("None", "soundfont")));
 		_soundFontClearButton->setEnabled(false);
 		g_gui.scheduleTopDialogRedraw();
 		break;
 	case kKbdMouseSpeedChanged:
-		_kbdMouseSpeedLabel->setLabel(Common::convertToU32String(_(kbdMouseSpeedLabels[_kbdMouseSpeedSlider->getValue()])));
+		_kbdMouseSpeedLabel->setLabel((_(kbdMouseSpeedLabels[_kbdMouseSpeedSlider->getValue()])));
 		_kbdMouseSpeedLabel->markAsDirty();
 		break;
 	case kJoystickDeadzoneChanged:
@@ -1068,22 +1068,22 @@ void OptionsDialog::setSubtitleSettingsState(bool enabled) {
 void OptionsDialog::addControlControls(GuiObject *boss, const Common::String &prefix) {
 	// Show On-Screen control
 	if (g_system->hasFeature(OSystem::kFeatureOnScreenControl))
-		_onscreenCheckbox = new CheckboxWidget(boss, prefix + "grOnScreenCheckbox", Common::convertToU32String(_("Show On-screen control")));
+		_onscreenCheckbox = new CheckboxWidget(boss, prefix + "grOnScreenCheckbox", (_("Show On-screen control")));
 
 	// Touchpad Mouse mode
 	if (g_system->hasFeature(OSystem::kFeatureTouchpadMode))
-		_touchpadCheckbox = new CheckboxWidget(boss, prefix + "grTouchpadCheckbox", Common::convertToU32String(_("Touchpad mouse mode")));
+		_touchpadCheckbox = new CheckboxWidget(boss, prefix + "grTouchpadCheckbox", _("Touchpad mouse mode"));
 
 	// Swap menu and back buttons
 	if (g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons))
-		_swapMenuAndBackBtnsCheckbox = new CheckboxWidget(boss, prefix + "grSwapMenuAndBackBtnsCheckbox", Common::convertToU32String(_("Swap Menu and Back buttons")));
+		_swapMenuAndBackBtnsCheckbox = new CheckboxWidget(boss, prefix + "grSwapMenuAndBackBtnsCheckbox", (_("Swap Menu and Back buttons")));
 
 	// Keyboard and joystick mouse speed
 	if (g_system->hasFeature(OSystem::kFeatureKbdMouseSpeed)) {
 		if (g_system->getOverlayWidth() > 320)
-			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", Common::convertToU32String(_("Pointer Speed:")), _("Speed for keyboard/joystick mouse pointer control"));
+			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", (_("Pointer Speed:")), _("Speed for keyboard/joystick mouse pointer control"));
 		else
-			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", Common::convertToU32String(_c("Pointer Speed:", "lowres")), _("Speed for keyboard/joystick mouse pointer control"));
+			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", (_c("Pointer Speed:", "lowres")), _("Speed for keyboard/joystick mouse pointer control"));
 		_kbdMouseSpeedSlider = new SliderWidget(boss, prefix + "grKbdMouseSpeedSlider", _("Speed for keyboard/joystick mouse pointer control"), kKbdMouseSpeedChanged);
 		_kbdMouseSpeedLabel = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedLabel", Common::convertToU32String("  "));
 		_kbdMouseSpeedSlider->setMinValue(0);
@@ -1094,9 +1094,9 @@ void OptionsDialog::addControlControls(GuiObject *boss, const Common::String &pr
 	// Joystick deadzone
 	if (g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
 		if (g_system->getOverlayWidth() > 320)
-			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", Common::convertToU32String(_("Joy Deadzone:")), _("Analog joystick Deadzone"));
+			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", (_("Joy Deadzone:")), _("Analog joystick Deadzone"));
 		else
-			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", Common::convertToU32String(_c("Joy Deadzone:", "lowres")), _("Analog joystick Deadzone"));
+			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", (_c("Joy Deadzone:", "lowres")), _("Analog joystick Deadzone"));
 		_joystickDeadzoneSlider = new SliderWidget(boss, prefix + "grJoystickDeadzoneSlider", _("Analog joystick Deadzone"), kJoystickDeadzoneChanged);
 		_joystickDeadzoneLabel = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneLabel", Common::convertToU32String("  "));
 		_joystickDeadzoneSlider->setMinValue(1);
@@ -1161,7 +1161,7 @@ void OptionsDialog::addAchievementsControls(GuiObject *boss, const Common::Strin
 			yPos += yStep;
 
 	        if (info.descriptions[idx].comment && strlen(info.descriptions[idx].comment) > 0) {
-				new StaticTextWidget(scrollContainer, lineHeight + descrDelta, yPos, width - descrDelta, yStep, Common::convertToU32String(info.descriptions[idx].comment), Graphics::kTextAlignStart, "", ThemeEngine::kFontStyleNormal);
+				new StaticTextWidget(scrollContainer, lineHeight + descrDelta, yPos, width - descrDelta, yStep, Common::convertToU32String(info.descriptions[idx].comment), Graphics::kTextAlignStart, Common::U32String(""), ThemeEngine::kFontStyleNormal);
 				yPos += yStep;
 			}
 
@@ -1170,13 +1170,13 @@ void OptionsDialog::addAchievementsControls(GuiObject *boss, const Common::Strin
 	}
 
 	if (nHidden) {
-		Common::String hiddenStr = Common::String::format(_("%d hidden achievements remaining"), nHidden);
+		Common::String hiddenStr = Common::String::format(Common::convertFromU32String(_("%d hidden achievements remaining")).c_str(), nHidden);
 		new StaticTextWidget(scrollContainer, lineHeight, yPos, width, yStep, Common::convertToU32String(hiddenStr.c_str()), Graphics::kTextAlignStart);
 	}
 
 	if (nMax) {
-		Common::String totalStr = Common::String::format(_("Achievements unlocked: %d/%d"), nAchieved, nMax);
-		new StaticTextWidget(scrollContainer, lineHeight, lineHeight, width, yStep, Common::convertToU32String(totalStr.c_str()), Graphics::kTextAlignStart);
+		Common::U32String totalStr = Common::String::format(Common::convertFromU32String(_("Achievements unlocked: %d/%d")).c_str(), nAchieved, nMax);
+		new StaticTextWidget(scrollContainer, lineHeight, lineHeight, width, yStep, totalStr, Graphics::kTextAlignStart);
 
 		SliderWidget *progressBar;
 		progressBar = new SliderWidget(scrollContainer, lineHeight, lineHeight*2, progressBarWidth, lineHeight);
@@ -1194,13 +1194,13 @@ void OptionsDialog::addShaderControls(GuiObject *boss, const Common::String &pre
 
 	// Shader selector
 	if (g_system->getOverlayWidth() > 320)
-		_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", Common::convertToU32String(_("HW Shader:")), _("Different hardware shaders give different visual effects"));
+		_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", (_("HW Shader:")), _("Different hardware shaders give different visual effects"));
 	else
-		_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", Common::convertToU32String(_c("HW Shader:", "lowres")), _("Different hardware shaders give different visual effects"));
+		_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", (_c("HW Shader:", "lowres")), _("Different hardware shaders give different visual effects"));
 	_shaderPopUp = new PopUpWidget(boss, prefix + "grShaderPopUp", _("Different shaders give different visual effects"));
 	const OSystem::GraphicsMode *p = g_system->getSupportedShaders();
 
-	_shaderPopUp->appendEntry(Common::convertToU32String(_("<default>")));
+	_shaderPopUp->appendEntry((_("<default>")));
 	_shaderPopUp->appendEntry(Common::convertToU32String(""));
 	while (p->name) {
 		_shaderPopUp->appendEntry(_c(p->description, context), p->id);
@@ -1217,10 +1217,10 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 		context = "lowres";
 
 	// The GFX mode popup
-	_gfxPopUpDesc = new StaticTextWidget(boss, prefix + "grModePopupDesc", Common::convertToU32String(_("Graphics mode:")));
+	_gfxPopUpDesc = new StaticTextWidget(boss, prefix + "grModePopupDesc", (_("Graphics mode:")));
 	_gfxPopUp = new PopUpWidget(boss, prefix + "grModePopup");
 
-	_gfxPopUp->appendEntry(Common::convertToU32String(_("<default>")));
+	_gfxPopUp->appendEntry((_("<default>")));
 	_gfxPopUp->appendEntry(Common::convertToU32String(""));
 	while (gm->name) {
 		_gfxPopUp->appendEntry(_c(gm->description, context), gm->id);
@@ -1231,9 +1231,9 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 	const Common::String allFlags = Common::allRenderModesGUIOs();
 	bool renderingTypeDefined = (strpbrk(_guioptions.c_str(), allFlags.c_str()) != nullptr);
 
-	_renderModePopUpDesc = new StaticTextWidget(boss, prefix + "grRenderPopupDesc", Common::convertToU32String(_("Render mode:")), _("Special dithering modes supported by some games"));
+	_renderModePopUpDesc = new StaticTextWidget(boss, prefix + "grRenderPopupDesc", (_("Render mode:")), _("Special dithering modes supported by some games"));
 	_renderModePopUp = new PopUpWidget(boss, prefix + "grRenderPopup", _("Special dithering modes supported by some games"));
-	_renderModePopUp->appendEntry(Common::convertToU32String(_("<default>")), Common::kRenderDefault);
+	_renderModePopUp->appendEntry((_("<default>")), Common::kRenderDefault);
 	_renderModePopUp->appendEntry(Common::convertToU32String(""));
 	const Common::RenderModeDescription *rm = Common::g_renderModes;
 	for (; rm->code; ++rm) {
@@ -1244,10 +1244,10 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 
 	// The Stretch mode popup
 	const OSystem::GraphicsMode *sm = g_system->getSupportedStretchModes();
-	_stretchPopUpDesc = new StaticTextWidget(boss, prefix + "grStretchModePopupDesc", Common::convertToU32String(_("Stretch mode:")));
+	_stretchPopUpDesc = new StaticTextWidget(boss, prefix + "grStretchModePopupDesc", (_("Stretch mode:")));
 	_stretchPopUp = new PopUpWidget(boss, prefix + "grStretchModePopup");
 
-	_stretchPopUp->appendEntry(Common::convertToU32String(_("<default>")));
+	_stretchPopUp->appendEntry((_("<default>")));
 	_stretchPopUp->appendEntry(Common::convertToU32String(""));
 	while (sm->name) {
 		_stretchPopUp->appendEntry(_c(sm->description, context), sm->id);
@@ -1255,13 +1255,13 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 	}
 
 	// Fullscreen checkbox
-	_fullscreenCheckbox = new CheckboxWidget(boss, prefix + "grFullscreenCheckbox", Common::convertToU32String(_("Fullscreen mode")));
+	_fullscreenCheckbox = new CheckboxWidget(boss, prefix + "grFullscreenCheckbox", (_("Fullscreen mode")));
 
 	// Filtering checkbox
-	_filteringCheckbox = new CheckboxWidget(boss, prefix + "grFilteringCheckbox", Common::convertToU32String(_("Filter graphics")), _("Use linear filtering when scaling graphics"));
+	_filteringCheckbox = new CheckboxWidget(boss, prefix + "grFilteringCheckbox", (_("Filter graphics")), _("Use linear filtering when scaling graphics"));
 
 	// Aspect ratio checkbox
-	_aspectCheckbox = new CheckboxWidget(boss, prefix + "grAspectCheckbox", Common::convertToU32String(_("Aspect ratio correction")), _("Correct aspect ratio for 320x200 games"));
+	_aspectCheckbox = new CheckboxWidget(boss, prefix + "grAspectCheckbox", (_("Aspect ratio correction")), _("Correct aspect ratio for 320x200 games"));
 
 	_enableGraphicSettings = true;
 }
@@ -1269,9 +1269,9 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &prefix) {
 	// The MIDI mode popup & a label
 	if (g_system->getOverlayWidth() > 320)
-		_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? Common::convertToU32String(_("Preferred device:")) : Common::convertToU32String(_("Music device:")), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
+		_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? (_("Preferred device:")) : (_("Music device:")), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
 	else
-		_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? Common::convertToU32String(_c("Preferred dev.:", "lowres")) : Common::convertToU32String(_c("Music device:", "lowres")), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
+		_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? (_c("Preferred dev.:", "lowres")) : (_c("Music device:", "lowres")), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
 	_midiPopUp = new PopUpWidget(boss, prefix + "auMidiPopup", _("Specifies output sound device or sound card emulator"));
 
 	// Populate it
@@ -1298,13 +1298,13 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref
 	}
 
 	// The OPL emulator popup & a label
-	_oplPopUpDesc = new StaticTextWidget(boss, prefix + "auOPLPopupDesc", Common::convertToU32String(_("AdLib emulator:")), _("AdLib is used for music in many games"));
+	_oplPopUpDesc = new StaticTextWidget(boss, prefix + "auOPLPopupDesc", (_("AdLib emulator:")), _("AdLib is used for music in many games"));
 	_oplPopUp = new PopUpWidget(boss, prefix + "auOPLPopup", _("AdLib is used for music in many games"));
 
 	// Populate it
 	const OPL::Config::EmulatorDescription *ed = OPL::Config::getAvailable();
 	while (ed->name) {
-		_oplPopUp->appendEntry(Common::convertToU32String(_(ed->description)), ed->id);
+		_oplPopUp->appendEntry((_(ed->description)), ed->id);
 		++ed;
 	}
 
@@ -1312,7 +1312,7 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref
 }
 
 void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefix) {
-	_gmDevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefGmPopupDesc", Common::convertToU32String(_("GM device:")), _("Specifies default sound device for General MIDI output"));
+	_gmDevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefGmPopupDesc", (_("GM device:")), _("Specifies default sound device for General MIDI output"));
 	_gmDevicePopUp = new PopUpWidget(boss, prefix + "auPrefGmPopup");
 
 	// Populate
@@ -1323,7 +1323,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 		MusicDevices i = (*m)->get<MusicPluginObject>().getDevices();
 		for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
 			if (d->getMusicDriverId() == "null")
-				_gmDevicePopUp->appendEntry(Common::convertToU32String(_("Don't use General MIDI music")), d->getHandle());
+				_gmDevicePopUp->appendEntry((_("Don't use General MIDI music")), d->getHandle());
 		}
 	}
 	// Now we add the other devices.
@@ -1334,7 +1334,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 				if (d->getMusicType() != MT_MT32)
 					_gmDevicePopUp->appendEntry(d->getCompleteName(), d->getHandle());
 			} else if (d->getMusicDriverId() == "auto") {
-				_gmDevicePopUp->appendEntry(Common::convertToU32String(_("Use first available device")), d->getHandle());
+				_gmDevicePopUp->appendEntry((_("Use first available device")), d->getHandle());
 			}
 		}
 	}
@@ -1346,19 +1346,19 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 
 	// SoundFont
 	if (g_system->getOverlayWidth() > 320)
-		_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", Common::convertToU32String(_("SoundFont:")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
+		_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", (_("SoundFont:")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
 	else
-		_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", Common::convertToU32String(_c("SoundFont:", "lowres")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
-	_soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", Common::convertToU32String(_c("None", "soundfont")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"));
+		_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", (_c("SoundFont:", "lowres")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
+	_soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", (_c("None", "soundfont")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"));
 
 	_soundFontClearButton = addClearButton(boss, prefix + "mcFontClearButton", kClearSoundFontCmd);
 
 	// Multi midi setting
-	_multiMidiCheckbox = new CheckboxWidget(boss, prefix + "mcMixedCheckbox", Common::convertToU32String(_("Mixed AdLib/MIDI mode")), _("Use both MIDI and AdLib sound generation"));
+	_multiMidiCheckbox = new CheckboxWidget(boss, prefix + "mcMixedCheckbox", (_("Mixed AdLib/MIDI mode")), _("Use both MIDI and AdLib sound generation"));
 
 	// MIDI gain setting (FluidSynth uses this)
-	_midiGainDesc = new StaticTextWidget(boss, prefix + "mcMidiGainText", Common::convertToU32String(_("MIDI gain:")));
-	_midiGainSlider = new SliderWidget(boss, prefix + "mcMidiGainSlider", nullptr, kMidiGainChanged);
+	_midiGainDesc = new StaticTextWidget(boss, prefix + "mcMidiGainText", (_("MIDI gain:")));
+	_midiGainSlider = new SliderWidget(boss, prefix + "mcMidiGainSlider", Common::U32String(""), kMidiGainChanged);
 	_midiGainSlider->setMinValue(0);
 	_midiGainSlider->setMaxValue(1000);
 	_midiGainLabel = new StaticTextWidget(boss, prefix + "mcMidiGainLabel", Common::convertToU32String("1.00"));
@@ -1367,17 +1367,17 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 }
 
 void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefix) {
-	_mt32DevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefMt32PopupDesc", Common::convertToU32String(_("MT-32 Device:")), _("Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"));
+	_mt32DevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefMt32PopupDesc", (_("MT-32 Device:")), _("Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"));
 	_mt32DevicePopUp = new PopUpWidget(boss, prefix + "auPrefMt32Popup");
 
 	// Native mt32 setting
 	if (g_system->getOverlayWidth() > 320)
-		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", Common::convertToU32String(_("True Roland MT-32 (disable GM emulation)")), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
+		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", (_("True Roland MT-32 (disable GM emulation)")), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
 	else
-		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", Common::convertToU32String(_c("True Roland MT-32 (no GM emulation)", "lowres")), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
+		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", (_c("True Roland MT-32 (no GM emulation)", "lowres")), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
 
 	// GS Extensions setting
-	_enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", Common::convertToU32String(_("Roland GS device (enable MT-32 mappings)")), _("Check if you want to enable patch mappings to emulate an MT-32 on a Roland GS device"));
+	_enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", (_("Roland GS device (enable MT-32 mappings)")), _("Check if you want to enable patch mappings to emulate an MT-32 on a Roland GS device"));
 
 	const PluginList p = MusicMan.getPlugins();
 	// Make sure the null device is the first one in the list to avoid undesired
@@ -1386,7 +1386,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
 		MusicDevices i = (*m)->get<MusicPluginObject>().getDevices();
 		for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
 			if (d->getMusicDriverId() == "null")
-				_mt32DevicePopUp->appendEntry(Common::convertToU32String(_("Don't use Roland MT-32 music")), d->getHandle());
+				_mt32DevicePopUp->appendEntry((_("Don't use Roland MT-32 music")), d->getHandle());
 		}
 	}
 	// Now we add the other devices.
@@ -1396,7 +1396,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
 			if (d->getMusicType() >= MT_GM)
 				_mt32DevicePopUp->appendEntry(d->getCompleteName(), d->getHandle());
 			else if (d->getMusicDriverId() == "auto")
-				_mt32DevicePopUp->appendEntry(Common::convertToU32String(_("Use first available device")), d->getHandle());
+				_mt32DevicePopUp->appendEntry((_("Use first available device")), d->getHandle());
 		}
 	}
 
@@ -1413,29 +1413,29 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
 void OptionsDialog::addSubtitleControls(GuiObject *boss, const Common::String &prefix, int maxSliderVal) {
 
 	if (g_system->getOverlayWidth() > 320) {
-		_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", Common::convertToU32String(_("Text and speech:")));
+		_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", (_("Text and speech:")));
 
 		_subToggleGroup = new RadiobuttonGroup(boss, kSubtitleToggle);
 
-		_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, Common::convertToU32String(_("Speech")));
-		_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, Common::convertToU32String(_("Subtitles")));
-		_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, Common::convertToU32String(_("Both")));
+		_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, (_("Speech")));
+		_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, (_("Subtitles")));
+		_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, (_("Both")));
 
-		_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", Common::convertToU32String(_("Subtitle speed:")));
+		_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", (_("Subtitle speed:")));
 	} else {
-		_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", Common::convertToU32String(_c("Text and speech:", "lowres")));
+		_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", (_c("Text and speech:", "lowres")));
 
 		_subToggleGroup = new RadiobuttonGroup(boss, kSubtitleToggle);
 
-		_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, Common::convertToU32String(_("Spch")), _("Speech"));
-		_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, Common::convertToU32String(_("Subs")), _("Subtitles"));
-		_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, Common::convertToU32String(_c("Both", "lowres")), _("Show subtitles and play speech"));
+		_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, (_("Spch")), _("Speech"));
+		_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, (_("Subs")), _("Subtitles"));
+		_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, (_c("Both", "lowres")), _("Show subtitles and play speech"));
 
-		_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", Common::convertToU32String(_c("Subtitle speed:", "lowres")));
+		_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", (_c("Subtitle speed:", "lowres")));
 	}
 
 	// Subtitle speed
-	_subSpeedSlider = new SliderWidget(boss, prefix + "subSubtitleSpeedSlider", nullptr, kSubtitleSpeedChanged);
+	_subSpeedSlider = new SliderWidget(boss, prefix + "subSubtitleSpeedSlider", Common::U32String(""), kSubtitleSpeedChanged);
 	_subSpeedLabel = new StaticTextWidget(boss, prefix + "subSubtitleSpeedLabel", Common::convertToU32String("100%"));
 	_subSpeedSlider->setMinValue(0); _subSpeedSlider->setMaxValue(maxSliderVal);
 	_subSpeedLabel->setFlags(WIDGET_CLEARBG);
@@ -1447,21 +1447,21 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
 
 	// Volume controllers
 	if (g_system->getOverlayWidth() > 320)
-		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", Common::convertToU32String(_("Music volume:")));
+		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", (_("Music volume:")));
 	else
-		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", Common::convertToU32String(_c("Music volume:", "lowres")));
-	_musicVolumeSlider = new SliderWidget(boss, prefix + "vcMusicSlider", nullptr, kMusicVolumeChanged);
+		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", _c("Music volume:", "lowres"));
+	_musicVolumeSlider = new SliderWidget(boss, prefix + "vcMusicSlider", Common::U32String(""), kMusicVolumeChanged);
 	_musicVolumeLabel = new StaticTextWidget(boss, prefix + "vcMusicLabel", Common::convertToU32String("100%"));
 	_musicVolumeSlider->setMinValue(0);
 	_musicVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
 	_musicVolumeLabel->setFlags(WIDGET_CLEARBG);
 
-	_muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", Common::convertToU32String(_("Mute all")), nullptr, kMuteAllChanged);
+	_muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", (_("Mute all")), Common::U32String(""), kMuteAllChanged);
 
 	if (g_system->getOverlayWidth() > 320)
-		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", Common::convertToU32String(_("SFX volume:")), _("Special sound effects volume"));
+		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", (_("SFX volume:")), _("Special sound effects volume"));
 	else
-		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", Common::convertToU32String(_c("SFX volume:", "lowres")), _("Special sound effects volume"));
+		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", (_c("SFX volume:", "lowres")), _("Special sound effects volume"));
 	_sfxVolumeSlider = new SliderWidget(boss, prefix + "vcSfxSlider", _("Special sound effects volume"), kSfxVolumeChanged);
 	_sfxVolumeLabel = new StaticTextWidget(boss, prefix + "vcSfxLabel", Common::convertToU32String("100%"));
 	_sfxVolumeSlider->setMinValue(0);
@@ -1469,10 +1469,10 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
 	_sfxVolumeLabel->setFlags(WIDGET_CLEARBG);
 
 	if (g_system->getOverlayWidth() > 320)
-		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , Common::convertToU32String(_("Speech volume:")));
+		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , (_("Speech volume:")));
 	else
-		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , Common::convertToU32String(_c("Speech volume:", "lowres")));
-	_speechVolumeSlider = new SliderWidget(boss, prefix + "vcSpeechSlider", nullptr, kSpeechVolumeChanged);
+		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , (_c("Speech volume:", "lowres")));
+	_speechVolumeSlider = new SliderWidget(boss, prefix + "vcSpeechSlider", Common::U32String(""), kSpeechVolumeChanged);
 	_speechVolumeLabel = new StaticTextWidget(boss, prefix + "vcSpeechLabel", Common::convertToU32String("100%"));
 	_speechVolumeSlider->setMinValue(0);
 	_speechVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
@@ -1486,7 +1486,7 @@ bool OptionsDialog::loadMusicDeviceSetting(PopUpWidget *popup, Common::String se
 		return true;
 
 	if (_domain != Common::ConfigManager::kApplicationDomain || ConfMan.hasKey(setting, _domain) || preferredType) {
-		const Common::String drv = ConfMan.get(setting, (_domain != Common::ConfigManager::kApplicationDomain && !ConfMan.hasKey(setting, _domain)) ? Common::ConfigManager::kApplicationDomain : _domain);
+		const Common::U32String drv = ConfMan.get(setting, (_domain != Common::ConfigManager::kApplicationDomain && !ConfMan.hasKey(setting, _domain)) ? Common::ConfigManager::kApplicationDomain : _domain);
 		const PluginList p = MusicMan.getPlugins();
 
 		for (PluginList::const_iterator m = p.begin(); m != p.end(); ++m) {
@@ -1513,7 +1513,7 @@ void OptionsDialog::saveMusicDeviceSetting(PopUpWidget *popup, Common::String se
 		MusicDevices i = (*m)->get<MusicPluginObject>().getDevices();
 		for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
 			if (d->getHandle() == popup->getSelectedTag()) {
-				ConfMan.set(setting, d->getCompleteId(), _domain);
+				ConfMan.set(setting, d->getCompleteId().encode().c_str(), _domain);
 				found = true;
 				break;
 			}
@@ -1564,7 +1564,7 @@ void OptionsDialog::updateSpeechVolume(const int newValue) const {
 
 void OptionsDialog::reflowLayout() {
 	if (_graphicsTabId != -1 && _tabWidget)
-		_tabWidget->setTabTitle(_graphicsTabId, g_system->getOverlayWidth() > 320 ? Common::convertToU32String(_("Graphics")) : Common::convertToU32String(_("GFX")));
+		_tabWidget->setTabTitle(_graphicsTabId, g_system->getOverlayWidth() > 320 ? (_("Graphics")) : (_("GFX")));
 
 	Dialog::reflowLayout();
 	setupGraphicsTab();
@@ -1695,7 +1695,7 @@ void GlobalOptionsDialog::build() {
 	//
 	// 1) The graphics tab
 	//
-	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? Common::convertToU32String(_("Graphics")) : Common::convertToU32String(_("GFX")), "GlobalOptions_Graphics");
+	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? (_("Graphics")) : (_("GFX")), "GlobalOptions_Graphics");
 	ScrollContainerWidget *graphicsContainer = new ScrollContainerWidget(tab, "GlobalOptions_Graphics.Container", "GlobalOptions_Graphics_Container", kGraphicsTabContainerReflowCmd);
 	graphicsContainer->setTarget(this);
 	graphicsContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -1706,7 +1706,7 @@ void GlobalOptionsDialog::build() {
 	//
 
 	if (g_system->hasFeature(OSystem::kFeatureShader)) {
-		tab->addTab(Common::convertToU32String(_("Shader")), "GlobalOptions_Shader");
+		tab->addTab((_("Shader")), "GlobalOptions_Shader");
 		addShaderControls(tab, "GlobalOptions_Shader.");
 	}
 
@@ -1718,7 +1718,7 @@ void GlobalOptionsDialog::build() {
 		g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons) ||
 		g_system->hasFeature(OSystem::kFeatureKbdMouseSpeed) ||
 		g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
-		tab->addTab(Common::convertToU32String(_("Control")), "GlobalOptions_Control");
+		tab->addTab((_("Control")), "GlobalOptions_Control");
 		addControlControls(tab, "GlobalOptions_Control.");
 	}
 
@@ -1740,21 +1740,21 @@ void GlobalOptionsDialog::build() {
 	}
 
 	if (!keymaps.empty()) {
-		tab->addTab(Common::convertToU32String(_("Keymaps")), "GlobalOptions_KeyMapper");
+		tab->addTab((_("Keymaps")), "GlobalOptions_KeyMapper");
 		addKeyMapperControls(tab, "GlobalOptions_KeyMapper.", keymaps, Common::ConfigManager::kKeymapperDomain);
 	}
 
 	//
 	// 2) The audio tab
 	//
-	tab->addTab(Common::convertToU32String(_("Audio")), "GlobalOptions_Audio");
+	tab->addTab((_("Audio")), "GlobalOptions_Audio");
 	addAudioControls(tab, "GlobalOptions_Audio.");
 	addSubtitleControls(tab, "GlobalOptions_Audio.");
 
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(Common::convertToU32String(_("Volume")), "GlobalOptions_Volume");
+		tab->addTab((_("Volume")), "GlobalOptions_Volume");
 	else
-		tab->addTab(Common::convertToU32String(_c("Volume", "lowres")), "GlobalOptions_Volume");
+		tab->addTab((_c("Volume", "lowres")), "GlobalOptions_Volume");
 	addVolumeControls(tab, "GlobalOptions_Volume.");
 
 	// TODO: cd drive setting
@@ -1762,31 +1762,31 @@ void GlobalOptionsDialog::build() {
 	//
 	// 3) The MIDI tab
 	//
-	_midiTabId = tab->addTab(Common::convertToU32String(_("MIDI")), "GlobalOptions_MIDI");
+	_midiTabId = tab->addTab((_("MIDI")), "GlobalOptions_MIDI");
 	addMIDIControls(tab, "GlobalOptions_MIDI.");
 
 	//
 	// 4) The MT-32 tab
 	//
-	tab->addTab(Common::convertToU32String(_("MT-32")), "GlobalOptions_MT32");
+	tab->addTab((_("MT-32")), "GlobalOptions_MT32");
 	addMT32Controls(tab, "GlobalOptions_MT32.");
 
 	//
 	// 5) The Paths tab
 	//
 	if (g_system->getOverlayWidth() > 320)
-		_pathsTabId = tab->addTab(Common::convertToU32String(_("Paths")), "GlobalOptions_Paths");
+		_pathsTabId = tab->addTab((_("Paths")), "GlobalOptions_Paths");
 	else
-		_pathsTabId = tab->addTab(Common::convertToU32String(_c("Paths", "lowres")), "GlobalOptions_Paths");
+		_pathsTabId = tab->addTab((_c("Paths", "lowres")), "GlobalOptions_Paths");
 	addPathsControls(tab, "GlobalOptions_Paths.", g_system->getOverlayWidth() <= 320);
 
 	//
 	// 6) The miscellaneous tab
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(Common::convertToU32String(_("Misc")), "GlobalOptions_Misc");
+		tab->addTab((_("Misc")), "GlobalOptions_Misc");
 	else
-		tab->addTab(Common::convertToU32String(_c("Misc", "lowres")), "GlobalOptions_Misc");
+		tab->addTab((_c("Misc", "lowres")), "GlobalOptions_Misc");
 	ScrollContainerWidget *miscContainer = new ScrollContainerWidget(tab, "GlobalOptions_Misc.Container", "GlobalOptions_Misc_Container");
 	miscContainer->setTarget(this);
 	miscContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -1798,9 +1798,9 @@ void GlobalOptionsDialog::build() {
 	// 7) The Cloud tab (remote storages)
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(Common::convertToU32String(_("Cloud")), "GlobalOptions_Cloud");
+		tab->addTab((_("Cloud")), "GlobalOptions_Cloud");
 	else
-		tab->addTab(Common::convertToU32String(_c("Cloud", "lowres")), "GlobalOptions_Cloud");
+		tab->addTab((_c("Cloud", "lowres")), "GlobalOptions_Cloud");
 
 	ScrollContainerWidget *container = new ScrollContainerWidget(tab, "GlobalOptions_Cloud.Container", "GlobalOptions_Cloud_Container", kCloudTabContainerReflowCmd);
 	container->setTarget(this);
@@ -1814,9 +1814,9 @@ void GlobalOptionsDialog::build() {
 	// 8) The LAN tab (local "cloud" webserver)
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(Common::convertToU32String(_("LAN")), "GlobalOptions_Network");
+		tab->addTab((_("LAN")), "GlobalOptions_Network");
 	else
-		tab->addTab(Common::convertToU32String(_c("LAN", "lowres")), "GlobalOptions_Network");
+		tab->addTab((_c("LAN", "lowres")), "GlobalOptions_Network");
 	addNetworkControls(tab, "GlobalOptions_Network.", g_system->getOverlayWidth() <= 320);
 #endif // USE_SDL_NET
 #endif // USE_CLOUD
@@ -1824,9 +1824,9 @@ void GlobalOptionsDialog::build() {
 	//Accessibility
 #ifdef USE_TTS
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab(Common::convertToU32String(_("Accessibility")), "GlobalOptions_Accessibility");
+		tab->addTab((_("Accessibility")), "GlobalOptions_Accessibility");
 	else
-		tab->addTab(Common::convertToU32String(_c("Accessibility", "lowres")), "GlobalOptions_Accessibility");
+		tab->addTab((_c("Accessibility", "lowres")), "GlobalOptions_Accessibility");
 	addAccessibilityControls(tab, "GlobalOptions_Accessibility.");
 #endif // USE_TTS
 
@@ -1835,9 +1835,9 @@ void GlobalOptionsDialog::build() {
 	_tabWidget = tab;
 
 	// Add OK & Cancel buttons
-	new ButtonWidget(this, "GlobalOptions.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
-	new ButtonWidget(this, "GlobalOptions.Apply", Common::convertToU32String(_("Apply")), nullptr, kApplyCmd);
-	new ButtonWidget(this, "GlobalOptions.Ok", Common::convertToU32String(_("OK")), nullptr, kOKCmd);
+	new ButtonWidget(this, "GlobalOptions.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "GlobalOptions.Apply", (_("Apply")), Common::U32String(""), kApplyCmd);
+	new ButtonWidget(this, "GlobalOptions.Ok", (_("OK")), Common::U32String(""), kOKCmd);
 
 #ifdef GUI_ENABLE_KEYSDIALOG
 	_keysDialog = new KeysDialog();
@@ -1856,19 +1856,19 @@ void GlobalOptionsDialog::build() {
 	Common::U32String extraPath(ConfMan.get("extrapath", _domain));
 
 	if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) {
-		_savePath->setLabel(Common::convertToU32String(_("Default")));
+		_savePath->setLabel((_("Default")));
 	} else {
 		_savePath->setLabel(savePath);
 	}
 
 	if (themePath.empty() || !ConfMan.hasKey("themepath", _domain)) {
-		_themePath->setLabel(Common::convertToU32String(_c("None", "path")));
+		_themePath->setLabel((_c("None", "path")));
 	} else {
 		_themePath->setLabel(themePath);
 	}
 
 	if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) {
-		_extraPath->setLabel(Common::convertToU32String(_c("None", "path")));
+		_extraPath->setLabel((_c("None", "path")));
 	} else {
 		_extraPath->setLabel(extraPath);
 	}
@@ -1900,7 +1900,7 @@ void GlobalOptionsDialog::build() {
 #ifdef USE_SDL_NET
 	Common::String rootPath(ConfMan.get("rootpath", "cloud"));
 	if (rootPath.empty() || !ConfMan.hasKey("rootpath", "cloud")) {
-		_rootPath->setLabel(Common::convertToU32String(_c("None", "path")));
+		_rootPath->setLabel((_c("None", "path")));
 	} else {
 		_rootPath->setLabel(rootPath);
 	}
@@ -1926,7 +1926,7 @@ void GlobalOptionsDialog::addMIDIControls(GuiObject *boss, const Common::String
 	OptionsDialog::addMIDIControls(boss, prefix);
 
 #ifdef USE_FLUIDSYNTH
-	new ButtonWidget(boss, prefix + "mcFluidSynthSettings", _("FluidSynth Settings"), nullptr, kFluidSynthSettingsCmd);
+	new ButtonWidget(boss, prefix + "mcFluidSynthSettings", _("FluidSynth Settings"), Common::U32String(""), kFluidSynthSettingsCmd);
 #endif
 }
 
@@ -1937,34 +1937,34 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
 
 	// Save game path
 	if (!lowres)
-		new ButtonWidget(boss, prefix + "SaveButton", Common::convertToU32String(_("Save Path:")), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
+		new ButtonWidget(boss, prefix + "SaveButton", (_("Save Path:")), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
 	else
-		new ButtonWidget(boss, prefix + "SaveButton", Common::convertToU32String(_c("Save Path:", "lowres")), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
+		new ButtonWidget(boss, prefix + "SaveButton", (_c("Save Path:", "lowres")), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
 	_savePath = new StaticTextWidget(boss, prefix + "SavePath", Common::convertToU32String("/foo/bar"), _("Specifies where your saved games are put"));
 
 	_savePathClearButton = addClearButton(boss, prefix + "SavePathClearButton", kSavePathClearCmd);
 
 	if (!lowres)
-		new ButtonWidget(boss, prefix + "ThemeButton", Common::convertToU32String(_("Theme Path:")), nullptr, kChooseThemeDirCmd);
+		new ButtonWidget(boss, prefix + "ThemeButton", (_("Theme Path:")), Common::U32String(""), kChooseThemeDirCmd);
 	else
-		new ButtonWidget(boss, prefix + "ThemeButton", Common::convertToU32String(_c("Theme Path:", "lowres")), nullptr, kChooseThemeDirCmd);
-	_themePath = new StaticTextWidget(boss, prefix + "ThemePath", Common::convertToU32String(_c("None", "path")));
+		new ButtonWidget(boss, prefix + "ThemeButton", (_c("Theme Path:", "lowres")), Common::U32String(""), kChooseThemeDirCmd);
+	_themePath = new StaticTextWidget(boss, prefix + "ThemePath", (_c("None", "path")));
 
 	_themePathClearButton = addClearButton(boss, prefix + "ThemePathClearButton", kThemePathClearCmd);
 
 	if (!lowres)
-		new ButtonWidget(boss, prefix + "ExtraButton", Common::convertToU32String(_("Extra Path:")), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
+		new ButtonWidget(boss, prefix + "ExtraButton", (_("Extra Path:")), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
 	else
-		new ButtonWidget(boss, prefix + "ExtraButton", Common::convertToU32String(_c("Extra Path:", "lowres")), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
-	_extraPath = new StaticTextWidget(boss, prefix + "ExtraPath", Common::convertToU32String(_c("None", "path")), _("Specifies path to additional data used by all games or ScummVM"));
+		new ButtonWidget(boss, prefix + "ExtraButton", (_c("Extra Path:", "lowres")), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
+	_extraPath = new StaticTextWidget(boss, prefix + "ExtraPath", (_c("None", "path")), _("Specifies path to additional data used by all games or ScummVM"));
 
 	_extraPathClearButton = addClearButton(boss, prefix + "ExtraPathClearButton", kExtraPathClearCmd);
 
 #ifdef DYNAMIC_MODULES
 	if (!lowres)
-		new ButtonWidget(boss, prefix + "PluginsButton", _("Plugins Path:"), nullptr, kChoosePluginsDirCmd);
+		new ButtonWidget(boss, prefix + "PluginsButton", _("Plugins Path:"), Common::U32String(""), kChoosePluginsDirCmd);
 	else
-		new ButtonWidget(boss, prefix + "PluginsButton", _c("Plugins Path:", "lowres"), nullptr, kChoosePluginsDirCmd);
+		new ButtonWidget(boss, prefix + "PluginsButton", _c("Plugins Path:", "lowres"), Common::U32String(""), kChoosePluginsDirCmd);
 	_pluginsPath = new StaticTextWidget(boss, prefix + "PluginsPath", _c("None", "path"));
 
 	_pluginsPathClearButton = addClearButton(boss, "GlobalOptions_Paths.PluginsPathClearButton", kPluginsPathClearCmd);
@@ -1973,43 +1973,43 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
 }
 
 void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
-	new ButtonWidget(boss, prefix + "ThemeButton", Common::convertToU32String(_("Theme:")), nullptr, kChooseThemeCmd);
+	new ButtonWidget(boss, prefix + "ThemeButton", (_("Theme:")), Common::U32String(""), kChooseThemeCmd);
 	_curTheme = new StaticTextWidget(boss, prefix + "CurTheme", g_gui.theme()->getThemeName());
 
 
-	_rendererPopUpDesc = new StaticTextWidget(boss, prefix + "RendererPopupDesc", Common::convertToU32String(_("GUI renderer:")));
+	_rendererPopUpDesc = new StaticTextWidget(boss, prefix + "RendererPopupDesc", (_("GUI renderer:")));
 	_rendererPopUp = new PopUpWidget(boss, prefix + "RendererPopup");
 
 	if (!lowres) {
 		for (uint i = 1; i < GUI::ThemeEngine::_rendererModesSize; ++i)
-			_rendererPopUp->appendEntry(Common::convertToU32String(_(GUI::ThemeEngine::_rendererModes[i].name)), GUI::ThemeEngine::_rendererModes[i].mode);
+			_rendererPopUp->appendEntry((_(GUI::ThemeEngine::_rendererModes[i].name)), GUI::ThemeEngine::_rendererModes[i].mode);
 	} else {
 		for (uint i = 1; i < GUI::ThemeEngine::_rendererModesSize; ++i)
-			_rendererPopUp->appendEntry(Common::convertToU32String(_(GUI::ThemeEngine::_rendererModes[i].shortname)), GUI::ThemeEngine::_rendererModes[i].mode);
+			_rendererPopUp->appendEntry((_(GUI::ThemeEngine::_rendererModes[i].shortname)), GUI::ThemeEngine::_rendererModes[i].mode);
 	}
 
 	if (!lowres)
-		_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", Common::convertToU32String(_("Autosave:")));
+		_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", (_("Autosave:")));
 	else
-		_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", Common::convertToU32String(_c("Autosave:", "lowres")));
+		_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", (_c("Autosave:", "lowres")));
 	_autosavePeriodPopUp = new PopUpWidget(boss, prefix + "AutosavePeriodPopup");
 
 	for (int i = 0; savePeriodLabels[i]; i++) {
-		_autosavePeriodPopUp->appendEntry(Common::convertToU32String(_(savePeriodLabels[i])), savePeriodValues[i]);
+		_autosavePeriodPopUp->appendEntry((_(savePeriodLabels[i])), savePeriodValues[i]);
 	}
 
 #ifdef GUI_ENABLE_KEYSDIALOG
-	new ButtonWidget(boss, prefix + "KeysButton", _("Keys"), nullptr, kChooseKeyMappingCmd);
+	new ButtonWidget(boss, prefix + "KeysButton", _("Keys"), Common::U32String(""), kChooseKeyMappingCmd);
 #endif
 
 	// TODO: joystick setting
 
 
 #ifdef USE_TRANSLATION
-	_guiLanguagePopUpDesc = new StaticTextWidget(boss, prefix + "GuiLanguagePopupDesc", Common::convertToU32String(_("GUI language:")), _("Language of ScummVM GUI"));
+	_guiLanguagePopUpDesc = new StaticTextWidget(boss, prefix + "GuiLanguagePopupDesc", (_("GUI language:")), _("Language of ScummVM GUI"));
 	_guiLanguagePopUp = new PopUpWidget(boss, prefix + "GuiLanguagePopup");
 #ifdef USE_DETECTLANG
-	_guiLanguagePopUp->appendEntry(Common::convertToU32String(_("<default>")), Common::kTranslationAutodetectId);
+	_guiLanguagePopUp->appendEntry((_("<default>")), Common::kTranslationAutodetectId);
 #endif // USE_DETECTLANG
 	_guiLanguagePopUp->appendEntry(Common::convertToU32String("English"), Common::kTranslationBuiltinId);
 	_guiLanguagePopUp->appendEntry(Common::convertToU32String(""), 0);
@@ -2046,7 +2046,7 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 
 	if (g_system->hasFeature(OSystem::kFeatureSystemBrowserDialog)) {
 		_useSystemDialogsCheckbox = new CheckboxWidget(boss, prefix + "UseSystemDialogs",
-			Common::convertToU32String(_("Use native system file browser")),
+			(_("Use native system file browser")),
 			_("Use the native system file browser instead of the ScummVM one to select a file or directory.")
 		);
 
@@ -2066,14 +2066,14 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 
 	_updatesPopUp->setSelectedTag(Common::UpdateManager::normalizeInterval(ConfMan.getInt("updates_check")));
 
-	new ButtonWidget(boss, prefix + "UpdatesCheckManuallyButton", _("Check now"), nullptr, kUpdatesCheckCmd);
+	new ButtonWidget(boss, prefix + "UpdatesCheckManuallyButton", _("Check now"), Common::U32String(""), kUpdatesCheckCmd);
 #endif
 }
 
 #ifdef USE_CLOUD
 #ifdef USE_LIBCURL
 void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
-	_storagePopUpDesc = new StaticTextWidget(boss, prefix + "StoragePopupDesc", Common::convertToU32String(_("Active storage:")), _("Active cloud storage"));
+	_storagePopUpDesc = new StaticTextWidget(boss, prefix + "StoragePopupDesc", (_("Active storage:")), _("Active cloud storage"));
 	_storagePopUp = new PopUpWidget(boss, prefix + "StoragePopup");
 	Common::StringArray list = CloudMan.listStorages();
 	for (uint32 i = 0; i < list.size(); ++i) {
@@ -2082,50 +2082,50 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
 	_storagePopUp->setSelected(_selectedStorageIndex);
 
 	if (lowres)
-		_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", Common::convertToU32String(_c("4. Storage is not yet enabled. Verify that username is correct and enable it:", "lowres")));
+		_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", (_c("4. Storage is not yet enabled. Verify that username is correct and enable it:", "lowres")));
 	else
-		_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", Common::convertToU32String(_("4. Storage is not yet enabled. Verify that username is correct and enable it:")));
-	_storageEnableButton = new ButtonWidget(boss, prefix + "StorageEnableButton", Common::convertToU32String(_("Enable storage")), _("Confirm you want to use this account for this storage"), kEnableStorageCmd);
+		_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", (_("4. Storage is not yet enabled. Verify that username is correct and enable it:")));
+	_storageEnableButton = new ButtonWidget(boss, prefix + "StorageEnableButton", (_("Enable storage")), _("Confirm you want to use this account for this storage"), kEnableStorageCmd);
 
-	_storageUsernameDesc = new StaticTextWidget(boss, prefix + "StorageUsernameDesc", Common::convertToU32String(_("Username:")), _("Username used by this storage"));
-	_storageUsername = new StaticTextWidget(boss, prefix + "StorageUsernameLabel", Common::convertToU32String(_("<none>")), "", ThemeEngine::kFontStyleNormal);
+	_storageUsernameDesc = new StaticTextWidget(boss, prefix + "StorageUsernameDesc", (_("Username:")), _("Username used by this storage"));
+	_storageUsername = new StaticTextWidget(boss, prefix + "StorageUsernameLabel", (_("<none>")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 
-	_storageUsedSpaceDesc = new StaticTextWidget(boss, prefix + "StorageUsedSpaceDesc", Common::convertToU32String(_("Used space:")), _("Space used by ScummVM's saved games on this storage"));
-	_storageUsedSpace = new StaticTextWidget(boss, prefix + "StorageUsedSpaceLabel", Common::convertToU32String("0 bytes"), "", ThemeEngine::kFontStyleNormal);
+	_storageUsedSpaceDesc = new StaticTextWidget(boss, prefix + "StorageUsedSpaceDesc", (_("Used space:")), _("Space used by ScummVM's saved games on this storage"));
+	_storageUsedSpace = new StaticTextWidget(boss, prefix + "StorageUsedSpaceLabel", Common::convertToU32String("0 bytes"), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 
-	_storageLastSyncDesc = new StaticTextWidget(boss, prefix + "StorageLastSyncDesc", Common::convertToU32String(_("Last sync:")), _("When was the last time saved games were synced with this storage"));
-	_storageLastSync = new StaticTextWidget(boss, prefix + "StorageLastSyncLabel", Common::convertToU32String(_("<never>")), "", ThemeEngine::kFontStyleNormal);
+	_storageLastSyncDesc = new StaticTextWidget(boss, prefix + "StorageLastSyncDesc", (_("Last sync:")), _("When was the last time saved games were synced with this storage"));
+	_storageLastSync = new StaticTextWidget(boss, prefix + "StorageLastSyncLabel", (_("<never>")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 	if (lowres)
-		_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", Common::convertToU32String(_c("Saved games sync automatically on launch, after saving and on loading.", "lowres")), "", ThemeEngine::kFontStyleNormal);
+		_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", (_c("Saved games sync automatically on launch, after saving and on loading.", "lowres")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 	else
-		_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", Common::convertToU32String(_("Saved games sync automatically on launch, after saving and on loading.")), "", ThemeEngine::kFontStyleNormal);
-	_storageSyncSavesButton = new ButtonWidget(boss, prefix + "SyncSavesButton", Common::convertToU32String(_("Sync now")), _("Start saved games sync"), kSyncSavesStorageCmd);
+		_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", (_("Saved games sync automatically on launch, after saving and on loading.")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
+	_storageSyncSavesButton = new ButtonWidget(boss, prefix + "SyncSavesButton", (_("Sync now")), _("Start saved games sync"), kSyncSavesStorageCmd);
 
 	if (lowres)
-		_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", Common::convertToU32String(_c("You can download game files from your cloud ScummVM folder:", "lowres")));
+		_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", (_c("You can download game files from your cloud ScummVM folder:", "lowres")));
 	else
-		_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", Common::convertToU32String(_("You can download game files from your cloud ScummVM folder:")));
-	_storageDownloadButton = new ButtonWidget(boss, prefix + "DownloadButton", Common::convertToU32String(_("Download game files")), _("Open downloads manager dialog"), kDownloadStorageCmd);
+		_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", (_("You can download game files from your cloud ScummVM folder:")));
+	_storageDownloadButton = new ButtonWidget(boss, prefix + "DownloadButton", (_("Download game files")), _("Open downloads manager dialog"), kDownloadStorageCmd);
 
 	if (lowres)
-		_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", Common::convertToU32String(_c("To change account for this storage, disconnect and connect again:", "lowres")));
+		_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", (_c("To change account for this storage, disconnect and connect again:", "lowres")));
 	else
-		_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", Common::convertToU32String(_("To change account for this storage, disconnect and connect again:")));
-	_storageDisconnectButton = new ButtonWidget(boss, prefix + "DisconnectButton", Common::convertToU32String(_("Disconnect")), _("Stop using this storage on this device"), kDisconnectStorageCmd);
+		_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", (_("To change account for this storage, disconnect and connect again:")));
+	_storageDisconnectButton = new ButtonWidget(boss, prefix + "DisconnectButton", (_("Disconnect")), _("Stop using this storage on this device"), kDisconnectStorageCmd);
 
 	if (lowres)
-		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", Common::convertToU32String(_c("This storage is not connected yet! To connect,", "lowres")));
+		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", (_c("This storage is not connected yet! To connect,", "lowres")));
 	else
-		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", Common::convertToU32String(_("This storage is not connected yet! To connect,")));
-	_storageWizardOpenLinkHint = new StaticTextWidget(boss, prefix + "StorageWizardOpenLinkHint", Common::convertToU32String(_("1. Open this link:")));
+		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", (_("This storage is not connected yet! To connect,")));
+	_storageWizardOpenLinkHint = new StaticTextWidget(boss, prefix + "StorageWizardOpenLinkHint", (_("1. Open this link:")));
 	_storageWizardLink = new ButtonWidget(boss, prefix + "StorageWizardLink", Common::convertToU32String("https://cloud.scummvm.org/"), _("Open URL"), kOpenUrlStorageCmd);
 	if (lowres)
-		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", Common::convertToU32String(_c("2. Get the code and enter it here:", "lowres")));
+		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", (_c("2. Get the code and enter it here:", "lowres")));
 	else
-		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", Common::convertToU32String(_("2. Get the code and enter it here:")));
-	_storageWizardCodeBox = new EditTextWidget(boss, prefix + "StorageWizardCodeBox", Common::convertToU32String(""), nullptr, 0, 0, ThemeEngine::kFontStyleConsole);
-	_storageWizardPasteButton = new ButtonWidget(boss, prefix + "StorageWizardPasteButton", Common::convertToU32String(_("Paste")), _("Paste code from clipboard"), kPasteCodeStorageCmd);
-	_storageWizardConnectButton = new ButtonWidget(boss, prefix + "StorageWizardConnectButton", Common::convertToU32String(_("3. Connect")), _("Connect your cloud storage account"), kConnectStorageCmd);
+		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", (_("2. Get the code and enter it here:")));
+	_storageWizardCodeBox = new EditTextWidget(boss, prefix + "StorageWizardCodeBox", Common::convertToU32String(""), Common::U32String(""), 0, 0, ThemeEngine::kFontStyleConsole);
+	_storageWizardPasteButton = new ButtonWidget(boss, prefix + "StorageWizardPasteButton", (_("Paste")), _("Paste code from clipboard"), kPasteCodeStorageCmd);
+	_storageWizardConnectButton = new ButtonWidget(boss, prefix + "StorageWizardConnectButton", (_("3. Connect")), _("Connect your cloud storage account"), kConnectStorageCmd);
 	_storageWizardConnectionStatusHint = new StaticTextWidget(boss, prefix + "StorageWizardConnectionStatusHint", Common::convertToU32String("..."));
 
 	setupCloudTab();
@@ -2134,29 +2134,29 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
 
 #ifdef USE_SDL_NET
 void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
-	_runServerButton = new ButtonWidget(boss, prefix + "RunServerButton", Common::convertToU32String(_("Run server")), _("Run local webserver"), kRunServerCmd);
-	_serverInfoLabel = new StaticTextWidget(boss, prefix + "ServerInfoLabel", Common::convertToU32String(_("Not running")));
+	_runServerButton = new ButtonWidget(boss, prefix + "RunServerButton", (_("Run server")), _("Run local webserver"), kRunServerCmd);
+	_serverInfoLabel = new StaticTextWidget(boss, prefix + "ServerInfoLabel", (_("Not running")));
 
 	// Root path
 	if (lowres)
-		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", Common::convertToU32String(_c("/root/ Path:", "lowres")), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
+		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", (_c("/root/ Path:", "lowres")), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
 	else
-		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", Common::convertToU32String(_("/root/ Path:")), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
+		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", (_("/root/ Path:")), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
 	_rootPath = new StaticTextWidget(boss, prefix + "RootPath", Common::convertToU32String("/foo/bar"), _("Select which directory will be shown as /root/ in the Files Manager"));
 	_rootPathClearButton = addClearButton(boss, prefix + "RootPathClearButton", kRootPathClearCmd);
 
 	uint32 port = Networking::LocalWebserver::getPort();
 
-	_serverPortDesc = new StaticTextWidget(boss, prefix + "ServerPortDesc", Common::convertToU32String(_("Server's port:")), _("Port for server to use"));
-	_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), nullptr);
+	_serverPortDesc = new StaticTextWidget(boss, prefix + "ServerPortDesc", (_("Server's port:")), _("Port for server to use"));
+	_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), Common::U32String(""));
 	_serverPortClearButton = addClearButton(boss, prefix + "ServerPortClearButton", kServerPortClearCmd);
 
 	if (lowres) {
-		_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", Common::convertToU32String(_c("Run server to manage files with browser (in the same network).", "lowres")), "", ThemeEngine::kFontStyleNormal);
-		_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", Common::convertToU32String(_c("Closing options dialog will stop the server.", "lowres")), "", ThemeEngine::kFontStyleNormal);
+		_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", (_c("Run server to manage files with browser (in the same network).", "lowres")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
+		_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", (_c("Closing options dialog will stop the server.", "lowres")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 	} else {
-		_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", Common::convertToU32String(_("Run server to manage files with browser (in the same network).")), "", ThemeEngine::kFontStyleNormal);
-		_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", Common::convertToU32String(_("Closing options dialog will stop the server.")), "", ThemeEngine::kFontStyleNormal);
+		_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", (_("Run server to manage files with browser (in the same network).")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
+		_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", (_("Closing options dialog will stop the server.")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 	}
 
 	reflowNetworkTabLayout();
@@ -2168,7 +2168,7 @@ void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::Stri
 #ifdef USE_TTS
 void GlobalOptionsDialog::addAccessibilityControls(GuiObject *boss, const Common::String &prefix) {
 	_ttsCheckbox = new CheckboxWidget(boss, prefix + "TTSCheckbox",
-		Common::convertToU32String(_("Use Text to speech")), _("Will read text in gui on mouse over."));
+		(_("Use Text to speech")), _("Will read text in gui on mouse over."));
 	if (ConfMan.hasKey("tts_enabled"))
 		_ttsCheckbox->setState(ConfMan.getBool("tts_enabled", _domain));
 	else
@@ -2181,7 +2181,7 @@ void GlobalOptionsDialog::addAccessibilityControls(GuiObject *boss, const Common
 		voices = ttsMan->getVoicesArray();
 
 	if (voices.empty())
-		_ttsVoiceSelectionPopUp->appendEntry(Common::convertToU32String(_("None")), 0);
+		_ttsVoiceSelectionPopUp->appendEntry(_("None"), 0);
 	else {
 		_ttsVoiceSelectionPopUp->appendEntry(_("<default>"));
 		for(unsigned i = 0; i < voices.size(); i++)
@@ -2201,19 +2201,19 @@ void GlobalOptionsDialog::apply() {
 	bool isRebuildNeeded = false;
 
 	Common::String savePath(Common::convertFromU32String(_savePath->getLabel()));
-	if (!savePath.empty() && (savePath != _("Default")))
+	if (!savePath.empty() && (savePath != Common::convertFromU32String(_("Default"))))
 		ConfMan.set("savepath", savePath, _domain);
 	else
 		ConfMan.removeKey("savepath", _domain);
 
 	Common::String themePath(Common::convertFromU32String(_themePath->getLabel()));
-	if (!themePath.empty() && (themePath != _c("None", "path")))
+	if (!themePath.empty() && (themePath != Common::convertFromU32String(_c("None", "path"))))
 		ConfMan.set("themepath", themePath, _domain);
 	else
 		ConfMan.removeKey("themepath", _domain);
 
 	Common::String extraPath(Common::convertFromU32String(_extraPath->getLabel()));
-	if (!extraPath.empty() && (extraPath != _c("None", "path")))
+	if (!extraPath.empty() && (extraPath != Common::convertFromU32String(_c("None", "path"))))
 		ConfMan.set("extrapath", extraPath, _domain);
 	else
 		ConfMan.removeKey("extrapath", _domain);
@@ -2229,7 +2229,7 @@ void GlobalOptionsDialog::apply() {
 #ifdef USE_CLOUD
 #ifdef USE_SDL_NET
 	Common::String rootPath(Common::convertFromU32String(_rootPath->getLabel()));
-	if (!rootPath.empty() && (rootPath != _c("None", "path")))
+	if (!rootPath.empty() && (rootPath != Common::convertFromU32String(_c("None", "path"))))
 		ConfMan.set("rootpath", rootPath, "cloud");
 	else
 		ConfMan.removeKey("rootpath", "cloud");
@@ -2256,9 +2256,9 @@ void GlobalOptionsDialog::apply() {
 	if (CloudMan.getStorageIndex() != _selectedStorageIndex) {
 		if (!CloudMan.switchStorage(_selectedStorageIndex)) {
 			bool anotherStorageIsWorking = CloudMan.isWorking();
-			Common::String message = _("Failed to change cloud storage!");
+			Common::U32String message = _("Failed to change cloud storage!");
 			if (anotherStorageIsWorking) {
-				message += "\n";
+				message += Common::U32String("\n");
 				message += _("Another cloud storage is already active.");
 			}
 			MessageDialog dialog(message);
@@ -2319,7 +2319,7 @@ void GlobalOptionsDialog::apply() {
 		_newTheme = oldThemeId;
 
 	if (!g_gui.loadNewTheme(_newTheme, gfxMode, true)) {
-		Common::String errorMessage;
+		Common::U32String errorMessage;
 
 		_curTheme->setLabel(oldThemeName);
 		_newTheme = oldThemeId;
@@ -2394,7 +2394,7 @@ void GlobalOptionsDialog::close() {
 void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 	switch (cmd) {
 	case kChooseSaveDirCmd: {
-		BrowserDialog browser(Common::convertToU32String(_("Select directory for saved games")), true);
+		BrowserDialog browser((_("Select directory for saved games")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2410,7 +2410,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		break;
 	}
 	case kChooseThemeDirCmd: {
-		BrowserDialog browser(Common::convertToU32String(_("Select directory for GUI themes")), true);
+		BrowserDialog browser((_("Select directory for GUI themes")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2420,7 +2420,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		break;
 	}
 	case kChooseExtraDirCmd: {
-		BrowserDialog browser(Common::convertToU32String(_("Select directory for extra files")), true);
+		BrowserDialog browser((_("Select directory for extra files")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2431,7 +2431,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 	}
 #ifdef DYNAMIC_MODULES
 	case kChoosePluginsDirCmd: {
-		BrowserDialog browser(Common::convertToU32String(_("Select directory for plugins")), true);
+		BrowserDialog browser((_("Select directory for plugins")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2444,7 +2444,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 #ifdef USE_CLOUD
 #ifdef USE_SDL_NET
 	case kChooseRootDirCmd: {
-		BrowserDialog browser(Common::convertToU32String(_("Select directory for Files Manager /root/")), true);
+		BrowserDialog browser((_("Select directory for Files Manager /root/")), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2459,13 +2459,13 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 #endif
 #endif
 	case kThemePathClearCmd:
-		_themePath->setLabel(Common::convertToU32String(_c("None", "path")));
+		_themePath->setLabel((_c("None", "path")));
 		break;
 	case kExtraPathClearCmd:
-		_extraPath->setLabel(Common::convertToU32String(_c("None", "path")));
+		_extraPath->setLabel((_c("None", "path")));
 		break;
 	case kSavePathClearCmd:
-		_savePath->setLabel(Common::convertToU32String(_("Default")));
+		_savePath->setLabel((_("Default")));
 		break;
 #ifdef DYNAMIC_MODULES
 	case kPluginsPathClearCmd:
@@ -2475,18 +2475,18 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 #ifdef USE_CLOUD
 #ifdef USE_SDL_NET
 	case kRootPathClearCmd:
-		_rootPath->setLabel(Common::convertToU32String(_c("None", "path")));
+		_rootPath->setLabel((_c("None", "path")));
 		break;
 #endif
 #endif
 	case kChooseSoundFontCmd: {
-		BrowserDialog browser(Common::convertToU32String(_("Select SoundFont")), false);
+		BrowserDialog browser((_("Select SoundFont")), false);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode file(browser.getResult());
 			_soundFont->setLabel(file.getPath());
 
-			if (!file.getPath().empty() && (file.getPath() != _c("None", "path")))
+			if (!file.getPath().empty() && (Common::convertToU32String(file.getPath().c_str()) != _c("None", "path")))
 				_soundFontClearButton->setEnabled(true);
 			else
 				_soundFontClearButton->setEnabled(false);
@@ -2603,7 +2603,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		}
 
 		if (_storageWizardConnectionStatusHint)
-			_storageWizardConnectionStatusHint->setLabel(Common::convertToU32String(_("Connecting...")));
+			_storageWizardConnectionStatusHint->setLabel((_("Connecting...")));
 		CloudMan.connectStorage(
 			_selectedStorageIndex, Common::convertFromU32String(code),
 			new Common::Callback<GlobalOptionsDialog, Networking::ErrorResponse>(this, &GlobalOptionsDialog::storageConnectionCallback)
@@ -2805,7 +2805,7 @@ void GlobalOptionsDialog::setupCloudTab() {
 		uint64 usedSpace = CloudMan.getStorageUsedSpace(_selectedStorageIndex);
 		Common::String usedSpaceNumber, usedSpaceUnits;
 		usedSpaceNumber = Common::getHumanReadableBytes(usedSpace, usedSpaceUnits);
-		_storageUsedSpace->setLabel(Common::String::format("%s %s", usedSpaceNumber.c_str(), _(usedSpaceUnits.c_str())));
+		_storageUsedSpace->setLabel(Common::U32String::format("%s %s", usedSpaceNumber.c_str(), _(usedSpaceUnits.c_str()).encode().c_str()));
 		_storageUsedSpace->setVisible(shownConnectedInfo);
 	}
 	if (_storageSyncHint) {
@@ -2814,7 +2814,7 @@ void GlobalOptionsDialog::setupCloudTab() {
 	}
 	if (_storageLastSyncDesc) _storageLastSyncDesc->setVisible(shownConnectedInfo);
 	if (_storageLastSync) {
-		Common::String sync = CloudMan.getStorageLastSync(_selectedStorageIndex);
+		Common::U32String sync = CloudMan.getStorageLastSync(_selectedStorageIndex);
 		if (sync == "") {
 			if (_selectedStorageIndex == CloudMan.getStorageIndex() && CloudMan.isSyncing())
 				sync = _("<right now>");
@@ -2926,15 +2926,15 @@ void GlobalOptionsDialog::reflowNetworkTabLayout() {
 
 	if (_runServerButton) {
 		_runServerButton->setVisible(true);
-		_runServerButton->setLabel(Common::convertToU32String(_(serverIsRunning ? "Stop server" : "Run server")));
-		_runServerButton->setTooltip(_(serverIsRunning ? "Stop local webserver" : "Run local webserver"));
+		_runServerButton->setLabel((_(serverIsRunning ? "Stop server" : "Run server")));
+		_runServerButton->setTooltip((_(serverIsRunning ? "Stop local webserver" : "Run local webserver")));
 	}
 	if (_serverInfoLabel) {
 		_serverInfoLabel->setVisible(true);
 		if (serverIsRunning)
 			_serverInfoLabel->setLabel(LocalServer.getAddress());
 		else
-			_serverInfoLabel->setLabel(Common::convertToU32String(_("Not running")));
+			_serverInfoLabel->setLabel((_("Not running")));
 	}
 	if (_rootPathButton) _rootPathButton->setVisible(true);
 	if (_rootPath) _rootPath->setVisible(true);
@@ -2976,14 +2976,14 @@ void GlobalOptionsDialog::reflowNetworkTabLayout() {
 
 #ifdef USE_LIBCURL
 void GlobalOptionsDialog::storageConnectionCallback(Networking::ErrorResponse response) {
-	Common::String message = "...";
+	Common::U32String message = "...";
 	if (!response.failed && !response.interrupted) {
 		// success
 		g_system->displayMessageOnOSD(_("Storage connected."));
 	} else {
 		message = _("Failed to connect storage.");
 		if (response.failed) {
-			message = Common::String(_("Failed to connect storage: ")) + _(response.response.c_str());
+			message = _("Failed to connect storage: ") + _(response.response.c_str());
 		}
 	}
 
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index 0c52bb2b6b..ad94d85978 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -68,10 +68,10 @@ enum {
 };
 
 PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
-	new StaticTextWidget(this, "Predictive.Headline", Common::convertToU32String"Enter Text"));
+	new StaticTextWidget(this, "Predictive.Headline", Common::convertToU32String("Enter Text"));
 
-	_button[kCancelAct] =  new ButtonWidget(this, "Predictive.Cancel",  Common::convertToU32String_("Cancel"))   , nullptr, kCancelCmd);
-	_button[kOkAct] =      new ButtonWidget(this, "Predictive.OK",      Common::convertToU32String_("Ok"))       , nullptr, kOkCmd);
+	_button[kCancelAct] =  new ButtonWidget(this, "Predictive.Cancel",  Common::convertToU32String_("Cancel"))   , Common::U32String(""), kCancelCmd);
+	_button[kOkAct] =      new ButtonWidget(this, "Predictive.OK",      Common::convertToU32String_("Ok"))       , Common::U32String(""), kOkCmd);
 
 	if (g_gui.useRTL()) {
 		/** If using RTL, swap the internal name of odd columns, to be flipped again when drawing.
@@ -79,32 +79,32 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 			The rest, like okButton, cancel, etc are all flipped.
 		*/
 
-		_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button1", Common::convertToU32String("3  def"      ), nullptr, kBut3Cmd);
-		_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", Common::convertToU32String("2  abc"      ), nullptr, kBut2Cmd);
-		_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button3", Common::convertToU32String("1  `-.&"     ), nullptr, kBut1Cmd);
-		_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button4", Common::convertToU32String("6  mno"      ), nullptr, kBut6Cmd);
-		_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", Common::convertToU32String("5  jkl"      ), nullptr, kBut5Cmd);
-		_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button6", Common::convertToU32String("4  ghi"      ), nullptr, kBut4Cmd);
-		_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button7", Common::convertToU32String("9  wxyz"     ), nullptr, kBut9Cmd);
-		_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", Common::convertToU32String("8  tuv"      ), nullptr, kBut8Cmd);
-		_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button9", Common::convertToU32String("7  pqrs"     ), nullptr, kBut7Cmd);
-		_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", Common::convertToU32String("0"           ), nullptr, kBut0Cmd);
+		_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button1", Common::convertToU32String("3  def"      ), Common::U32String(""), kBut3Cmd);
+		_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", Common::convertToU32String("2  abc"      ), Common::U32String(""), kBut2Cmd);
+		_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button3", Common::convertToU32String("1  `-.&"     ), Common::U32String(""), kBut1Cmd);
+		_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button4", Common::convertToU32String("6  mno"      ), Common::U32String(""), kBut6Cmd);
+		_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", Common::convertToU32String("5  jkl"      ), Common::U32String(""), kBut5Cmd);
+		_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button6", Common::convertToU32String("4  ghi"      ), Common::U32String(""), kBut4Cmd);
+		_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button7", Common::convertToU32String("9  wxyz"     ), Common::U32String(""), kBut9Cmd);
+		_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", Common::convertToU32String("8  tuv"      ), Common::U32String(""), kBut8Cmd);
+		_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button9", Common::convertToU32String("7  pqrs"     ), Common::U32String(""), kBut7Cmd);
+		_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", Common::convertToU32String("0"           ), Common::U32String(""), kBut0Cmd);
 	} else {
-		_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button1", Common::convertToU32String("1  `-.&"     ), nullptr, kBut1Cmd);
-		_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", Common::convertToU32String("2  abc"      ), nullptr, kBut2Cmd);
-		_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button3", Common::convertToU32String("3  def"      ), nullptr, kBut3Cmd);
-		_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button4", Common::convertToU32String("4  ghi"      ), nullptr, kBut4Cmd);
-		_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", Common::convertToU32String("5  jkl"      ), nullptr, kBut5Cmd);
-		_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button6", Common::convertToU32String("6  mno"      ), nullptr, kBut6Cmd);
-		_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button7", Common::convertToU32String("7  pqrs"     ), nullptr, kBut7Cmd);
-		_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", Common::convertToU32String("8  tuv"      ), nullptr, kBut8Cmd);
-		_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button9", Common::convertToU32String("9  wxyz"     ), nullptr, kBut9Cmd);
-		_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", Common::convertToU32String("0"           ), nullptr, kBut0Cmd);
+		_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button1", Common::convertToU32String("1  `-.&"     ), Common::U32String(""), kBut1Cmd);
+		_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", Common::convertToU32String("2  abc"      ), Common::U32String(""), kBut2Cmd);
+		_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button3", Common::convertToU32String("3  def"      ), Common::U32String(""), kBut3Cmd);
+		_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button4", Common::convertToU32String("4  ghi"      ), Common::U32String(""), kBut4Cmd);
+		_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", Common::convertToU32String("5  jkl"      ), Common::U32String(""), kBut5Cmd);
+		_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button6", Common::convertToU32String("6  mno"      ), Common::U32String(""), kBut6Cmd);
+		_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button7", Common::convertToU32String("7  pqrs"     ), Common::U32String(""), kBut7Cmd);
+		_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", Common::convertToU32String("8  tuv"      ), Common::U32String(""), kBut8Cmd);
+		_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button9", Common::convertToU32String("9  wxyz"     ), Common::U32String(""), kBut9Cmd);
+		_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", Common::convertToU32String("0"           ), Common::U32String(""), kBut0Cmd);
 	}
 
 	// I18N: You must leave "#" as is, only word 'next' is translatable
-	_button[kNextAct] =    new ButtonWidget(this, "Predictive.Next",    Common::convertToU32String(_("#  next"))  , nullptr, kNextCmd);
-	_button[kAddAct] =     new ButtonWidget(this, "Predictive.Add",     Common::convertToU32String(_("add"))      , nullptr, kAddCmd);
+	_button[kNextAct] =    new ButtonWidget(this, "Predictive.Next",    (_("#  next"))  , Common::U32String(""), kNextCmd);
+	_button[kAddAct] =     new ButtonWidget(this, "Predictive.Add",     (_("add"))      , Common::U32String(""), kAddCmd);
 	_button[kAddAct]->setEnabled(false);
 
 #ifndef DISABLE_FANCY_THEMES
@@ -114,10 +114,10 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 		((PicButtonWidget *)_button[kDelAct])->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelButton));
 	} else
 #endif
-		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , Common::convertToU32String(_("<")) , nullptr, kDelCmd);
+		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , (_("<")) , Common::U32String(""), kDelCmd);
 	// I18N: Pre means 'Predictive', leave '*' as is
-	_button[kModeAct] = new ButtonWidget(this, "Predictive.Pre", Common::convertToU32String(_("*  Pre")), nullptr, kModeCmd);
-	_editText = new EditTextWidget(this, "Predictive.Word", _search, nullptr, 0, 0);
+	_button[kModeAct] = new ButtonWidget(this, "Predictive.Pre", _("*  Pre"), Common::U32String(""), kModeCmd);
+	_editText = new EditTextWidget(this, "Predictive.Word", _search, Common::U32String(""), 0, 0);
 
 	_userDictHasChanged = false;
 
@@ -190,7 +190,7 @@ void PredictiveDialog::reflowLayout() {
 		((PicButtonWidget *)_button[kDelAct])->useThemeTransparency(true);
 		((PicButtonWidget *)_button[kDelAct])->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelButton));
 	} else {
-		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , Common::convertToU32String(_("<")) , nullptr, kDelCmd);
+		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , (_("<")) , Common::U32String(""), kDelCmd);
 	}
 #endif
 
@@ -485,7 +485,7 @@ void PredictiveDialog::processButton(ButtonId button) {
 		"next",    "add",
 		"<",
 		"Cancel",  "OK",
-		"Pre", "(0) ", nullptr
+		"Pre", "(0) ", ""
 	};
 
 	if (_mode == kModeAbc) {
@@ -603,13 +603,13 @@ void PredictiveDialog::processButton(ButtonId button) {
 			if (_mode > kModeAbc) {
 				_mode = kModePre;
 				// I18N: Pre means 'Predictive', leave '*' as is
-				_button[kModeAct]->setLabel(Common::convertToU32String(_("*  Pre")));
+				_button[kModeAct]->setLabel((_("*  Pre")));
 			} else if (_mode == kModeNum) {
 				// I18N: 'Num' means Numbers
-				_button[kModeAct]->setLabel(Common::convertToU32String(_("*  Num")));
+				_button[kModeAct]->setLabel((_("*  Num")));
 			} else {
 				// I18N: 'Abc' means Latin alphabet input
-				_button[kModeAct]->setLabel(Common::convertToU32String(_("*  Abc")));
+				_button[kModeAct]->setLabel((_("*  Abc")));
 				_button[kAddAct]->setEnabled(true);
 			}
 
@@ -1024,7 +1024,7 @@ void PredictiveDialog::loadAllDictionary(Dict &dict) {
 void PredictiveDialog::pressEditText() {
 	Common::strlcpy(_predictiveResult, _prefix.c_str(), sizeof(_predictiveResult));
 	Common::strlcat(_predictiveResult, _currentWord.c_str(), sizeof(_predictiveResult));
-	_editText->setEditString(Common::convertToU32String(_predictiveResult));
+	_editText->setEditString(Common::convertToU32String((_predictiveResult)));
 	//_editText->setCaretPos(_prefix.size() + _currentWord.size());
 	_editText->markAsDirty();
 }
diff --git a/gui/recorderdialog.cpp b/gui/recorderdialog.cpp
index 62999ca3b6..fb7e4f8842 100644
--- a/gui/recorderdialog.cpp
+++ b/gui/recorderdialog.cpp
@@ -64,12 +64,12 @@ RecorderDialog::RecorderDialog() : Dialog("RecorderDialog"), _list(nullptr), _cu
 	_list = new GUI::ListWidget(this, "RecorderDialog.List");
 	_list->setNumberingMode(GUI::kListNumberingOff);
 
-	_deleteButton = new GUI::ButtonWidget(this, "RecorderDialog.Delete", _("Delete"), nullptr, kDeleteCmd);
-	new GUI::ButtonWidget(this, "RecorderDialog.Cancel", _("Cancel"), nullptr, kCloseCmd);
-	new GUI::ButtonWidget(this, "RecorderDialog.Record", _("Record"), nullptr, kRecordCmd);
-	_playbackButton = new GUI::ButtonWidget(this, "RecorderDialog.Playback", _("Playback"), nullptr, kPlaybackCmd);
+	_deleteButton = new GUI::ButtonWidget(this, "RecorderDialog.Delete", _("Delete"), Common::U32String(""), kDeleteCmd);
+	new GUI::ButtonWidget(this, "RecorderDialog.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
+	new GUI::ButtonWidget(this, "RecorderDialog.Record", _("Record"), Common::U32String(""), kRecordCmd);
+	_playbackButton = new GUI::ButtonWidget(this, "RecorderDialog.Playback", _("Playback"), Common::U32String(""), kPlaybackCmd);
 
-	_editButton = new GUI::ButtonWidget(this, "RecorderDialog.Edit", _("Edit"), nullptr, kEditRecordCmd);
+	_editButton = new GUI::ButtonWidget(this, "RecorderDialog.Edit", _("Edit"), Common::U32String(""), kEditRecordCmd);
 
 	_editButton->setEnabled(false);
 	_deleteButton->setEnabled(false);
@@ -78,8 +78,8 @@ RecorderDialog::RecorderDialog() : Dialog("RecorderDialog"), _list(nullptr), _cu
 	_gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 10, 10);
 	_container = new GUI::ContainerWidget(this, "RecorderDialog.Thumbnail");
 	if (g_gui.xmlEval()->getVar("Globals.RecorderDialog.ExtInfo.Visible") == 1) {
-		new GUI::ButtonWidget(this,"RecorderDialog.NextScreenShotButton", "<", nullptr, kPrevScreenshotCmd);
-		new GUI::ButtonWidget(this, "RecorderDialog.PreviousScreenShotButton", ">", nullptr, kNextScreenshotCmd);
+		new GUI::ButtonWidget(this,"RecorderDialog.NextScreenShotButton", "<", Common::U32String(""), kPrevScreenshotCmd);
+		new GUI::ButtonWidget(this, "RecorderDialog.PreviousScreenShotButton", ">", Common::U32String(""), kNextScreenshotCmd);
 		_currentScreenshotText = new StaticTextWidget(this, "RecorderDialog.currentScreenshot", "0/0");
 		_authorText = new StaticTextWidget(this, "RecorderDialog.Author", _("Author: "));
 		_notesText = new StaticTextWidget(this, "RecorderDialog.Notes", _("Notes: "));
@@ -168,7 +168,7 @@ void RecorderDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 		TimeDate t;
 		QualifiedGameDescriptor desc = EngineMan.findTarget(_target);
 		g_system->getTimeAndDate(t);
-		EditRecordDialog editDlg(_("Unknown Author"), Common::String::format("%.2d.%.2d.%.4d ", t.tm_mday, t.tm_mon, 1900 + t.tm_year) + desc.description, "");
+		EditRecordDialog editDlg(_("Unknown Author"), Common::String::format("%.2d.%.2d.%.4d ", t.tm_mday, t.tm_mon, 1900 + t.tm_year) + desc.description, Common::U32String(""));
 		if (editDlg.runModal() != kOKCmd) {
 			return;
 		}
diff --git a/gui/remotebrowser.cpp b/gui/remotebrowser.cpp
index ad8bb4fc20..78dbe75ea8 100644
--- a/gui/remotebrowser.cpp
+++ b/gui/remotebrowser.cpp
@@ -41,12 +41,12 @@ enum {
 	kGoUpCmd = 'GoUp'
 };
 
-RemoteBrowserDialog::RemoteBrowserDialog(const char *title):
+RemoteBrowserDialog::RemoteBrowserDialog(const Common::U32String &title):
 	Dialog("Browser"), _navigationLocked(false), _updateList(false), _showError(false),
 	_workingRequest(nullptr), _ignoreCallback(false) {
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
-	new StaticTextWidget(this, "Browser.Headline", Common::convertToU32String(title));
+	new StaticTextWidget(this, "Browser.Headline", title);
 	_currentPath = new StaticTextWidget(this, "Browser.Path", Common::convertToU32String("DUMMY"));
 
 	_fileList = new ListWidget(this, "Browser.List");
@@ -54,11 +54,11 @@ RemoteBrowserDialog::RemoteBrowserDialog(const char *title):
 	_fileList->setEditable(false);
 
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(this, "Browser.Up", Common::convertToU32String(_("Go up")), _("Go to previous directory level"), kGoUpCmd);
+		new ButtonWidget(this, "Browser.Up", (_("Go up")), _("Go to previous directory level"), kGoUpCmd);
 	else
-		new ButtonWidget(this, "Browser.Up", Common::convertToU32String(_c("Go up", "lowres")), _("Go to previous directory level"), kGoUpCmd);
-	new ButtonWidget(this, "Browser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
-	new ButtonWidget(this, "Browser.Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
+		new ButtonWidget(this, "Browser.Up", (_c("Go up", "lowres")), _("Go to previous directory level"), kGoUpCmd);
+	new ButtonWidget(this, "Browser.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "Browser.Choose", (_("Choose")), Common::U32String(""), kChooseCmd);
 }
 
 RemoteBrowserDialog::~RemoteBrowserDialog() {
diff --git a/gui/remotebrowser.h b/gui/remotebrowser.h
index df75aac294..47e636b9fc 100644
--- a/gui/remotebrowser.h
+++ b/gui/remotebrowser.h
@@ -38,7 +38,7 @@ class CommandSender;
 
 class RemoteBrowserDialog : public Dialog {
 public:
-	RemoteBrowserDialog(const char *title);
+	RemoteBrowserDialog(const Common::U32String &title);
 	~RemoteBrowserDialog() override;
 
 	void open() override;
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 482ba72e4e..0379fc5f4f 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -57,8 +57,8 @@ SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(bool canRunInBa
 	_progressBar->setValue(progress);
 	_progressBar->setEnabled(false);
 	_percentLabel = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.PercentText", Common::String::format("%u %%", progress));
-	new ButtonWidget(this, "SaveLoadCloudSyncProgress.Cancel", Common::convertToU32String("Cancel"), nullptr, kCancelSyncCmd, Common::ASCII_ESCAPE);	// Cancel dialog
-	ButtonWidget *backgroundButton = new ButtonWidget(this, "SaveLoadCloudSyncProgress.Background", Common::convertToU32String("Run in background"), nullptr, kBackgroundSyncCmd, Common::ASCII_RETURN);	// Confirm dialog
+	new ButtonWidget(this, "SaveLoadCloudSyncProgress.Cancel", Common::convertToU32String("Cancel"), Common::U32String(""), kCancelSyncCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+	ButtonWidget *backgroundButton = new ButtonWidget(this, "SaveLoadCloudSyncProgress.Background", Common::convertToU32String("Run in background"), Common::U32String(""), kBackgroundSyncCmd, Common::ASCII_RETURN);	// Confirm dialog
 	backgroundButton->setEnabled(canRunInBackground);
 	g_gui.scheduleTopDialogRedraw();
 }
@@ -340,15 +340,15 @@ void SaveLoadChooserDialog::addChooserButtons() {
 		delete _gridButton;
 	}
 
-	_listButton = createSwitchButton("SaveLoadChooser.ListSwitch", "L", _("List view"), ThemeEngine::kImageList, kListSwitchCmd);
-	_gridButton = createSwitchButton("SaveLoadChooser.GridSwitch", "G", _("Grid view"), ThemeEngine::kImageGrid, kGridSwitchCmd);
+	_listButton = createSwitchButton("SaveLoadChooser.ListSwitch", Common::U32String("L"), _("List view"), ThemeEngine::kImageList, kListSwitchCmd);
+	_gridButton = createSwitchButton("SaveLoadChooser.GridSwitch", Common::U32String("G"), _("Grid view"), ThemeEngine::kImageGrid, kGridSwitchCmd);
 	if (!_metaInfoSupport || !_thumbnailSupport || !(g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400)) {
 		_gridButton->setEnabled(false);
 		_listButton->setEnabled(false);
 	}
 }
 
-ButtonWidget *SaveLoadChooserDialog::createSwitchButton(const Common::String &name, const char *desc, const char *tooltip, const char *image, uint32 cmd) {
+ButtonWidget *SaveLoadChooserDialog::createSwitchButton(const Common::String &name, Common::U32String desc, Common::U32String tooltip, const char *image, uint32 cmd) {
 	ButtonWidget *button;
 
 #ifndef DISABLE_FANCY_THEMES
@@ -358,7 +358,7 @@ ButtonWidget *SaveLoadChooserDialog::createSwitchButton(const Common::String &na
 		((PicButtonWidget *)button)->setGfx(g_gui.theme()->getImageSurface(image));
 	} else
 #endif
-		button = new ButtonWidget(this, name, Common::convertToU32String(desc), tooltip, cmd);
+		button = new ButtonWidget(this, name, desc, tooltip, cmd);
 
 	return button;
 }
@@ -385,16 +385,16 @@ SaveLoadChooserSimple::SaveLoadChooserSimple(const U32String &title, const U32St
 
 	_gfxWidget = new GraphicsWidget(this, 0, 0, 10, 10);
 
-	_date = new StaticTextWidget(this, 0, 0, 10, 10, Common::convertToU32String(_("No date saved")), Graphics::kTextAlignCenter);
-	_time = new StaticTextWidget(this, 0, 0, 10, 10, Common::convertToU32String(_("No time saved")), Graphics::kTextAlignCenter);
-	_playtime = new StaticTextWidget(this, 0, 0, 10, 10, Common::convertToU32String(_("No playtime saved")), Graphics::kTextAlignCenter);
+	_date = new StaticTextWidget(this, 0, 0, 10, 10, (_("No date saved")), Graphics::kTextAlignCenter);
+	_time = new StaticTextWidget(this, 0, 0, 10, 10, (_("No time saved")), Graphics::kTextAlignCenter);
+	_playtime = new StaticTextWidget(this, 0, 0, 10, 10, (_("No playtime saved")), Graphics::kTextAlignCenter);
 
 	// Buttons
-	new ButtonWidget(this, "SaveLoadChooser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
-	_chooseButton = new ButtonWidget(this, "SaveLoadChooser.Choose", buttonLabel, nullptr, kChooseCmd);
+	new ButtonWidget(this, "SaveLoadChooser.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
+	_chooseButton = new ButtonWidget(this, "SaveLoadChooser.Choose", buttonLabel, Common::U32String(""), kChooseCmd);
 	_chooseButton->setEnabled(false);
 
-	_deleteButton = new ButtonWidget(this, "SaveLoadChooser.Delete", Common::convertToU32String(_("Delete")), nullptr, kDelCmd);
+	_deleteButton = new ButtonWidget(this, "SaveLoadChooser.Delete", (_("Delete")), Common::U32String(""), kDelCmd);
 	_deleteButton->setEnabled(false);
 
 	_delSupport = _metaInfoSupport = _thumbnailSupport = false;
@@ -564,9 +564,9 @@ void SaveLoadChooserSimple::updateSelection(bool redraw) {
 	// We used to support letting the themes specify the fill color with our
 	// initial theme based GUI. But this support was dropped.
 	_gfxWidget->setGfx(-1, -1, 0, 0, 0);
-	_date->setLabel(Common::convertToU32String(_("No date saved")));
-	_time->setLabel(Common::convertToU32String(_("No time saved")));
-	_playtime->setLabel(Common::convertToU32String(_("No playtime saved")));
+	_date->setLabel((_("No date saved")));
+	_time->setLabel((_("No time saved")));
+	_playtime->setLabel((_("No playtime saved")));
 
 	if (selItem >= 0 && _metaInfoSupport) {
 		SaveStateDescriptor desc = (_saveList[selItem].getLocked() ? _saveList[selItem] : _metaEngine->querySaveMetaInfos(_target.c_str(), _saveList[selItem].getSaveSlot()));
@@ -599,7 +599,7 @@ void SaveLoadChooserSimple::updateSelection(bool redraw) {
 		}
 
 		if (_playTimeSupport) {
-			const Common::String &playTime = desc.getPlayTime();
+			const Common::U32String &playTime = desc.getPlayTime();
 			if (!playTime.empty())
 				_playtime->setLabel(_("Playtime: ") + playTime);
 		}
@@ -683,7 +683,7 @@ void SaveLoadChooserSimple::updateSaveList() {
 		saveSlot = x->getSaveSlot();
 		if (curSlot < saveSlot) {
 			while (curSlot < saveSlot) {
-				SaveStateDescriptor dummySave(curSlot, "");
+				SaveStateDescriptor dummySave(curSlot, Common::U32String(""));
 				_saveList.insert_at(curSlot, dummySave);
 				saveNames.push_back(dummySave.getDescription());
 				colors.push_back(ThemeEngine::kFontColorNormal);
@@ -698,8 +698,8 @@ void SaveLoadChooserSimple::updateSaveList() {
 		}
 
 		// Show "Untitled saved game" for empty/whitespace saved game descriptions
-		Common::String description = x->getDescription();
-		Common::String trimmedDescription = description;
+		Common::U32String description = x->getDescription();
+		Common::U32String trimmedDescription = description;
 		trimmedDescription.trim();
 		if (trimmedDescription.empty()) {
 			description = _("Untitled saved game");
@@ -727,7 +727,7 @@ void SaveLoadChooserSimple::updateSaveList() {
 	Common::String emptyDesc;
 	for (int i = curSlot; i <= maximumSaveSlots; i++) {
 		saveNames.push_back(emptyDesc);
-		SaveStateDescriptor dummySave(i, "");
+		SaveStateDescriptor dummySave(i, Common::U32String(""));
 		_saveList.push_back(dummySave);
 		colors.push_back(ThemeEngine::kFontColorNormal);
 	}
@@ -764,11 +764,11 @@ SaveLoadChooserGrid::SaveLoadChooserGrid(const Common::U32String &title, bool sa
 	list->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
 
 	// Buttons
-	new ButtonWidget(this, "SaveLoadChooser.Delete", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
-	_nextButton = new ButtonWidget(this, "SaveLoadChooser.Choose", Common::convertToU32String(_("Next")), nullptr, kNextCmd);
+	new ButtonWidget(this, "SaveLoadChooser.Delete", (_("Cancel")), Common::U32String(""), kCloseCmd);
+	_nextButton = new ButtonWidget(this, "SaveLoadChooser.Choose", (_("Next")), Common::U32String(""), kNextCmd);
 	_nextButton->setEnabled(false);
 
-	_prevButton = new ButtonWidget(this, "SaveLoadChooser.Cancel", Common::convertToU32String(_("Prev")), nullptr, kPrevCmd);
+	_prevButton = new ButtonWidget(this, "SaveLoadChooser.Cancel", (_("Prev")), Common::U32String(""), kPrevCmd);
 	_prevButton->setEnabled(false);
 
 	// Page display
@@ -975,7 +975,7 @@ void SaveLoadChooserGrid::reflowLayout() {
 			// In the save mode we will always create a new save button as the first button.
 			if (_saveMode && curLine == 0 && curColumn == 0) {
 				_newSaveContainer = new ContainerWidget(this, curX, y, containerWidth, containerHeight);
-				ButtonWidget *newSave = new ButtonWidget(_newSaveContainer, dstX, dstY, buttonWidth, buttonHeight, Common::convertToU32String(_("New Save")), _("Create a new saved game"), kNewSaveCmd);
+				ButtonWidget *newSave = new ButtonWidget(_newSaveContainer, dstX, dstY, buttonWidth, buttonHeight, (_("New Save")), _("Create a new saved game"), kNewSaveCmd);
 				// In case no more slots are free, we will disable the new save button
 				if (_nextFreeSaveSlot == -1) {
 					newSave->setEnabled(false);
@@ -994,7 +994,7 @@ void SaveLoadChooserGrid::reflowLayout() {
 				buttonCmd += 1;
 			}
 
-			PicButtonWidget *button = new PicButtonWidget(container, dstX, dstY, buttonWidth, buttonHeight, nullptr, buttonCmd);
+			PicButtonWidget *button = new PicButtonWidget(container, dstX, dstY, buttonWidth, buttonHeight, Common::U32String(""), buttonCmd);
 			dstY += buttonHeight;
 
 			StaticTextWidget *description = new StaticTextWidget(container, dstX, dstY, buttonWidth, kLineHeight, Common::String(), Graphics::kTextAlignStart);
@@ -1104,27 +1104,27 @@ void SaveLoadChooserGrid::updateSaves() {
 		}
 		curButton.description->setLabel(Common::String::format("%d. %s", saveSlot, desc.getDescription().c_str()));
 
-		Common::String tooltip(_("Name: "));
+		Common::U32String tooltip(_("Name: "));
 		tooltip += desc.getDescription();
 
 		if (_saveDateSupport) {
 			const Common::String &saveDate = desc.getSaveDate();
 			if (!saveDate.empty()) {
-				tooltip += "\n";
+				tooltip += Common::U32String("\n");
 				tooltip +=  _("Date: ") + saveDate;
 			}
 
 			const Common::String &saveTime = desc.getSaveTime();
 			if (!saveTime.empty()) {
-				tooltip += "\n";
+				tooltip += Common::U32String("\n");
 				tooltip += _("Time: ") + saveTime;
 			}
 		}
 
 		if (_playTimeSupport) {
-			const Common::String &playTime = desc.getPlayTime();
+			const Common::U32String &playTime = desc.getPlayTime();
 			if (!playTime.empty()) {
-				tooltip += "\n";
+				tooltip += Common::U32String("\n");
 				tooltip += _("Playtime: ") + playTime;
 			}
 		}
@@ -1162,10 +1162,10 @@ SavenameDialog::SavenameDialog()
 	: Dialog("SavenameDialog") {
 	_title = new StaticTextWidget(this, "SavenameDialog.DescriptionText", Common::String());
 
-	new ButtonWidget(this, "SavenameDialog.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
-	new ButtonWidget(this, "SavenameDialog.Ok", Common::convertToU32String(_("OK")), nullptr, kOKCmd);
+	new ButtonWidget(this, "SavenameDialog.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "SavenameDialog.Ok", _("OK"), Common::U32String(""), kOKCmd);
 
-	_description = new EditTextWidget(this, "SavenameDialog.Description", Common::String(), nullptr, 0, kOKCmd);
+	_description = new EditTextWidget(this, "SavenameDialog.Description", Common::String(), Common::U32String(""), 0, kOKCmd);
 
 	_targetSlot = 0;
 }
@@ -1182,7 +1182,7 @@ void SavenameDialog::open() {
 	Dialog::open();
 	setResult(-1);
 
-	_title->setLabel(Common::String::format(_("Enter a description for slot %d:"), _targetSlot));
+	_title->setLabel(Common::String::format(Common::convertFromU32String(_("Enter a description for slot %d:")).c_str(), _targetSlot));
 }
 
 void SavenameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h
index 27b8a6683c..de517a8caf 100644
--- a/gui/saveload-dialog.h
+++ b/gui/saveload-dialog.h
@@ -126,7 +126,7 @@ protected:
 	ButtonWidget *_gridButton;
 
 	void addChooserButtons();
-	ButtonWidget *createSwitchButton(const Common::String &name, const char *desc, const char *tooltip, const char *image, uint32 cmd = 0);
+	ButtonWidget *createSwitchButton(const Common::String &name, Common::U32String desc, Common::U32String tooltip, const char *image, uint32 cmd = 0);
 #endif // !DISABLE_SAVELOADCHOOSER_GRID
 };
 
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp
index b6d0894f66..212b821055 100644
--- a/gui/themebrowser.cpp
+++ b/gui/themebrowser.cpp
@@ -42,7 +42,7 @@ enum {
 ThemeBrowser::ThemeBrowser() : Dialog("Browser") {
 	_fileList = nullptr;
 
-	new StaticTextWidget(this, "Browser.Headline", Common::convertToU32String(_("Select a Theme")));
+	new StaticTextWidget(this, "Browser.Headline", (_("Select a Theme")));
 
 	// Add file list
 	_fileList = new ListWidget(this, "Browser.List");
@@ -52,8 +52,8 @@ ThemeBrowser::ThemeBrowser() : Dialog("Browser") {
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
 	// Buttons
-	new ButtonWidget(this, "Browser.Cancel", Common::convertToU32String(_("Cancel")), nullptr, kCloseCmd);
-	new ButtonWidget(this, "Browser.Choose", Common::convertToU32String(_("Choose")), nullptr, kChooseCmd);
+	new ButtonWidget(this, "Browser.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "Browser.Choose", (_("Choose")), Common::U32String(""), kChooseCmd);
 }
 
 void ThemeBrowser::open() {
diff --git a/gui/themes/scummtheme.py b/gui/themes/scummtheme.py
old mode 100755
new mode 100644
diff --git a/gui/unknown-game-dialog.cpp b/gui/unknown-game-dialog.cpp
index 9ea1150f4f..ce8169cf45 100644
--- a/gui/unknown-game-dialog.cpp
+++ b/gui/unknown-game-dialog.cpp
@@ -46,22 +46,22 @@ UnknownGameDialog::UnknownGameDialog(const DetectedGame &detectedGame) :
 		_detectedGame(detectedGame) {
 
 	if (detectedGame.canBeAdded) {
-		_addAnywayButton = new ButtonWidget(this, "UnknownGameDialog.Add", Common::convertToU32String(_("Add anyway")), nullptr, kAddAnyway);
+		_addAnywayButton = new ButtonWidget(this, "UnknownGameDialog.Add", (_("Add anyway")), Common::U32String(""), kAddAnyway);
 	} else {
 		_addAnywayButton = nullptr;
 	}
 
-	_closeButton = new ButtonWidget(this, "UnknownGameDialog.Close", detectedGame.canBeAdded ? Common::convertToU32String(_("Cancel")) : Common::convertToU32String(_("Close")), nullptr, kClose);
+	_closeButton = new ButtonWidget(this, "UnknownGameDialog.Close", detectedGame.canBeAdded ? (_("Cancel")) : (_("Close")), Common::U32String(""), kClose);
 
 	//Check if we have clipboard functionality
 	if (g_system->hasFeature(OSystem::kFeatureClipboardSupport)) {
-		_copyToClipboardButton = new ButtonWidget(this, "UnknownGameDialog.Copy", Common::convertToU32String(_("Copy to clipboard")), nullptr, kCopyToClipboard);
+		_copyToClipboardButton = new ButtonWidget(this, "UnknownGameDialog.Copy", (_("Copy to clipboard")), Common::U32String(""), kCopyToClipboard);
 	} else
 		_copyToClipboardButton = nullptr;
 
 	//Check if we have support for opening URLs
 	if (g_system->hasFeature(OSystem::kFeatureOpenUrl)) {
-		_openBugTrackerUrlButton = new ButtonWidget(this, "UnknownGameDialog.Report", Common::convertToU32String(_("Report game")), nullptr, kOpenBugtrackerURL);
+		_openBugTrackerUrlButton = new ButtonWidget(this, "UnknownGameDialog.Report", (_("Report game")), Common::U32String(""), kOpenBugtrackerURL);
 	} else
 		_openBugTrackerUrlButton = nullptr;
 
@@ -93,21 +93,21 @@ void UnknownGameDialog::rebuild() {
 	}
 	_textWidgets.clear();
 
-	Common::String reportTranslated = generateUnknownGameReport(_detectedGame, true, true);
+	Common::U32String reportTranslated = generateUnknownGameReport(_detectedGame, true, true);
 
 	// Check if we have clipboard functionality and expand the reportTranslated message if needed...
 	if (g_system->hasFeature(OSystem::kFeatureClipboardSupport)) {
-		reportTranslated += "\n";
+		reportTranslated += Common::U32String("\n");
 		reportTranslated += _("Use the button below to copy the required game information into your clipboard.");
 	}
 	// Check if we have support for opening URLs and expand the reportTranslated message if needed...
 	if (g_system->hasFeature(OSystem::kFeatureOpenUrl)) {
-		reportTranslated += "\n";
+		reportTranslated += Common::U32String("\n");
 		reportTranslated += _("You can also directly report your game to the Bug Tracker.");
 	}
 
 	// We use a ScrollContainer to display the text, with a 2 * 10 margin for the text in the container.
-	Common::Array<Common::String> lines;
+	Common::Array<Common::U32String> lines;
 	g_gui.getFont().wordWrapText(reportTranslated, _textContainer->getWidth() - 20, lines);
 
 	// Create text widgets
diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
index d9473cabb5..c6a536e709 100644
--- a/gui/updates-dialog.cpp
+++ b/gui/updates-dialog.cpp
@@ -113,7 +113,7 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 	int buttonPos = _w - buttonWidth - 10;
 
 	_proceedButton = new ButtonWidget(this, buttonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight,
-				_("Proceed"), nullptr, kProceedCmd, Common::ASCII_RETURN);
+				_("Proceed"), Common::U32String(""), kProceedCmd, Common::ASCII_RETURN);
 }
 
 void UpdatesDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 3f41b5e7c1..f89dbfe23c 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -37,13 +37,13 @@
 
 namespace GUI {
 
-Widget::Widget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip)
+Widget::Widget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip)
 	: GuiObject(x, y, w, h), _type(0), _boss(boss), _tooltip(tooltip),
 	  _flags(0), _hasFocus(false), _state(ThemeEngine::kStateEnabled) {
 	init();
 }
 
-Widget::Widget(GuiObject *boss, const Common::String &name, const char *tooltip)
+Widget::Widget(GuiObject *boss, const Common::String &name, Common::U32String tooltip)
 	: GuiObject(name), _type(0), _boss(boss), _tooltip(tooltip),
 	  _flags(0), _hasFocus(false), _state(ThemeEngine::kStateDisabled) {
 	init();
@@ -291,7 +291,7 @@ void Widget::read(Common::String str) {
 
 #pragma mark -
 
-StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, const char *tooltip, ThemeEngine::FontStyle font)
+StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, Common::U32String tooltip, ThemeEngine::FontStyle font)
 	: Widget(boss, x, y, w, h, tooltip), _align(align) {
 	setFlags(WIDGET_ENABLED);
 	_type = kStaticTextWidget;
@@ -300,7 +300,7 @@ StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h,
 	_align = Graphics::convertTextAlignH(align, g_gui.useRTL() && _useRTL);
 }
 
-StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::U32String &text, const char *tooltip, ThemeEngine::FontStyle font)
+StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::U32String &text, Common::U32String tooltip, ThemeEngine::FontStyle font)
 	: Widget(boss, name, tooltip) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG);
 	_type = kStaticTextWidget;
@@ -342,7 +342,7 @@ void StaticTextWidget::drawWidget() {
 
 #pragma mark -
 
-ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
+ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
 	: StaticTextWidget(boss, x, y, w, h, cleanupHotkey(label), Graphics::kTextAlignCenter, tooltip), CommandSender(boss),
 	  _cmd(cmd), _hotkey(hotkey), _duringPress(false) {
 
@@ -353,7 +353,7 @@ ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Co
 	_type = kButtonWidget;
 }
 
-ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
+ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
 	: StaticTextWidget(boss, name, cleanupHotkey(label), tooltip), CommandSender(boss),
 	  _cmd(cmd), _hotkey(hotkey), _duringPress(false) {
 	if (hotkey == 0)
@@ -396,17 +396,17 @@ ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32
 #ifndef DISABLE_FANCY_THEMES
 	if (g_gui.xmlEval()->getVar("Globals.ShowSearchPic") == 1 && g_gui.theme()->supportsImages()) {
 		if (!name.empty())
-			button = new PicButtonWidget(boss, name, _("Clear value"), cmd);
+			button = new PicButtonWidget(boss, name, (_("Clear value")), cmd);
 		else
-			button = new PicButtonWidget(boss, x, y, w, h, _("Clear value"), cmd);
+			button = new PicButtonWidget(boss, x, y, w, h, (_("Clear value")), cmd);
 		((PicButtonWidget *)button)->useThemeTransparency(true);
 		((PicButtonWidget *)button)->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageEraser));
 	} else
 #endif
 		if (!name.empty())
-			button = new ButtonWidget(boss, name, Common::convertToU32String("C"), _("Clear value"), cmd);
+			button = new ButtonWidget(boss, name, Common::convertToU32String("C"), (_("Clear value")), cmd);
 		else
-			button = new ButtonWidget(boss, x, y, w, h, Common::convertToU32String("C"), _("Clear value"), cmd);
+			button = new ButtonWidget(boss, x, y, w, h, Common::convertToU32String("C"), (_("Clear value")), cmd);
 
 	return button;
 }
@@ -429,14 +429,14 @@ void ButtonWidget::setUnpressedState() {
 
 #pragma mark -
 
-DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey) :
+DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, Common::U32String tooltip, uint32 cmd, uint8 hotkey) :
 		ButtonWidget(boss, x, y, w, h, label, tooltip, cmd, hotkey) {
 	setFlags(getFlags() | WIDGET_TRACK_MOUSE);
 
 	reset();
 }
 
-DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey) :
+DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, Common::U32String tooltip, uint32 cmd, uint8 hotkey) :
 		ButtonWidget(boss, name, label, tooltip, cmd, hotkey) {
 	setFlags(getFlags() | WIDGET_TRACK_MOUSE);
 
@@ -535,7 +535,7 @@ void DropdownButtonWidget::drawWidget() {
 
 #pragma mark -
 
-PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd, uint8 hotkey)
+PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
 	: ButtonWidget(boss, x, y, w, h, Common::convertToU32String(""), tooltip, cmd, hotkey),
 	  _alpha(255), _transparency(false), _showButton(true) {
 
@@ -543,7 +543,7 @@ PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, co
 	_type = kButtonWidget;
 }
 
-PicButtonWidget::PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip, uint32 cmd, uint8 hotkey)
+PicButtonWidget::PicButtonWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
 	: ButtonWidget(boss, name, Common::convertToU32String(""), tooltip, cmd, hotkey),
 	  _alpha(255), _transparency(false), _showButton(true) {
 	setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG);
@@ -617,13 +617,13 @@ void PicButtonWidget::drawWidget() {
 
 #pragma mark -
 
-CheckboxWidget::CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
+CheckboxWidget::CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
 	: ButtonWidget(boss, x, y, w, h, label, tooltip, cmd, hotkey), _state(false) {
 	setFlags(WIDGET_ENABLED);
 	_type = kCheckboxWidget;
 }
 
-CheckboxWidget::CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip, uint32 cmd, uint8 hotkey)
+CheckboxWidget::CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
 	: ButtonWidget(boss, name, label, tooltip, cmd, hotkey), _state(false) {
 	setFlags(WIDGET_ENABLED);
 	_type = kCheckboxWidget;
@@ -679,14 +679,14 @@ void RadiobuttonGroup::setEnabled(bool ena) {
 
 #pragma mark -
 
-RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::U32String &label, const char *tooltip, uint8 hotkey)
+RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::U32String &label, Common::U32String tooltip, uint8 hotkey)
 	: ButtonWidget(boss, x, y, w, h, label, tooltip, 0, hotkey), _state(false), _value(value), _group(group) {
 	setFlags(WIDGET_ENABLED);
 	_type = kRadiobuttonWidget;
 	_group->addButton(this);
 }
 
-RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::U32String &label, const char *tooltip, uint8 hotkey)
+RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::U32String &label, Common::U32String tooltip, uint8 hotkey)
 	: ButtonWidget(boss, name, label, tooltip, 0, hotkey), _state(false), _value(value), _group(group) {
 	setFlags(WIDGET_ENABLED);
 	_type = kRadiobuttonWidget;
@@ -720,14 +720,14 @@ void RadiobuttonWidget::drawWidget() {
 
 #pragma mark -
 
-SliderWidget::SliderWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd)
+SliderWidget::SliderWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip, uint32 cmd)
 	: Widget(boss, x, y, w, h, tooltip), CommandSender(boss),
 	  _cmd(cmd), _value(0), _oldValue(0), _valueMin(0), _valueMax(100), _isDragging(false), _labelWidth(0) {
 	setFlags(WIDGET_ENABLED | WIDGET_TRACK_MOUSE | WIDGET_CLEARBG);
 	_type = kSliderWidget;
 }
 
-SliderWidget::SliderWidget(GuiObject *boss, const Common::String &name, const char *tooltip, uint32 cmd)
+SliderWidget::SliderWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip, uint32 cmd)
 	: Widget(boss, name, tooltip), CommandSender(boss),
 	  _cmd(cmd), _value(0), _oldValue(0), _valueMin(0), _valueMax(100), _isDragging(false), _labelWidth(0) {
 	setFlags(WIDGET_ENABLED | WIDGET_TRACK_MOUSE | WIDGET_CLEARBG);
@@ -806,13 +806,13 @@ int SliderWidget::posToValue(int pos) {
 
 #pragma mark -
 
-GraphicsWidget::GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip)
+GraphicsWidget::GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip)
 	: Widget(boss, x, y, w, h, tooltip), _gfx(), _alpha(255), _transparency(false) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG);
 	_type = kGraphicsWidget;
 }
 
-GraphicsWidget::GraphicsWidget(GuiObject *boss, const Common::String &name, const char *tooltip)
+GraphicsWidget::GraphicsWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip)
 	: Widget(boss, name, tooltip), _gfx(), _alpha(255), _transparency(false) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG);
 	_type = kGraphicsWidget;
diff --git a/gui/widget.h b/gui/widget.h
index 7d1e796101..3709b4a133 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -103,7 +103,7 @@ protected:
 	Widget		*_next;
 	bool		_hasFocus;
 	ThemeEngine::WidgetStateInfo _state;
-	Common::String _tooltip;
+	Common::U32String _tooltip;
 
 private:
 	uint16		_flags;
@@ -115,8 +115,8 @@ public:
 	static bool containsWidgetInChain(Widget *start, Widget *search);
 
 public:
-	Widget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = nullptr);
-	Widget(GuiObject *boss, const Common::String &name, const char *tooltip = nullptr);
+	Widget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip = Common::U32String(""));
+	Widget(GuiObject *boss, const Common::String &name, Common::U32String tooltip = Common::U32String(""));
 	~Widget() override;
 
 	void init();
@@ -170,8 +170,8 @@ public:
 	Common::U32String cleanupHotkey(const Common::U32String &label);
 
 	bool hasTooltip() const { return !_tooltip.empty(); }
-	const Common::String &getTooltip() const { return _tooltip; }
-	void setTooltip(const Common::String &tooltip) { _tooltip = tooltip; }
+	const Common::U32String &getTooltip() const { return _tooltip; }
+	void setTooltip(const Common::U32String &tooltip) { _tooltip = tooltip; }
 
 	virtual bool containsWidget(Widget *) const { return false; }
 
@@ -200,8 +200,8 @@ protected:
 	Graphics::TextAlign		_align;
 	ThemeEngine::FontStyle	_font;
 public:
-	StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, const char *tooltip = nullptr, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
-	StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::U32String &text, const char *tooltip = nullptr, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
+	StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, Common::U32String tooltip = Common::U32String(""), ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
+	StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::U32String &text, Common::U32String tooltip = Common::U32String(""), ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
 	void setValue(int value);
 	void setLabel(const Common::U32String &label);
 	void handleMouseEntered(int button) override	{ readLabel(); }
@@ -221,8 +221,8 @@ protected:
 	uint32	_cmd;
 	uint8	_hotkey;
 public:
-	ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
-	ButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
+	ButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
 
 	void getMinSize(int &minWidth, int &minHeight) override;
 
@@ -247,8 +247,8 @@ protected:
 /* DropdownButtonWidget */
 class DropdownButtonWidget : public ButtonWidget {
 public:
-	DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
-	DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
+	DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
 
 	void handleMouseMoved(int x, int y, int button) override;
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
@@ -282,8 +282,8 @@ protected:
 /* PicButtonWidget */
 class PicButtonWidget : public ButtonWidget {
 public:
-	PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
-	PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
+	PicButtonWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
 	~PicButtonWidget() override;
 
 	void setGfx(const Graphics::Surface *gfx, int statenum = kPicButtonStateEnabled);
@@ -307,8 +307,8 @@ class CheckboxWidget : public ButtonWidget {
 protected:
 	bool	_state;
 public:
-	CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
-	CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const char *tooltip = nullptr, uint32 cmd = 0, uint8 hotkey = 0);
+	CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
+	CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
 
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
 	void handleMouseEntered(int button) override	{ readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
@@ -353,8 +353,8 @@ protected:
 	int _value;
 
 public:
-	RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::U32String &label, const char *tooltip = nullptr, uint8 hotkey = 0);
-	RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::U32String &label, const char *tooltip = nullptr, uint8 hotkey = 0);
+	RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint8 hotkey = 0);
+	RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint8 hotkey = 0);
 
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
 	void handleMouseEntered(int button) override	{ readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
@@ -380,8 +380,8 @@ protected:
 	bool	_isDragging;
 	uint	_labelWidth;
 public:
-	SliderWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = nullptr, uint32 cmd = 0);
-	SliderWidget(GuiObject *boss, const Common::String &name, const char *tooltip = nullptr, uint32 cmd = 0);
+	SliderWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0);
+	SliderWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0);
 
 	void setCmd(uint32 cmd)		{ _cmd = cmd; }
 	uint32 getCmd() const		{ return _cmd; }
@@ -412,8 +412,8 @@ protected:
 /* GraphicsWidget */
 class GraphicsWidget : public Widget {
 public:
-	GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = nullptr);
-	GraphicsWidget(GuiObject *boss, const Common::String &name, const char *tooltip = nullptr);
+	GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip = Common::U32String(""));
+	GraphicsWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip = Common::U32String(""));
 	~GraphicsWidget() override;
 
 	void setGfx(const Graphics::Surface *gfx);
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index bfbf25aa08..4e5a414355 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -28,12 +28,12 @@
 
 namespace GUI {
 
-EditableWidget::EditableWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd)
+EditableWidget::EditableWidget(GuiObject *boss, int x, int y, int w, int h, U32String tooltip, uint32 cmd)
 	: Widget(boss, x, y, w, h, tooltip), CommandSender(boss), _cmd(cmd) {
 	init();
 }
 
-EditableWidget::EditableWidget(GuiObject *boss, const String &name, const char *tooltip, uint32 cmd)
+EditableWidget::EditableWidget(GuiObject *boss, const String &name, U32String tooltip, uint32 cmd)
 	: Widget(boss, name, tooltip), CommandSender(boss), _cmd(cmd) {
 	init();
 }
diff --git a/gui/widgets/editable.h b/gui/widgets/editable.h
index 776bbae25f..cfffed0a7b 100644
--- a/gui/widgets/editable.h
+++ b/gui/widgets/editable.h
@@ -64,8 +64,8 @@ protected:
 	ThemeEngine::TextInversionState  _inversion;
 
 public:
-	EditableWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = nullptr, uint32 cmd = 0);
-	EditableWidget(GuiObject *boss, const String &name, const char *tooltip = nullptr, uint32 cmd = 0);
+	EditableWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0);
+	EditableWidget(GuiObject *boss, const String &name, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0);
 	~EditableWidget() override;
 
 	void init();
diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp
index 5f1ac81e9f..da480d7dda 100644
--- a/gui/widgets/edittext.cpp
+++ b/gui/widgets/edittext.cpp
@@ -28,7 +28,7 @@
 
 namespace GUI {
 
-EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &text, const char *tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font)
+EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &text, U32String tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font)
 	: EditableWidget(boss, x, y - 1, w, h + 2, tooltip, cmd) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE);
 	_type = kEditTextWidget;
@@ -40,7 +40,7 @@ EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, cons
 	_leftPadding = _rightPadding = 0;
 }
 
-EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const U32String &text, const char *tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font)
+EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const U32String &text, U32String tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font)
 	: EditableWidget(boss, name, tooltip, cmd) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE);
 	_type = kEditTextWidget;
diff --git a/gui/widgets/edittext.h b/gui/widgets/edittext.h
index b57ec7bc0e..fa9b84cc57 100644
--- a/gui/widgets/edittext.h
+++ b/gui/widgets/edittext.h
@@ -41,8 +41,8 @@ protected:
 	int				_rightPadding;
 
 public:
-	EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &text, const char *tooltip = nullptr, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
-	EditTextWidget(GuiObject *boss, const String &name, const U32String &text, const char *tooltp = nullptr, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
+	EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &text, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
+	EditTextWidget(GuiObject *boss, const String &name, const U32String &text, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
 
 	void setEditString(const U32String &str) override;
 
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index e0c6fb962f..da7e8f1bf4 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -33,7 +33,7 @@
 
 namespace GUI {
 
-ListWidget::ListWidget(Dialog *boss, const String &name, const char *tooltip, uint32 cmd)
+ListWidget::ListWidget(Dialog *boss, const String &name, U32String tooltip, uint32 cmd)
 	: EditableWidget(boss, name, tooltip), _cmd(cmd) {
 
 	_entriesPerPage = 0;
@@ -70,7 +70,7 @@ ListWidget::ListWidget(Dialog *boss, const String &name, const char *tooltip, ui
 	_scrollBarWidth = 0;
 }
 
-ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd)
+ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, U32String tooltip, uint32 cmd)
 	: EditableWidget(boss, x, y, w, h, tooltip), _cmd(cmd) {
 
 	_entriesPerPage = 0;
diff --git a/gui/widgets/list.h b/gui/widgets/list.h
index c2c0164ece..a62e363a91 100644
--- a/gui/widgets/list.h
+++ b/gui/widgets/list.h
@@ -92,8 +92,8 @@ protected:
 	int				_lastRead;
 
 public:
-	ListWidget(Dialog *boss, const String &name, const char *tooltip = nullptr, uint32 cmd = 0);
-	ListWidget(Dialog *boss, int x, int y, int w, int h, const char *tooltip = nullptr, uint32 cmd = 0);
+	ListWidget(Dialog *boss, const String &name, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0);
+	ListWidget(Dialog *boss, int x, int y, int w, int h, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0);
 
 	bool containsWidget(Widget *) const override;
 	Widget *findWidget(int x, int y) override;
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index 917c74cb0e..bf2fcff335 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -428,7 +428,7 @@ void PopUpDialog::drawMenuEntry(int entry, bool hilite) {
 // PopUpWidget
 //
 
-PopUpWidget::PopUpWidget(GuiObject *boss, const String &name, const char *tooltip)
+PopUpWidget::PopUpWidget(GuiObject *boss, const String &name, U32String tooltip)
 	: Widget(boss, name, tooltip), CommandSender(boss) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_IGNORE_DRAG);
 	_type = kPopUpWidget;
@@ -437,7 +437,7 @@ PopUpWidget::PopUpWidget(GuiObject *boss, const String &name, const char *toolti
 	_leftPadding = _rightPadding = 0;
 }
 
-PopUpWidget::PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip)
+PopUpWidget::PopUpWidget(GuiObject *boss, int x, int y, int w, int h, U32String tooltip)
 	: Widget(boss, x, y, w, h, tooltip), CommandSender(boss) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_IGNORE_DRAG);
 	_type = kPopUpWidget;
diff --git a/gui/widgets/popup.h b/gui/widgets/popup.h
index 095cf8a48d..b5e317549c 100644
--- a/gui/widgets/popup.h
+++ b/gui/widgets/popup.h
@@ -58,8 +58,8 @@ protected:
 	int				_rightPadding;
 
 public:
-	PopUpWidget(GuiObject *boss, const String &name, const char *tooltip = nullptr);
-	PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = nullptr);
+	PopUpWidget(GuiObject *boss, const String &name, U32String tooltip = U32String(""));
+	PopUpWidget(GuiObject *boss, int x, int y, int w, int h, U32String tooltip = U32String(""));
 
 	void handleMouseDown(int x, int y, int button, int clickCount) override;
 	void handleMouseWheel(int x, int y, int direction) override;
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp
index e60648f88c..b3f446ab08 100644
--- a/gui/widgets/tab.cpp
+++ b/gui/widgets/tab.cpp
@@ -73,8 +73,8 @@ void TabWidget::init() {
 	String leftArrow = g_gui.useRTL() ? ">" : "<";
 	String rightArrow = g_gui.useRTL() ? "<" : ">";
 
-	_navLeft = new ButtonWidget(this, x, y, _butW, _butH, Common::convertToU32String(leftArrow), nullptr, kCmdLeft);
-	_navRight = new ButtonWidget(this, x + _butW + 2, y, _butW, _butH, Common::convertToU32String(rightArrow), nullptr, kCmdRight);
+	_navLeft = new ButtonWidget(this, x, y, _butW, _butH, Common::convertToU32String(leftArrow), Common::U32String(""), kCmdLeft);
+	_navRight = new ButtonWidget(this, x + _butW + 2, y, _butW, _butH, Common::convertToU32String(rightArrow), Common::U32String(""), kCmdRight);
 
 	_navLeft->setEnabled(false);
 	_navRight->setEnabled(true);


Commit: 96912f4adbb2cd66540812bc587d1d798b87e247
    https://github.com/scummvm/scummvm/commit/96912f4adbb2cd66540812bc587d1d798b87e247
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Rename some references of strings to use U32() & not helper method

Changed paths:
    backends/keymapper/remap-widget.cpp
    engines/dialogs.cpp
    gui/browser.cpp
    gui/downloaddialog.cpp
    gui/editgamedialog.cpp
    gui/filebrowser-dialog.cpp
    gui/launcher.cpp
    gui/massadd.cpp
    gui/options.cpp
    gui/predictivedialog.cpp
    gui/remotebrowser.cpp
    gui/saveload-dialog.cpp
    gui/widget.cpp
    gui/widgets/tab.cpp


diff --git a/backends/keymapper/remap-widget.cpp b/backends/keymapper/remap-widget.cpp
index c5de0fe3d5..cb56ac16e1 100644
--- a/backends/keymapper/remap-widget.cpp
+++ b/backends/keymapper/remap-widget.cpp
@@ -219,8 +219,8 @@ void RemapWidget::startRemapping(uint actionIndex) {
 	_remapTimeout = g_system->getMillis() + kRemapTimeoutDelay;
 	_remapInputWatcher->startWatching();
 
-	_actions[actionIndex].keyButton->setLabel(Common::convertToU32String("..."));
-	_actions[actionIndex].keyButton->setTooltip(Common::convertToU32String(""));
+	_actions[actionIndex].keyButton->setLabel(U32String("..."));
+	_actions[actionIndex].keyButton->setTooltip(U32String(""));
 	_actions[actionIndex].keyButton->markAsDirty();
 
 	g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
@@ -301,8 +301,8 @@ void RemapWidget::refreshKeymap() {
 			row.keyButton->setLabel(keysLabel);
 			row.keyButton->setTooltip(keysLabel);
 		} else {
-			row.keyButton->setLabel(Common::convertToU32String("-"));
-			row.keyButton->setTooltip(Common::convertToU32String(""));
+			row.keyButton->setLabel(U32String("-"));
+			row.keyButton->setTooltip(U32String(""));
 		}
 
 		KeymapTitleRow &keymapTitle = _keymapSeparators[row.keymap];
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 0741bc8319..4399da8678 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -67,7 +67,7 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
 	title->setAlign(Graphics::kTextAlignCenter);
 #endif
 
-	GUI::StaticTextWidget *version = new GUI::StaticTextWidget(this, "GlobalMenu.Version", Common::convertToU32String(gScummVMVersionDate));
+	GUI::StaticTextWidget *version = new GUI::StaticTextWidget(this, "GlobalMenu.Version", Common::U32String(gScummVMVersionDate));
 	version->setAlign(Graphics::kTextAlignCenter);
 
 	new GUI::ButtonWidget(this, "GlobalMenu.Resume", (_("~R~esume")), Common::U32String(""), kPlayCmd, 'P');
@@ -186,7 +186,7 @@ void MainMenuDialog::reflowLayout() {
 	} else {
 		GUI::StaticTextWidget *title = (GUI::StaticTextWidget *)findWidget("GlobalMenu.Title");
 		if (!title) {
-			title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", Common::convertToU32String("ScummVM"));
+			title = new GUI::StaticTextWidget(this, "GlobalMenu.Title", Common::U32String("ScummVM"));
 			title->setAlign(Graphics::kTextAlignCenter);
 		}
 
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 80b9cad702..d2d5b80493 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -62,7 +62,7 @@ BrowserDialog::BrowserDialog(const Common::U32String &title, bool dirBrowser)
 	new StaticTextWidget(this, "Browser.Headline", title);
 
 	// Current path - TODO: handle long paths ?
-	_currentPath = new EditTextWidget(this, "Browser.Path", Common::convertToU32String(""), Common::U32String(""), 0, kPathEditedCmd);
+	_currentPath = new EditTextWidget(this, "Browser.Path", Common::U32String(""), Common::U32String(""), 0, kPathEditedCmd);
 
 	// Add file list
 	_fileList = new ListWidget(this, "Browser.List");
diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp
index 0b66770efc..8edf0435a5 100644
--- a/gui/downloaddialog.cpp
+++ b/gui/downloaddialog.cpp
@@ -58,8 +58,8 @@ DownloadDialog::DownloadDialog(uint32 storageId, LauncherDialog *launcher) :
 	_progressBar->setValue(progress);
 	_progressBar->setEnabled(false);
 	_percentLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.PercentText", Common::String::format("%u %%", progress));
-	_downloadSizeLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSize", Common::convertToU32String(""));
-	_downloadSpeedLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSpeed", Common::convertToU32String(""));
+	_downloadSizeLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSize", Common::U32String(""));
+	_downloadSpeedLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSpeed", Common::U32String(""));
 	if (g_system->getOverlayWidth() > 320)
 		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", (_("Cancel download")), Common::U32String(""), kDownloadDialogButtonCmd);
 	else
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index e24676321b..f83881773c 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -152,7 +152,7 @@ EditGameDialog::EditGameDialog(const String &domain)
 	_langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", (_("Language:")), _("Language of the game. This will not turn your Spanish game version into English"));
 	_langPopUp = new PopUpWidget(tab, "GameOptions_Game.LangPopup", _("Language of the game. This will not turn your Spanish game version into English"));
 	_langPopUp->appendEntry((_("<default>")), (uint32)Common::UNK_LANG);
-	_langPopUp->appendEntry(Common::convertToU32String(""), (uint32)Common::UNK_LANG);
+	_langPopUp->appendEntry(Common::U32String(""), (uint32)Common::UNK_LANG);
 	const Common::LanguageDescription *l = Common::g_languages;
 	for (; l->code; ++l) {
 		if (checkGameGUIOptionLanguage(l->id, _guioptionsString))
@@ -166,7 +166,7 @@ EditGameDialog::EditGameDialog(const String &domain)
 		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", (_c("Platform:", "lowres")), _("Platform the game was originally designed for"));
 	_platformPopUp = new PopUpWidget(tab, "GameOptions_Game.PlatformPopup", _("Platform the game was originally designed for"));
 	_platformPopUp->appendEntry((_("<default>")));
-	_platformPopUp->appendEntry(Common::convertToU32String(""));
+	_platformPopUp->appendEntry(Common::U32String(""));
 	const Common::PlatformDescription *p = Common::g_platforms;
 	for (; p->code; ++p) {
 		_platformPopUp->appendEntry(Common::convertToU32String(p->description), p->id);
diff --git a/gui/filebrowser-dialog.cpp b/gui/filebrowser-dialog.cpp
index 3493f32b7a..eccb682a2a 100644
--- a/gui/filebrowser-dialog.cpp
+++ b/gui/filebrowser-dialog.cpp
@@ -49,7 +49,7 @@ FileBrowserDialog::FileBrowserDialog(const char *title, const char *fileExtensio
 	new StaticTextWidget(this, "FileBrowser.Headline", title ? Common::convertToU32String(title) :
 					mode == kFBModeLoad ? (_("Choose file for loading")) : (_("Enter filename for saving")));
 
-	_fileName = new EditTextWidget(this, "FileBrowser.Filename", Common::convertToU32String(""));
+	_fileName = new EditTextWidget(this, "FileBrowser.Filename", Common::U32String(""));
 
 	if (mode == kFBModeLoad)
 		_fileName->setEnabled(false);
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 11bbe0f660..344870399d 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -129,9 +129,9 @@ void LauncherDialog::build() {
 		_logo->useThemeTransparency(true);
 		_logo->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageLogo));
 
-		new StaticTextWidget(this, "Launcher.Version", Common::convertToU32String(gScummVMVersionDate));
+		new StaticTextWidget(this, "Launcher.Version", Common::U32String(gScummVMVersionDate));
 	} else
-		new StaticTextWidget(this, "Launcher.Version", Common::convertToU32String(gScummVMFullVersion));
+		new StaticTextWidget(this, "Launcher.Version", Common::U32String(gScummVMFullVersion));
 #else
 	// Show ScummVM version
 	new StaticTextWidget(this, "Launcher.Version", gScummVMFullVersion);
@@ -677,7 +677,7 @@ void LauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 		break;
 	case kSearchClearCmd:
 		// Reset the active search filter, thus showing all games again
-		_searchWidget->setEditString(Common::convertToU32String(""));
+		_searchWidget->setEditString(Common::U32String(""));
 		_list->setFilter("");
 		break;
 	default:
@@ -718,7 +718,7 @@ void LauncherDialog::reflowLayout() {
 		StaticTextWidget *ver = (StaticTextWidget *)findWidget("Launcher.Version");
 		if (ver) {
 			ver->setAlign(g_gui.xmlEval()->getWidgetTextHAlign("Launcher.Version"));
-			ver->setLabel(Common::convertToU32String(gScummVMVersionDate));
+			ver->setLabel(Common::U32String(gScummVMVersionDate));
 		}
 
 		if (!_logo)
@@ -729,7 +729,7 @@ void LauncherDialog::reflowLayout() {
 		StaticTextWidget *ver = (StaticTextWidget *)findWidget("Launcher.Version");
 		if (ver) {
 			ver->setAlign(g_gui.xmlEval()->getWidgetTextHAlign("Launcher.Version"));
-			ver->setLabel(Common::convertToU32String(gScummVMFullVersion));
+			ver->setLabel(Common::U32String(gScummVMFullVersion));
 		}
 
 		if (_logo) {
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index e27935c308..345db60cf9 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -86,10 +86,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
 	_list->setNumberingMode(kListNumberingOff);
 	_list->setList(l);
 
-	_okButton = new ButtonWidget(this, "MassAdd.Ok", Common::convertToU32String("Ok"), Common::U32String(""), kOkCmd, Common::ASCII_RETURN);
+	_okButton = new ButtonWidget(this, "MassAdd.Ok", Common::U32String("Ok"), Common::U32String(""), kOkCmd, Common::ASCII_RETURN);
 	_okButton->setEnabled(false);
 
-	new ButtonWidget(this, "MassAdd.Cancel", Common::convertToU32String("Cancel"), Common::U32String(""), kCancelCmd, Common::ASCII_ESCAPE);
+	new ButtonWidget(this, "MassAdd.Cancel", Common::U32String("Cancel"), Common::U32String(""), kCancelCmd, Common::ASCII_ESCAPE);
 
 	// Build a map from all configured game paths to the targets using them
 	const Common::ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
diff --git a/gui/options.cpp b/gui/options.cpp
index f654c984bd..f6e64e5b9c 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1085,7 +1085,7 @@ void OptionsDialog::addControlControls(GuiObject *boss, const Common::String &pr
 		else
 			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", (_c("Pointer Speed:", "lowres")), _("Speed for keyboard/joystick mouse pointer control"));
 		_kbdMouseSpeedSlider = new SliderWidget(boss, prefix + "grKbdMouseSpeedSlider", _("Speed for keyboard/joystick mouse pointer control"), kKbdMouseSpeedChanged);
-		_kbdMouseSpeedLabel = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedLabel", Common::convertToU32String("  "));
+		_kbdMouseSpeedLabel = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedLabel", Common::U32String("  "));
 		_kbdMouseSpeedSlider->setMinValue(0);
 		_kbdMouseSpeedSlider->setMaxValue(7);
 		_kbdMouseSpeedLabel->setFlags(WIDGET_CLEARBG);
@@ -1098,7 +1098,7 @@ void OptionsDialog::addControlControls(GuiObject *boss, const Common::String &pr
 		else
 			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", (_c("Joy Deadzone:", "lowres")), _("Analog joystick Deadzone"));
 		_joystickDeadzoneSlider = new SliderWidget(boss, prefix + "grJoystickDeadzoneSlider", _("Analog joystick Deadzone"), kJoystickDeadzoneChanged);
-		_joystickDeadzoneLabel = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneLabel", Common::convertToU32String("  "));
+		_joystickDeadzoneLabel = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneLabel", Common::U32String("  "));
 		_joystickDeadzoneSlider->setMinValue(1);
 		_joystickDeadzoneSlider->setMaxValue(10);
 		_joystickDeadzoneLabel->setFlags(WIDGET_CLEARBG);
@@ -1201,7 +1201,7 @@ void OptionsDialog::addShaderControls(GuiObject *boss, const Common::String &pre
 	const OSystem::GraphicsMode *p = g_system->getSupportedShaders();
 
 	_shaderPopUp->appendEntry((_("<default>")));
-	_shaderPopUp->appendEntry(Common::convertToU32String(""));
+	_shaderPopUp->appendEntry(Common::U32String(""));
 	while (p->name) {
 		_shaderPopUp->appendEntry(_c(p->description, context), p->id);
 		p++;
@@ -1221,7 +1221,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 	_gfxPopUp = new PopUpWidget(boss, prefix + "grModePopup");
 
 	_gfxPopUp->appendEntry((_("<default>")));
-	_gfxPopUp->appendEntry(Common::convertToU32String(""));
+	_gfxPopUp->appendEntry(Common::U32String(""));
 	while (gm->name) {
 		_gfxPopUp->appendEntry(_c(gm->description, context), gm->id);
 		gm++;
@@ -1234,7 +1234,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 	_renderModePopUpDesc = new StaticTextWidget(boss, prefix + "grRenderPopupDesc", (_("Render mode:")), _("Special dithering modes supported by some games"));
 	_renderModePopUp = new PopUpWidget(boss, prefix + "grRenderPopup", _("Special dithering modes supported by some games"));
 	_renderModePopUp->appendEntry((_("<default>")), Common::kRenderDefault);
-	_renderModePopUp->appendEntry(Common::convertToU32String(""));
+	_renderModePopUp->appendEntry(Common::U32String(""));
 	const Common::RenderModeDescription *rm = Common::g_renderModes;
 	for (; rm->code; ++rm) {
 		Common::String renderGuiOption = Common::renderMode2GUIO(rm->id);
@@ -1248,7 +1248,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 	_stretchPopUp = new PopUpWidget(boss, prefix + "grStretchModePopup");
 
 	_stretchPopUp->appendEntry((_("<default>")));
-	_stretchPopUp->appendEntry(Common::convertToU32String(""));
+	_stretchPopUp->appendEntry(Common::U32String(""));
 	while (sm->name) {
 		_stretchPopUp->appendEntry(_c(sm->description, context), sm->id);
 		sm++;
@@ -1361,7 +1361,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 	_midiGainSlider = new SliderWidget(boss, prefix + "mcMidiGainSlider", Common::U32String(""), kMidiGainChanged);
 	_midiGainSlider->setMinValue(0);
 	_midiGainSlider->setMaxValue(1000);
-	_midiGainLabel = new StaticTextWidget(boss, prefix + "mcMidiGainLabel", Common::convertToU32String("1.00"));
+	_midiGainLabel = new StaticTextWidget(boss, prefix + "mcMidiGainLabel", Common::U32String("1.00"));
 
 	_enableMIDISettings = true;
 }
@@ -1436,7 +1436,7 @@ void OptionsDialog::addSubtitleControls(GuiObject *boss, const Common::String &p
 
 	// Subtitle speed
 	_subSpeedSlider = new SliderWidget(boss, prefix + "subSubtitleSpeedSlider", Common::U32String(""), kSubtitleSpeedChanged);
-	_subSpeedLabel = new StaticTextWidget(boss, prefix + "subSubtitleSpeedLabel", Common::convertToU32String("100%"));
+	_subSpeedLabel = new StaticTextWidget(boss, prefix + "subSubtitleSpeedLabel", Common::U32String("100%"));
 	_subSpeedSlider->setMinValue(0); _subSpeedSlider->setMaxValue(maxSliderVal);
 	_subSpeedLabel->setFlags(WIDGET_CLEARBG);
 
@@ -1451,7 +1451,7 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
 	else
 		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", _c("Music volume:", "lowres"));
 	_musicVolumeSlider = new SliderWidget(boss, prefix + "vcMusicSlider", Common::U32String(""), kMusicVolumeChanged);
-	_musicVolumeLabel = new StaticTextWidget(boss, prefix + "vcMusicLabel", Common::convertToU32String("100%"));
+	_musicVolumeLabel = new StaticTextWidget(boss, prefix + "vcMusicLabel", Common::U32String("100%"));
 	_musicVolumeSlider->setMinValue(0);
 	_musicVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
 	_musicVolumeLabel->setFlags(WIDGET_CLEARBG);
@@ -1463,7 +1463,7 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
 	else
 		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", (_c("SFX volume:", "lowres")), _("Special sound effects volume"));
 	_sfxVolumeSlider = new SliderWidget(boss, prefix + "vcSfxSlider", _("Special sound effects volume"), kSfxVolumeChanged);
-	_sfxVolumeLabel = new StaticTextWidget(boss, prefix + "vcSfxLabel", Common::convertToU32String("100%"));
+	_sfxVolumeLabel = new StaticTextWidget(boss, prefix + "vcSfxLabel", Common::U32String("100%"));
 	_sfxVolumeSlider->setMinValue(0);
 	_sfxVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
 	_sfxVolumeLabel->setFlags(WIDGET_CLEARBG);
@@ -1473,7 +1473,7 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
 	else
 		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , (_c("Speech volume:", "lowres")));
 	_speechVolumeSlider = new SliderWidget(boss, prefix + "vcSpeechSlider", Common::U32String(""), kSpeechVolumeChanged);
-	_speechVolumeLabel = new StaticTextWidget(boss, prefix + "vcSpeechLabel", Common::convertToU32String("100%"));
+	_speechVolumeLabel = new StaticTextWidget(boss, prefix + "vcSpeechLabel", Common::U32String("100%"));
 	_speechVolumeSlider->setMinValue(0);
 	_speechVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
 	_speechVolumeLabel->setFlags(WIDGET_CLEARBG);
@@ -1940,7 +1940,7 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
 		new ButtonWidget(boss, prefix + "SaveButton", (_("Save Path:")), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
 	else
 		new ButtonWidget(boss, prefix + "SaveButton", (_c("Save Path:", "lowres")), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
-	_savePath = new StaticTextWidget(boss, prefix + "SavePath", Common::convertToU32String("/foo/bar"), _("Specifies where your saved games are put"));
+	_savePath = new StaticTextWidget(boss, prefix + "SavePath", Common::U32String("/foo/bar"), _("Specifies where your saved games are put"));
 
 	_savePathClearButton = addClearButton(boss, prefix + "SavePathClearButton", kSavePathClearCmd);
 
@@ -2011,8 +2011,8 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 #ifdef USE_DETECTLANG
 	_guiLanguagePopUp->appendEntry((_("<default>")), Common::kTranslationAutodetectId);
 #endif // USE_DETECTLANG
-	_guiLanguagePopUp->appendEntry(Common::convertToU32String("English"), Common::kTranslationBuiltinId);
-	_guiLanguagePopUp->appendEntry(Common::convertToU32String(""), 0);
+	_guiLanguagePopUp->appendEntry(Common::U32String("English"), Common::kTranslationBuiltinId);
+	_guiLanguagePopUp->appendEntry(Common::U32String(""), 0);
 	Common::TLangArray languages = TransMan.getSupportedLanguageNames();
 	Common::TLangArray::iterator lang = languages.begin();
 	while (lang != languages.end()) {
@@ -2091,7 +2091,7 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
 	_storageUsername = new StaticTextWidget(boss, prefix + "StorageUsernameLabel", (_("<none>")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 
 	_storageUsedSpaceDesc = new StaticTextWidget(boss, prefix + "StorageUsedSpaceDesc", (_("Used space:")), _("Space used by ScummVM's saved games on this storage"));
-	_storageUsedSpace = new StaticTextWidget(boss, prefix + "StorageUsedSpaceLabel", Common::convertToU32String("0 bytes"), Common::U32String(""), ThemeEngine::kFontStyleNormal);
+	_storageUsedSpace = new StaticTextWidget(boss, prefix + "StorageUsedSpaceLabel", Common::U32String("0 bytes"), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 
 	_storageLastSyncDesc = new StaticTextWidget(boss, prefix + "StorageLastSyncDesc", (_("Last sync:")), _("When was the last time saved games were synced with this storage"));
 	_storageLastSync = new StaticTextWidget(boss, prefix + "StorageLastSyncLabel", (_("<never>")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
@@ -2118,15 +2118,15 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
 	else
 		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", (_("This storage is not connected yet! To connect,")));
 	_storageWizardOpenLinkHint = new StaticTextWidget(boss, prefix + "StorageWizardOpenLinkHint", (_("1. Open this link:")));
-	_storageWizardLink = new ButtonWidget(boss, prefix + "StorageWizardLink", Common::convertToU32String("https://cloud.scummvm.org/"), _("Open URL"), kOpenUrlStorageCmd);
+	_storageWizardLink = new ButtonWidget(boss, prefix + "StorageWizardLink", Common::U32String("https://cloud.scummvm.org/"), _("Open URL"), kOpenUrlStorageCmd);
 	if (lowres)
 		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", (_c("2. Get the code and enter it here:", "lowres")));
 	else
 		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", (_("2. Get the code and enter it here:")));
-	_storageWizardCodeBox = new EditTextWidget(boss, prefix + "StorageWizardCodeBox", Common::convertToU32String(""), Common::U32String(""), 0, 0, ThemeEngine::kFontStyleConsole);
+	_storageWizardCodeBox = new EditTextWidget(boss, prefix + "StorageWizardCodeBox", Common::U32String(""), Common::U32String(""), 0, 0, ThemeEngine::kFontStyleConsole);
 	_storageWizardPasteButton = new ButtonWidget(boss, prefix + "StorageWizardPasteButton", (_("Paste")), _("Paste code from clipboard"), kPasteCodeStorageCmd);
 	_storageWizardConnectButton = new ButtonWidget(boss, prefix + "StorageWizardConnectButton", (_("3. Connect")), _("Connect your cloud storage account"), kConnectStorageCmd);
-	_storageWizardConnectionStatusHint = new StaticTextWidget(boss, prefix + "StorageWizardConnectionStatusHint", Common::convertToU32String("..."));
+	_storageWizardConnectionStatusHint = new StaticTextWidget(boss, prefix + "StorageWizardConnectionStatusHint", Common::U32String("..."));
 
 	setupCloudTab();
 }
@@ -2142,7 +2142,7 @@ void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::Stri
 		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", (_c("/root/ Path:", "lowres")), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
 	else
 		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", (_("/root/ Path:")), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
-	_rootPath = new StaticTextWidget(boss, prefix + "RootPath", Common::convertToU32String("/foo/bar"), _("Select which directory will be shown as /root/ in the Files Manager"));
+	_rootPath = new StaticTextWidget(boss, prefix + "RootPath", Common::U32String("/foo/bar"), _("Select which directory will be shown as /root/ in the Files Manager"));
 	_rootPathClearButton = addClearButton(boss, prefix + "RootPathClearButton", kRootPathClearCmd);
 
 	uint32 port = Networking::LocalWebserver::getPort();
@@ -2513,7 +2513,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 	}
 	case kPopUpItemSelectedCmd: {
 		if (_storageWizardCodeBox)
-			_storageWizardCodeBox->setEditString(Common::convertToU32String(""));
+			_storageWizardCodeBox->setEditString(Common::U32String(""));
 		// update container's scrollbar
 		reflowLayout();
 		break;
@@ -2614,7 +2614,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 	}
 	case kDisconnectStorageCmd: {
 		if (_storageWizardCodeBox)
-			_storageWizardCodeBox->setEditString(Common::convertToU32String(""));
+			_storageWizardCodeBox->setEditString(Common::U32String(""));
 
 		if (_selectedStorageIndex == CloudMan.getStorageIndex() && CloudMan.isWorking()) {
 			bool cancel = true;
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index ad94d85978..1ad6619f46 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -68,10 +68,10 @@ enum {
 };
 
 PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
-	new StaticTextWidget(this, "Predictive.Headline", Common::convertToU32String("Enter Text"));
+	new StaticTextWidget(this, "Predictive.Headline", Common::U32String("Enter Text"));
 
-	_button[kCancelAct] =  new ButtonWidget(this, "Predictive.Cancel",  Common::convertToU32String_("Cancel"))   , Common::U32String(""), kCancelCmd);
-	_button[kOkAct] =      new ButtonWidget(this, "Predictive.OK",      Common::convertToU32String_("Ok"))       , Common::U32String(""), kOkCmd);
+	_button[kCancelAct] =  new ButtonWidget(this, "Predictive.Cancel",  Common::U32String(_("Cancel"))   , Common::U32String(""), kCancelCmd);
+	_button[kOkAct] =      new ButtonWidget(this, "Predictive.OK",      Common::U32String(_("Ok"))       , Common::U32String(""), kOkCmd);
 
 	if (g_gui.useRTL()) {
 		/** If using RTL, swap the internal name of odd columns, to be flipped again when drawing.
@@ -79,27 +79,27 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 			The rest, like okButton, cancel, etc are all flipped.
 		*/
 
-		_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button1", Common::convertToU32String("3  def"      ), Common::U32String(""), kBut3Cmd);
-		_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", Common::convertToU32String("2  abc"      ), Common::U32String(""), kBut2Cmd);
-		_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button3", Common::convertToU32String("1  `-.&"     ), Common::U32String(""), kBut1Cmd);
-		_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button4", Common::convertToU32String("6  mno"      ), Common::U32String(""), kBut6Cmd);
-		_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", Common::convertToU32String("5  jkl"      ), Common::U32String(""), kBut5Cmd);
-		_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button6", Common::convertToU32String("4  ghi"      ), Common::U32String(""), kBut4Cmd);
-		_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button7", Common::convertToU32String("9  wxyz"     ), Common::U32String(""), kBut9Cmd);
-		_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", Common::convertToU32String("8  tuv"      ), Common::U32String(""), kBut8Cmd);
-		_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button9", Common::convertToU32String("7  pqrs"     ), Common::U32String(""), kBut7Cmd);
-		_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", Common::convertToU32String("0"           ), Common::U32String(""), kBut0Cmd);
+		_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button1", Common::U32String("3  def"      ), Common::U32String(""), kBut3Cmd);
+		_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", Common::U32String("2  abc"      ), Common::U32String(""), kBut2Cmd);
+		_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button3", Common::U32String("1  `-.&"     ), Common::U32String(""), kBut1Cmd);
+		_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button4", Common::U32String("6  mno"      ), Common::U32String(""), kBut6Cmd);
+		_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", Common::U32String("5  jkl"      ), Common::U32String(""), kBut5Cmd);
+		_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button6", Common::U32String("4  ghi"      ), Common::U32String(""), kBut4Cmd);
+		_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button7", Common::U32String("9  wxyz"     ), Common::U32String(""), kBut9Cmd);
+		_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", Common::U32String("8  tuv"      ), Common::U32String(""), kBut8Cmd);
+		_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button9", Common::U32String("7  pqrs"     ), Common::U32String(""), kBut7Cmd);
+		_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", Common::U32String("0"           ), Common::U32String(""), kBut0Cmd);
 	} else {
-		_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button1", Common::convertToU32String("1  `-.&"     ), Common::U32String(""), kBut1Cmd);
-		_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", Common::convertToU32String("2  abc"      ), Common::U32String(""), kBut2Cmd);
-		_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button3", Common::convertToU32String("3  def"      ), Common::U32String(""), kBut3Cmd);
-		_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button4", Common::convertToU32String("4  ghi"      ), Common::U32String(""), kBut4Cmd);
-		_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", Common::convertToU32String("5  jkl"      ), Common::U32String(""), kBut5Cmd);
-		_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button6", Common::convertToU32String("6  mno"      ), Common::U32String(""), kBut6Cmd);
-		_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button7", Common::convertToU32String("7  pqrs"     ), Common::U32String(""), kBut7Cmd);
-		_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", Common::convertToU32String("8  tuv"      ), Common::U32String(""), kBut8Cmd);
-		_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button9", Common::convertToU32String("9  wxyz"     ), Common::U32String(""), kBut9Cmd);
-		_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", Common::convertToU32String("0"           ), Common::U32String(""), kBut0Cmd);
+		_button[kButton1Act] = new ButtonWidget(this, "Predictive.Button1", Common::U32String("1  `-.&"     ), Common::U32String(""), kBut1Cmd);
+		_button[kButton2Act] = new ButtonWidget(this, "Predictive.Button2", Common::U32String("2  abc"      ), Common::U32String(""), kBut2Cmd);
+		_button[kButton3Act] = new ButtonWidget(this, "Predictive.Button3", Common::U32String("3  def"      ), Common::U32String(""), kBut3Cmd);
+		_button[kButton4Act] = new ButtonWidget(this, "Predictive.Button4", Common::U32String("4  ghi"      ), Common::U32String(""), kBut4Cmd);
+		_button[kButton5Act] = new ButtonWidget(this, "Predictive.Button5", Common::U32String("5  jkl"      ), Common::U32String(""), kBut5Cmd);
+		_button[kButton6Act] = new ButtonWidget(this, "Predictive.Button6", Common::U32String("6  mno"      ), Common::U32String(""), kBut6Cmd);
+		_button[kButton7Act] = new ButtonWidget(this, "Predictive.Button7", Common::U32String("7  pqrs"     ), Common::U32String(""), kBut7Cmd);
+		_button[kButton8Act] = new ButtonWidget(this, "Predictive.Button8", Common::U32String("8  tuv"      ), Common::U32String(""), kBut8Cmd);
+		_button[kButton9Act] = new ButtonWidget(this, "Predictive.Button9", Common::U32String("9  wxyz"     ), Common::U32String(""), kBut9Cmd);
+		_button[kButton0Act] = new ButtonWidget(this, "Predictive.Button0", Common::U32String("0"           ), Common::U32String(""), kBut0Cmd);
 	}
 
 	// I18N: You must leave "#" as is, only word 'next' is translatable
diff --git a/gui/remotebrowser.cpp b/gui/remotebrowser.cpp
index 78dbe75ea8..92bb35c897 100644
--- a/gui/remotebrowser.cpp
+++ b/gui/remotebrowser.cpp
@@ -47,7 +47,7 @@ RemoteBrowserDialog::RemoteBrowserDialog(const Common::U32String &title):
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
 	new StaticTextWidget(this, "Browser.Headline", title);
-	_currentPath = new StaticTextWidget(this, "Browser.Path", Common::convertToU32String("DUMMY"));
+	_currentPath = new StaticTextWidget(this, "Browser.Path", Common::U32String("DUMMY"));
 
 	_fileList = new ListWidget(this, "Browser.List");
 	_fileList->setNumberingMode(kListNumberingOff);
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 0379fc5f4f..48369033f0 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -49,7 +49,7 @@ enum {
 };
 
 SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(bool canRunInBackground): Dialog("SaveLoadCloudSyncProgress"), _close(false) {
-	_label = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.TitleText", Common::convertToU32String("Downloading saves..."));
+	_label = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.TitleText", Common::U32String("Downloading saves..."));
 	uint32 progress = (uint32)(100 * CloudMan.getSyncDownloadingProgress());
 	_progressBar = new SliderWidget(this, "SaveLoadCloudSyncProgress.ProgressBar");
 	_progressBar->setMinValue(0);
@@ -57,8 +57,8 @@ SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(bool canRunInBa
 	_progressBar->setValue(progress);
 	_progressBar->setEnabled(false);
 	_percentLabel = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.PercentText", Common::String::format("%u %%", progress));
-	new ButtonWidget(this, "SaveLoadCloudSyncProgress.Cancel", Common::convertToU32String("Cancel"), Common::U32String(""), kCancelSyncCmd, Common::ASCII_ESCAPE);	// Cancel dialog
-	ButtonWidget *backgroundButton = new ButtonWidget(this, "SaveLoadCloudSyncProgress.Background", Common::convertToU32String("Run in background"), Common::U32String(""), kBackgroundSyncCmd, Common::ASCII_RETURN);	// Confirm dialog
+	new ButtonWidget(this, "SaveLoadCloudSyncProgress.Cancel", Common::U32String("Cancel"), Common::U32String(""), kCancelSyncCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+	ButtonWidget *backgroundButton = new ButtonWidget(this, "SaveLoadCloudSyncProgress.Background", Common::U32String("Run in background"), Common::U32String(""), kBackgroundSyncCmd, Common::ASCII_RETURN);	// Confirm dialog
 	backgroundButton->setEnabled(canRunInBackground);
 	g_gui.scheduleTopDialogRedraw();
 }
@@ -616,7 +616,7 @@ void SaveLoadChooserSimple::updateSelection(bool redraw) {
 
 			if (_chooseButton->isEnabled() && _list->getSelectedString() == _("Untitled saved game") &&
 					_list->getSelectionColor() == ThemeEngine::kFontColorAlternate) {
-				_list->setEditString(Common::convertToU32String(""));
+				_list->setEditString(Common::U32String(""));
 				_list->setEditColor(ThemeEngine::kFontColorNormal);
 			}
 		}
diff --git a/gui/widget.cpp b/gui/widget.cpp
index f89dbfe23c..f909223d2d 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -404,9 +404,9 @@ ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32
 	} else
 #endif
 		if (!name.empty())
-			button = new ButtonWidget(boss, name, Common::convertToU32String("C"), (_("Clear value")), cmd);
+			button = new ButtonWidget(boss, name, Common::U32String("C"), (_("Clear value")), cmd);
 		else
-			button = new ButtonWidget(boss, x, y, w, h, Common::convertToU32String("C"), (_("Clear value")), cmd);
+			button = new ButtonWidget(boss, x, y, w, h, Common::U32String("C"), (_("Clear value")), cmd);
 
 	return button;
 }
@@ -536,7 +536,7 @@ void DropdownButtonWidget::drawWidget() {
 #pragma mark -
 
 PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
-	: ButtonWidget(boss, x, y, w, h, Common::convertToU32String(""), tooltip, cmd, hotkey),
+	: ButtonWidget(boss, x, y, w, h, Common::U32String(""), tooltip, cmd, hotkey),
 	  _alpha(255), _transparency(false), _showButton(true) {
 
 	setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG);
@@ -544,7 +544,7 @@ PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, Co
 }
 
 PicButtonWidget::PicButtonWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
-	: ButtonWidget(boss, name, Common::convertToU32String(""), tooltip, cmd, hotkey),
+	: ButtonWidget(boss, name, Common::U32String(""), tooltip, cmd, hotkey),
 	  _alpha(255), _transparency(false), _showButton(true) {
 	setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG);
 	_type = kButtonWidget;
@@ -584,7 +584,7 @@ void PicButtonWidget::setGfx(int w, int h, int r, int g, int b, int statenum) {
 
 void PicButtonWidget::drawWidget() {
 	if (_showButton)
-		g_gui.theme()->drawButton(Common::Rect(_x, _y, _x + _w, _y + _h), Common::convertToU32String(""), _state, getFlags());
+		g_gui.theme()->drawButton(Common::Rect(_x, _y, _x + _w, _y + _h), Common::U32String(""), _state, getFlags());
 
 	Graphics::Surface *gfx;
 
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp
index b3f446ab08..66178fb4b1 100644
--- a/gui/widgets/tab.cpp
+++ b/gui/widgets/tab.cpp
@@ -73,8 +73,8 @@ void TabWidget::init() {
 	String leftArrow = g_gui.useRTL() ? ">" : "<";
 	String rightArrow = g_gui.useRTL() ? "<" : ">";
 
-	_navLeft = new ButtonWidget(this, x, y, _butW, _butH, Common::convertToU32String(leftArrow), Common::U32String(""), kCmdLeft);
-	_navRight = new ButtonWidget(this, x + _butW + 2, y, _butW, _butH, Common::convertToU32String(rightArrow), Common::U32String(""), kCmdRight);
+	_navLeft = new ButtonWidget(this, x, y, _butW, _butH, Common::U32String(leftArrow), Common::U32String(""), kCmdLeft);
+	_navRight = new ButtonWidget(this, x + _butW + 2, y, _butW, _butH, Common::U32String(rightArrow), Common::U32String(""), kCmdRight);
 
 	_navLeft->setEnabled(false);
 	_navRight->setEnabled(true);


Commit: 160a1320cc86d2bb43c5c909f0b9c534743a2b77
    https://github.com/scummvm/scummvm/commit/160a1320cc86d2bb43c5c909f0b9c534743a2b77
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Rename more temp code and fix issues

- Remove convertFromU32.. where necessary
- Replace convertFromU32 to .encode() for better readability
- Fix spacing issues in tabs
- Fix spacing issues in popups
- Fix weird font rendering in certain menus.
- Fix dialog changing sizes by huge amount when changing languages
- Some minor changes from String::format to U32String::Format

Changed paths:
    backends/networking/sdl_net/handlers/filesajaxpagehandler.cpp
    backends/networking/sdl_net/handlers/filespagehandler.cpp
    gui/editgamedialog.cpp
    gui/editgamedialog.h
    gui/massadd.cpp
    gui/options.cpp
    gui/saveload-dialog.cpp
    gui/widgets/popup.cpp
    gui/widgets/tab.cpp


diff --git a/backends/networking/sdl_net/handlers/filesajaxpagehandler.cpp b/backends/networking/sdl_net/handlers/filesajaxpagehandler.cpp
index 3b8a412b35..4ee08bbd3a 100644
--- a/backends/networking/sdl_net/handlers/filesajaxpagehandler.cpp
+++ b/backends/networking/sdl_net/handlers/filesajaxpagehandler.cpp
@@ -64,16 +64,16 @@ void FilesAjaxPageHandler::handle(Client &client) {
 	Common::String path = client.queryParameter("path");
 
 	//these occur twice:
-	replace(response, "{create_directory_button}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Create directory")).c_str()));
-	replace(response, "{create_directory_button}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Create directory")).c_str()));
-	replace(response, "{upload_files_button}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Upload files")).c_str())); //tab
-	replace(response, "{upload_file_button}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Upload files")).c_str())); //button in the tab
-	replace(response, "{create_directory_desc}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Type new directory name:")).c_str()));
-	replace(response, "{upload_file_desc}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Select a file to upload:")).c_str()));
-	replace(response, "{or_upload_directory_desc}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Or select a directory (works in Chrome only):")).c_str()));
-	replace(response, "{index_of}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Index of ")).c_str()));
-	replace(response, "{loading}", HandlerUtils::toUtf8(("Loading...")));
-	replace(response, "{error}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Error occurred")).c_str()));
+	replace(response, "{create_directory_button}", _("Create directory").encode());
+	replace(response, "{create_directory_button}", _("Create directory").encode());
+	replace(response, "{upload_files_button}", _("Upload files").encode()); //tab
+	replace(response, "{upload_file_button}", _("Upload files").encode()); //button in the tab
+	replace(response, "{create_directory_desc}", _("Type new directory name:").encode());
+	replace(response, "{upload_file_desc}", _("Select a file to upload:").encode());
+	replace(response, "{or_upload_directory_desc}", _("Or select a directory (works in Chrome only):").encode());
+	replace(response, "{index_of}", _("Index of ").encode());
+	replace(response, "{loading}", ("Loading..."));
+	replace(response, "{error}", _("Error occurred").encode());
 	replace(response, "{start_path}", encodeDoubleQuotesAndSlashes(path));
 	LocalWebserver::setClientGetHandler(client, response);
 }
diff --git a/backends/networking/sdl_net/handlers/filespagehandler.cpp b/backends/networking/sdl_net/handlers/filespagehandler.cpp
index b560a0a827..fd5a37bcca 100644
--- a/backends/networking/sdl_net/handlers/filespagehandler.cpp
+++ b/backends/networking/sdl_net/handlers/filespagehandler.cpp
@@ -220,15 +220,15 @@ void FilesPageHandler::handle(Client &client) {
 	}
 
 	//these occur twice:
-	replace(response, "{create_directory_button}", Common::convertFromU32String(_("Create directory")));
-	replace(response, "{create_directory_button}", Common::convertFromU32String(_("Create directory")));
+	replace(response, "{create_directory_button}", _("Create directory").encode());
+	replace(response, "{create_directory_button}", _("Create directory").encode());
 	replace(response, "{path}", encodeDoubleQuotes(client.queryParameter("path")));
 	replace(response, "{path}", encodeDoubleQuotes(client.queryParameter("path")));
-	replace(response, "{upload_files_button}", Common::convertFromU32String(_("Upload files"))); //tab
-	replace(response, "{upload_file_button}", Common::convertFromU32String(_("Upload files"))); //button in the tab
-	replace(response, "{create_directory_desc}", Common::convertFromU32String(_("Type new directory name:")));
-	replace(response, "{upload_file_desc}", Common::convertFromU32String(_("Select a file to upload:")));
-	replace(response, "{or_upload_directory_desc}", Common::convertFromU32String(_("Or select a directory (works in Chrome only):")));
+	replace(response, "{upload_files_button}", _("Upload files").encode()); //tab
+	replace(response, "{upload_file_button}", _("Upload files").encode()); //button in the tab
+	replace(response, "{create_directory_desc}", _("Type new directory name:").encode());
+	replace(response, "{upload_file_desc}", _("Select a file to upload:").encode());
+	replace(response, "{or_upload_directory_desc}", _("Or select a directory (works in Chrome only):").encode());
 	replace(response, "{index_of_directory}", Common::String::format("%s %s", Common::convertFromU32String(_("Index of")).c_str(), encodeHtmlEntities(getDisplayPath(client.queryParameter("path"))).c_str()));
 	replace(response, "{content}", content);
 	LocalWebserver::setClientGetHandler(client, response);
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index f83881773c..2402657b19 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -446,19 +446,19 @@ void EditGameDialog::apply() {
 	else
 		ConfMan.set("language", Common::getLanguageCode(lang), _domain);
 
-	String gamePath(Common::convertFromU32String(_gamePathWidget->getLabel()));
+	U32String gamePath(_gamePathWidget->getLabel());
 	if (!gamePath.empty())
-		ConfMan.set("path", gamePath, _domain);
+		ConfMan.set("path", gamePath.encode(), _domain);
 
-	String extraPath(Common::convertFromU32String(_extraPathWidget->getLabel()));
-	if (!extraPath.empty() && (extraPath != Common::convertFromU32String(_c("None", "path"))))
-		ConfMan.set("extrapath", extraPath, _domain);
+	U32String extraPath(_extraPathWidget->getLabel());
+	if (!extraPath.empty() && (extraPath != _c("None", "path")))
+		ConfMan.set("extrapath", extraPath.encode(), _domain);
 	else
 		ConfMan.removeKey("extrapath", _domain);
 
-	String savePath(Common::convertFromU32String(_savePathWidget->getLabel()));
-	if (!savePath.empty() && (savePath != Common::convertFromU32String(_("Default"))))
-		ConfMan.set("savepath", savePath, _domain);
+	U32String savePath(_savePathWidget->getLabel());
+	if (!savePath.empty() && (savePath != _("Default")))
+		ConfMan.set("savepath", savePath.encode(), _domain);
 	else
 		ConfMan.removeKey("savepath", _domain);
 
diff --git a/gui/editgamedialog.h b/gui/editgamedialog.h
index 47df4c6478..d83862da97 100644
--- a/gui/editgamedialog.h
+++ b/gui/editgamedialog.h
@@ -59,6 +59,7 @@ class SaveLoadChooser;
 
 class EditGameDialog : public OptionsDialog {
 	typedef Common::String String;
+	typedef Common::U32String U32String;
 	typedef Common::Array<Common::String> StringArray;
 public:
 	EditGameDialog(const String &domain);
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 345db60cf9..64946119c2 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -266,14 +266,14 @@ void MassAddDialog::handleTickle() {
 		buf = _("Scan complete!");
 		_dirProgressText->setLabel(buf);
 
-		buf = Common::String::format(Common::convertFromU32String(_("Discovered %d new games, ignored %d previously added games.")).c_str(), _games.size(), _oldGamesCount);
+		buf = Common::U32String::format(Common::convertFromU32String(_("Discovered %d new games, ignored %d previously added games.")).c_str(), _games.size(), _oldGamesCount);
 		_gameProgressText->setLabel(buf);
 
 	} else {
-		buf = Common::String::format(Common::convertFromU32String(_("Scanned %d directories ...")).c_str(), _dirsScanned);
+		buf = Common::U32String::format(Common::convertFromU32String(_("Scanned %d directories ...")).c_str(), _dirsScanned);
 		_dirProgressText->setLabel(buf);
 
-		buf = Common::String::format(Common::convertFromU32String(_("Discovered %d new games, ignored %d previously added games ...")).c_str(), _games.size(), _oldGamesCount);
+		buf = Common::U32String::format(Common::convertFromU32String(_("Discovered %d new games, ignored %d previously added games ...")).c_str(), _games.size(), _oldGamesCount);
 		_gameProgressText->setLabel(buf);
 	}
 
diff --git a/gui/options.cpp b/gui/options.cpp
index f6e64e5b9c..ac88e8488b 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -744,9 +744,9 @@ void OptionsDialog::apply() {
 			ConfMan.setBool("multi_midi", _multiMidiCheckbox->getState(), _domain);
 			ConfMan.setInt("midi_gain", _midiGainSlider->getValue(), _domain);
 
-			Common::String soundFont(Common::convertFromU32String(_soundFont->getLabel()));
-			if (!soundFont.empty() && (soundFont != Common::convertFromU32String(_c("None", "soundfont"))))
-				ConfMan.set("soundfont", soundFont, _domain);
+			Common::U32String soundFont(_soundFont->getLabel());
+			if (!soundFont.empty() && (soundFont != _c("None", "soundfont")))
+				ConfMan.set("soundfont", soundFont.encode(), _domain);
 			else
 				ConfMan.removeKey("soundfont", _domain);
 		} else {
@@ -1170,12 +1170,12 @@ void OptionsDialog::addAchievementsControls(GuiObject *boss, const Common::Strin
 	}
 
 	if (nHidden) {
-		Common::String hiddenStr = Common::String::format(Common::convertFromU32String(_("%d hidden achievements remaining")).c_str(), nHidden);
-		new StaticTextWidget(scrollContainer, lineHeight, yPos, width, yStep, Common::convertToU32String(hiddenStr.c_str()), Graphics::kTextAlignStart);
+		Common::U32String hiddenStr = Common::U32String::format(Common::convertFromU32String(_("%d hidden achievements remaining")).c_str(), nHidden);
+		new StaticTextWidget(scrollContainer, lineHeight, yPos, width, yStep, hiddenStr, Graphics::kTextAlignStart);
 	}
 
 	if (nMax) {
-		Common::U32String totalStr = Common::String::format(Common::convertFromU32String(_("Achievements unlocked: %d/%d")).c_str(), nAchieved, nMax);
+		Common::U32String totalStr = Common::U32String::format(Common::convertFromU32String(_("Achievements unlocked: %d/%d")).c_str(), nAchieved, nMax);
 		new StaticTextWidget(scrollContainer, lineHeight, lineHeight, width, yStep, totalStr, Graphics::kTextAlignStart);
 
 		SliderWidget *progressBar;
@@ -2148,7 +2148,7 @@ void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::Stri
 	uint32 port = Networking::LocalWebserver::getPort();
 
 	_serverPortDesc = new StaticTextWidget(boss, prefix + "ServerPortDesc", (_("Server's port:")), _("Port for server to use"));
-	_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), Common::U32String(""));
+	_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::U32String::format("%u", port), Common::U32String(""));
 	_serverPortClearButton = addClearButton(boss, prefix + "ServerPortClearButton", kServerPortClearCmd);
 
 	if (lowres) {
@@ -2200,21 +2200,21 @@ void GlobalOptionsDialog::apply() {
 
 	bool isRebuildNeeded = false;
 
-	Common::String savePath(Common::convertFromU32String(_savePath->getLabel()));
-	if (!savePath.empty() && (savePath != Common::convertFromU32String(_("Default"))))
-		ConfMan.set("savepath", savePath, _domain);
+	Common::U32String savePath(_savePath->getLabel());
+	if (!savePath.empty() && (savePath != (_("Default"))))
+		ConfMan.set("savepath", savePath.encode(), _domain);
 	else
 		ConfMan.removeKey("savepath", _domain);
 
-	Common::String themePath(Common::convertFromU32String(_themePath->getLabel()));
-	if (!themePath.empty() && (themePath != Common::convertFromU32String(_c("None", "path"))))
-		ConfMan.set("themepath", themePath, _domain);
+	Common::U32String themePath((_themePath->getLabel()));
+	if (!themePath.empty() && (themePath != _c("None", "path")))
+		ConfMan.set("themepath", themePath.encode(), _domain);
 	else
 		ConfMan.removeKey("themepath", _domain);
 
-	Common::String extraPath(Common::convertFromU32String(_extraPath->getLabel()));
-	if (!extraPath.empty() && (extraPath != Common::convertFromU32String(_c("None", "path"))))
-		ConfMan.set("extrapath", extraPath, _domain);
+	Common::U32String extraPath(_extraPath->getLabel());
+	if (!extraPath.empty() && (extraPath != _c("None", "path")))
+		ConfMan.set("extrapath", extraPath.encode(), _domain);
 	else
 		ConfMan.removeKey("extrapath", _domain);
 
@@ -2228,9 +2228,9 @@ void GlobalOptionsDialog::apply() {
 
 #ifdef USE_CLOUD
 #ifdef USE_SDL_NET
-	Common::String rootPath(Common::convertFromU32String(_rootPath->getLabel()));
-	if (!rootPath.empty() && (rootPath != Common::convertFromU32String(_c("None", "path"))))
-		ConfMan.set("rootpath", rootPath, "cloud");
+	Common::U32String rootPath(_rootPath->getLabel());
+	if (!rootPath.empty() && (rootPath != _c("None", "path")))
+		ConfMan.set("rootpath", rootPath.encode(), "cloud");
 	else
 		ConfMan.removeKey("rootpath", "cloud");
 #endif
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 48369033f0..4aa051a699 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -1182,7 +1182,7 @@ void SavenameDialog::open() {
 	Dialog::open();
 	setResult(-1);
 
-	_title->setLabel(Common::String::format(Common::convertFromU32String(_("Enter a description for slot %d:")).c_str(), _targetSlot));
+	_title->setLabel(Common::U32String::format(Common::convertFromU32String(_("Enter a description for slot %d:")).c_str(), _targetSlot));
 }
 
 void SavenameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index bf2fcff335..b96236e874 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -84,7 +84,7 @@ void PopUpDialog::open() {
 		_w = 0;
 
 		for (uint i = 0; i < _entries.size(); i++) {
-			int width = g_gui.getStringWidth(Common::convertFromU32String(_entries[i]));
+			int width = g_gui.getStringWidth(_entries[i]);
 
 			if (width > _w)
 				_w = width;
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp
index 66178fb4b1..645e7110c7 100644
--- a/gui/widgets/tab.cpp
+++ b/gui/widgets/tab.cpp
@@ -120,7 +120,7 @@ int TabWidget::addTab(const U32String &title, const String &dialogName) {
 	newTab.firstWidget = nullptr;
 
 	// Determine the new tab width
-	int newWidth = g_gui.getStringWidth(Common::convertFromU32String(title)) + kTabTitleSpacing;
+	int newWidth = g_gui.getStringWidth(title) + kTabTitleSpacing;
 	if (newWidth < _minTabWidth)
 		newWidth = _minTabWidth;
 	newTab._tabWidth = newWidth;
@@ -350,7 +350,7 @@ void TabWidget::reflowLayout() {
 
 	for (uint i = 0; i < _tabs.size(); ++i) {
 		// Determine the new tab width
-		int newWidth = g_gui.getStringWidth(Common::convertFromU32String(_tabs[i].title)) + kTabTitleSpacing;
+		int newWidth = g_gui.getStringWidth(_tabs[i].title) + kTabTitleSpacing;
 		if (newWidth < _minTabWidth)
 			newWidth = _minTabWidth;
 		_tabs[i]._tabWidth = newWidth;


Commit: b9a449480b75831e297d4c4cabcdf63cf16b7f05
    https://github.com/scummvm/scummvm/commit/b9a449480b75831e297d4c4cabcdf63cf16b7f05
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Remove u32::format references

- Removed because implicit conversion can simply handle this usecase

Changed paths:
    audio/mididrv.cpp
    backends/cloud/storage.cpp
    backends/graphics/openglsdl/openglsdl-graphics.cpp
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    backends/networking/sdl_net/handlers/filespagehandler.cpp
    common/achievements.cpp
    common/translation.cpp
    gui/downloaddialog.cpp
    gui/massadd.cpp
    gui/options.cpp
    gui/saveload-dialog.cpp


diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp
index 1cbe08b854..e189d78296 100644
--- a/audio/mididrv.cpp
+++ b/audio/mididrv.cpp
@@ -173,7 +173,7 @@ Common::U32String MidiDriver::getDeviceString(DeviceHandle handle, DeviceStringT
 
 MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 	// Query the selected music device (defaults to MT_AUTO device).
-	Common::String selDevStr = ConfMan.hasKey("music_driver") ? ConfMan.get("music_driver") : Common::String("auto");
+	Common::U32String selDevStr = ConfMan.hasKey("music_driver") ? ConfMan.get("music_driver") : Common::String("auto");
 	if ((flags & MDT_PREFER_FLUID) && selDevStr == "auto") {
 		selDevStr = "fluidsynth";
 	}
@@ -256,8 +256,8 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 		// we display a warning and continue.
 		failedDevStr = selDevStr;
 		Common::U32String warningMsg = Common::String::format(
-			Common::convertFromU32String(_("The selected audio device '%s' was not found (e.g. might be turned off or disconnected).")).c_str(),
-			failedDevStr.c_str()) + " " + Common::convertFromU32String(_("Attempting to fall back to the next available device...")).c_str();
+			_("The selected audio device '%s' was not found (e.g. might be turned off or disconnected).").encode().c_str(),
+			failedDevStr.encode() + " " + _("Attempting to fall back to the next available device...").encode());
 		GUI::MessageDialog dialog(warningMsg);
 		dialog.runModal();
 	}
@@ -269,9 +269,9 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 		} else {
 			// If the expressly selected device cannot be used we display a warning and continue.
 			failedDevStr = getDeviceString(hdl, MidiDriver::kDeviceName);
-			Common::String warningMsg = Common::String::format(
-				Common::convertFromU32String(_("The selected audio device '%s' cannot be used. See log file for more information.")).c_str(),
-				failedDevStr.c_str()) + " " + Common::convertFromU32String(_("Attempting to fall back to the next available device...")).c_str();
+			Common::U32String warningMsg = Common::String::format(
+				_("The selected audio device '%s' cannot be used. See log file for more information.").encode().c_str(),
+				failedDevStr.encode() + " " + _("Attempting to fall back to the next available device...").encode());
 			GUI::MessageDialog dialog(warningMsg);
 			dialog.runModal();
 		}
@@ -307,9 +307,9 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 					// we display a warning and continue. Don't warn about the missing device if we did already (this becomes relevant if the
 					// missing device is selected as preferred device and also as GM or MT-32 device).
 					if (failedDevStr != devStr) {
-						Common::String warningMsg = Common::String::format(
-							Common::convertFromU32String(_("The preferred audio device '%s' was not found (e.g. might be turned off or disconnected).")).c_str(),
-							devStr.c_str()) + " " + Common::convertFromU32String(_("Attempting to fall back to the next available device...")).c_str();
+						Common::U32String warningMsg = Common::String::format(
+							_("The preferred audio device '%s' was not found (e.g. might be turned off or disconnected).").encode().c_str(),
+							devStr + " " + _("Attempting to fall back to the next available device...").encode());
 						GUI::MessageDialog dialog(warningMsg);
 						dialog.runModal();
 					}
@@ -324,9 +324,9 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 						// Don't warn about the failing device if we did already (this becomes relevant if the failing
 						// device is selected as preferred device and also as GM or MT-32 device).
 						if (failedDevStr != getDeviceString(hdl, MidiDriver::kDeviceName)) {
-							Common::String warningMsg = Common::String::format(
-								Common::convertFromU32String(_("The preferred audio device '%s' cannot be used. See log file for more information.")).c_str(),
-								getDeviceString(hdl, MidiDriver::kDeviceName).c_str()) + " " + Common::convertFromU32String(_("Attempting to fall back to the next available device...")).c_str();
+							Common::U32String warningMsg = Common::String::format(
+								_("The preferred audio device '%s' cannot be used. See log file for more information.").encode().c_str(),
+								getDeviceString(hdl, MidiDriver::kDeviceName).encode() + " " + _("Attempting to fall back to the next available device...").encode());
 							GUI::MessageDialog dialog(warningMsg);
 							dialog.runModal();
 						}
diff --git a/backends/cloud/storage.cpp b/backends/cloud/storage.cpp
index 90a554bf9d..2569b38bf5 100644
--- a/backends/cloud/storage.cpp
+++ b/backends/cloud/storage.cpp
@@ -346,7 +346,7 @@ void Storage::directoryDownloadedCallback(FileArrayResponse response) {
 	Common::U32String message;
 	if (response.value.size()) {
 		message = Common::String::format(
-			Common::convertFromU32String(_("Download complete.\nFailed to download %u files.")).c_str(),
+			_("Download complete.\nFailed to download %u files.").encode().c_str(),
 			response.value.size());
 	} else {
 		message = _("Download complete.");
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index ecf4ddb182..1414fff63f 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -583,7 +583,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 #ifdef USE_OSD
 		int windowWidth = 0, windowHeight = 0;
 		getWindowSizeFromSdl(&windowWidth, &windowHeight);
-		const Common::U32String osdMsg = Common::String::format(Common::convertFromU32String(_("Resolution: %dx%d")).c_str(), windowWidth, windowHeight);
+		const Common::U32String osdMsg = Common::String::format(_("Resolution: %dx%d").encode().c_str(), windowWidth, windowHeight);
 		displayMessageOnOSD(osdMsg);
 #endif
 
@@ -660,8 +660,8 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 
 #ifdef USE_OSD
 		Common::U32String message = Common::String::format("%s: %s",
-			_("Stretch mode"),
-			_(stretchModes[index].description)
+			_("Stretch mode").encode().c_str(),
+			_(stretchModes[index].description).encode().c_str()
 			);
 		displayMessageOnOSD(message);
 #endif
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 0d9b3ef9c9..159c39912f 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2466,7 +2466,7 @@ void SurfaceSdlGraphicsManager::handleScalerHotkeys(int scalefactor, int scalerT
 		if (newScalerName) {
 			const Common::U32String message = Common::String::format(
 				"%s %s\n%d x %d -> %d x %d",
-				_("Active graphics filter:"),
+				_("Active graphics filter:").encode().c_str(),
 				newScalerName,
 				_videoMode.screenWidth, _videoMode.screenHeight,
 				_hwScreen->w, _hwScreen->h);
@@ -2500,13 +2500,13 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 		Common::U32String message;
 		if (_videoMode.aspectRatioCorrection)
 			message = Common::String::format("%s\n%d x %d -> %d x %d",
-			                                 _("Enabled aspect ratio correction"),
+			                                 _("Enabled aspect ratio correction").encode().c_str(),
 			                                 _videoMode.screenWidth, _videoMode.screenHeight,
 			                                 _hwScreen->w, _hwScreen->h
 			);
 		else
 			message = Common::String::format("%s\n%d x %d -> %d x %d",
-			                                 _("Disabled aspect ratio correction"),
+			                                 _("Disabled aspect ratio correction").encode().c_str(),
 			                                 _videoMode.screenWidth, _videoMode.screenHeight,
 			                                 _hwScreen->w, _hwScreen->h
 			);
@@ -2553,8 +2553,8 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 
 #ifdef USE_OSD
 		Common::U32String message = Common::String::format("%s: %s",
-		                                                _("Stretch mode"),
-		                                                _(s_supportedStretchModes[index].description)
+		                                                _("Stretch mode").encode().c_str(),
+		                                                _(s_supportedStretchModes[index].description).encode().c_str()
 		);
 		displayMessageOnOSD(message);
 #endif
diff --git a/backends/networking/sdl_net/handlers/filespagehandler.cpp b/backends/networking/sdl_net/handlers/filespagehandler.cpp
index fd5a37bcca..b40dd1a53c 100644
--- a/backends/networking/sdl_net/handlers/filespagehandler.cpp
+++ b/backends/networking/sdl_net/handlers/filespagehandler.cpp
@@ -229,7 +229,7 @@ void FilesPageHandler::handle(Client &client) {
 	replace(response, "{create_directory_desc}", _("Type new directory name:").encode());
 	replace(response, "{upload_file_desc}", _("Select a file to upload:").encode());
 	replace(response, "{or_upload_directory_desc}", _("Or select a directory (works in Chrome only):").encode());
-	replace(response, "{index_of_directory}", Common::String::format("%s %s", Common::convertFromU32String(_("Index of")).c_str(), encodeHtmlEntities(getDisplayPath(client.queryParameter("path"))).c_str()));
+	replace(response, "{index_of_directory}", Common::String::format("%s %s", _("Index of").encode().c_str(), encodeHtmlEntities(getDisplayPath(client.queryParameter("path")))));
 	replace(response, "{content}", content);
 	LocalWebserver::setClientGetHandler(client, response);
 }
diff --git a/common/achievements.cpp b/common/achievements.cpp
index 6f3cf6d3a0..7a7292522e 100644
--- a/common/achievements.cpp
+++ b/common/achievements.cpp
@@ -89,7 +89,7 @@ bool AchievementsManager::setAchievement(const String &id, const String &display
 
 	if (!displayedMessage.empty() && g_system) {
 		U32String msg;
-		msg = Common::String::format("%s\n%s", _("Achievement unlocked!"), displayedMessage.c_str());
+		msg = Common::String::format("%s\n%s", _("Achievement unlocked!").encode().c_str(), displayedMessage.c_str());
 		g_system->displayMessageOnOSD(msg);
 	}
 
diff --git a/common/translation.cpp b/common/translation.cpp
index 7a8ad64e9b..46d333e8c1 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -144,17 +144,17 @@ U32String TranslationManager::getTranslation(const char *message, const char *co
 			}
 			// Find the context we want
 			if (context == nullptr || *context == '\0' || leftIndex == rightIndex)
-				return _currentTranslationMessages[leftIndex].msgstr.c_str();
+				return _currentTranslationMessages[leftIndex].msgstr;
 			// We could use again binary search, but there should be only a small number of contexts.
 			while (rightIndex > leftIndex) {
 				compareResult = strcmp(context, _currentTranslationMessages[rightIndex].msgctxt.c_str());
 				if (compareResult == 0)
-					return _currentTranslationMessages[rightIndex].msgstr.c_str();
+					return _currentTranslationMessages[rightIndex].msgstr;
 				else if (compareResult > 0)
 					break;
 				--rightIndex;
 			}
-			return _currentTranslationMessages[leftIndex].msgstr.c_str();
+			return _currentTranslationMessages[leftIndex].msgstr;
 		} else if (compareResult < 0)
 			rightIndex = midIndex - 1;
 		else
diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp
index 8edf0435a5..aeb4d927cd 100644
--- a/gui/downloaddialog.cpp
+++ b/gui/downloaddialog.cpp
@@ -149,7 +149,7 @@ bool DownloadDialog::selectDirectories() {
 				return false;
 			}
 			GUI::MessageDialog alert(
-				Common::String::format(Common::convertFromU32String(_("The \"%s\" already exists in the specified directory.\nDo you really want to download files into that directory?")).c_str(), remoteDirectory.name().c_str()),
+				Common::String::format(_("The \"%s\" already exists in the specified directory.\nDo you really want to download files into that directory?").encode().c_str(), remoteDirectory.name().c_str()),
 				_("Yes"),
 				_("No")
 				);
@@ -212,14 +212,14 @@ Common::U32String DownloadDialog::getSizeLabelText() {
 	Common::String downloaded, downloadedUnits, total, totalUnits;
 	downloaded = getHumanReadableBytes(CloudMan.getDownloadBytesNumber(), downloadedUnits);
 	total = getHumanReadableBytes(CloudMan.getDownloadTotalBytesNumber(), totalUnits);
-	return Common::U32String::format(Common::convertFromU32String(_("Downloaded %s %s / %s %s")).c_str(), downloaded.c_str(), _(downloadedUnits.c_str()), total.c_str(), _(totalUnits.c_str()));
+	return Common::String::format(_("Downloaded %s %s / %s %s").encode().c_str(), downloaded.c_str(), _(downloadedUnits.c_str()).encode().c_str(), total.c_str(), _(totalUnits.c_str()).encode().c_str());
 }
 
 Common::U32String DownloadDialog::getSpeedLabelText() {
 	Common::String speed, speedUnits;
 	speed = getHumanReadableBytes(CloudMan.getDownloadSpeed(), speedUnits);
 	speedUnits += "/s";
-	return Common::U32String::format(_("Download speed: %s %s").encode().c_str(), speed.c_str(), _(speedUnits).encode().c_str());
+	return Common::String::format(_("Download speed: %s %s").encode().c_str(), speed.c_str(), _(speedUnits).encode().c_str());
 }
 
 void DownloadDialog::refreshWidgets() {
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 64946119c2..345db60cf9 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -266,14 +266,14 @@ void MassAddDialog::handleTickle() {
 		buf = _("Scan complete!");
 		_dirProgressText->setLabel(buf);
 
-		buf = Common::U32String::format(Common::convertFromU32String(_("Discovered %d new games, ignored %d previously added games.")).c_str(), _games.size(), _oldGamesCount);
+		buf = Common::String::format(Common::convertFromU32String(_("Discovered %d new games, ignored %d previously added games.")).c_str(), _games.size(), _oldGamesCount);
 		_gameProgressText->setLabel(buf);
 
 	} else {
-		buf = Common::U32String::format(Common::convertFromU32String(_("Scanned %d directories ...")).c_str(), _dirsScanned);
+		buf = Common::String::format(Common::convertFromU32String(_("Scanned %d directories ...")).c_str(), _dirsScanned);
 		_dirProgressText->setLabel(buf);
 
-		buf = Common::U32String::format(Common::convertFromU32String(_("Discovered %d new games, ignored %d previously added games ...")).c_str(), _games.size(), _oldGamesCount);
+		buf = Common::String::format(Common::convertFromU32String(_("Discovered %d new games, ignored %d previously added games ...")).c_str(), _games.size(), _oldGamesCount);
 		_gameProgressText->setLabel(buf);
 	}
 
diff --git a/gui/options.cpp b/gui/options.cpp
index ac88e8488b..b58016957c 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1170,12 +1170,12 @@ void OptionsDialog::addAchievementsControls(GuiObject *boss, const Common::Strin
 	}
 
 	if (nHidden) {
-		Common::U32String hiddenStr = Common::U32String::format(Common::convertFromU32String(_("%d hidden achievements remaining")).c_str(), nHidden);
+		Common::U32String hiddenStr = Common::String::format(Common::convertFromU32String(_("%d hidden achievements remaining")).c_str(), nHidden);
 		new StaticTextWidget(scrollContainer, lineHeight, yPos, width, yStep, hiddenStr, Graphics::kTextAlignStart);
 	}
 
 	if (nMax) {
-		Common::U32String totalStr = Common::U32String::format(Common::convertFromU32String(_("Achievements unlocked: %d/%d")).c_str(), nAchieved, nMax);
+		Common::U32String totalStr = Common::String::format(Common::convertFromU32String(_("Achievements unlocked: %d/%d")).c_str(), nAchieved, nMax);
 		new StaticTextWidget(scrollContainer, lineHeight, lineHeight, width, yStep, totalStr, Graphics::kTextAlignStart);
 
 		SliderWidget *progressBar;
@@ -2148,7 +2148,7 @@ void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::Stri
 	uint32 port = Networking::LocalWebserver::getPort();
 
 	_serverPortDesc = new StaticTextWidget(boss, prefix + "ServerPortDesc", (_("Server's port:")), _("Port for server to use"));
-	_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::U32String::format("%u", port), Common::U32String(""));
+	_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), Common::U32String(""));
 	_serverPortClearButton = addClearButton(boss, prefix + "ServerPortClearButton", kServerPortClearCmd);
 
 	if (lowres) {
@@ -2805,7 +2805,7 @@ void GlobalOptionsDialog::setupCloudTab() {
 		uint64 usedSpace = CloudMan.getStorageUsedSpace(_selectedStorageIndex);
 		Common::String usedSpaceNumber, usedSpaceUnits;
 		usedSpaceNumber = Common::getHumanReadableBytes(usedSpace, usedSpaceUnits);
-		_storageUsedSpace->setLabel(Common::U32String::format("%s %s", usedSpaceNumber.c_str(), _(usedSpaceUnits.c_str()).encode().c_str()));
+		_storageUsedSpace->setLabel(Common::String::format("%s %s", usedSpaceNumber.c_str(), _(usedSpaceUnits.c_str()).encode().c_str()));
 		_storageUsedSpace->setVisible(shownConnectedInfo);
 	}
 	if (_storageSyncHint) {
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 4aa051a699..48369033f0 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -1182,7 +1182,7 @@ void SavenameDialog::open() {
 	Dialog::open();
 	setResult(-1);
 
-	_title->setLabel(Common::U32String::format(Common::convertFromU32String(_("Enter a description for slot %d:")).c_str(), _targetSlot));
+	_title->setLabel(Common::String::format(Common::convertFromU32String(_("Enter a description for slot %d:")).c_str(), _targetSlot));
 }
 
 void SavenameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {


Commit: 3641e24daad0c9294f4e2def322fed16d984db6c
    https://github.com/scummvm/scummvm/commit/3641e24daad0c9294f4e2def322fed16d984db6c
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
JANITORIAL: Add missing space

Changed paths:
    backends/text-to-speech/windows/windows-text-to-speech.cpp


diff --git a/backends/text-to-speech/windows/windows-text-to-speech.cpp b/backends/text-to-speech/windows/windows-text-to-speech.cpp
index 59eb599a55..09e4239487 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.cpp
+++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp
@@ -192,7 +192,7 @@ bool WindowsTextToSpeechManager::say(Common::String str, Action action, Common::
 	}
 
 	// We have to set the pitch by prepending xml code at the start of the said string;
-	Common::String pitch= Common::String::format("<pitch absmiddle=\"%d\">", _ttsState->_pitch / 10);
+	Common::String pitch = Common::String::format("<pitch absmiddle=\"%d\">", _ttsState->_pitch / 10);
 	str.replace((uint32)0, 0, pitch);
 	WCHAR *strW = (WCHAR *) Common::Encoding::convert("UTF-16", charset, str.c_str(), str.size());
 	if (strW == nullptr) {


Commit: c0458adec203da4904aff84f78d38547c97c58fa
    https://github.com/scummvm/scummvm/commit/c0458adec203da4904aff84f78d38547c97c58fa
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use u32 for about dialog

Changed paths:
    gui/about.cpp
    gui/about.h


diff --git a/gui/about.cpp b/gui/about.cpp
index 82d46a99c9..a82e3252e7 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -93,30 +93,30 @@ AboutDialog::AboutDialog()
 	int i;
 
 	for (i = 0; i < 1; i++)
-		_lines.push_back("");
+		_lines.push_back(U32String(""));
 
 	Common::String version("C0""ScummVM ");
 	version += gScummVMVersion;
 	_lines.push_back(version);
 
-	Common::String date = Common::String::format(Common::convertFromU32String(_("(built on %s)")).c_str(), gScummVMBuildDate);
-	_lines.push_back("C2" + date);
+	Common::String date = Common::String::format(_("(built on %s)").encode().c_str(), gScummVMBuildDate);
+	_lines.push_back(U32String("C2") + date);
 
 	for (i = 0; i < ARRAYSIZE(copyright_text); i++)
-		addLine(copyright_text[i]);
+		addLine(U32String(copyright_text[i]));
 
-	Common::String features("C1");
-	features += Common::convertFromU32String(_("Features compiled in:"));
-	addLine(features.c_str());
+	Common::U32String features("C1");
+	features += _("Features compiled in:");
+	addLine(features);
 	Common::String featureList("C0");
 	featureList += gScummVMFeatures;
-	addLine(featureList.c_str());
+	addLine(featureList);
 
-	_lines.push_back("");
+	_lines.push_back(U32String(""));
 
-	Common::String engines("C1");
-	engines += Common::convertFromU32String(_("Available engines:"));
-	addLine(engines.c_str());
+	Common::U32String engines("C1");
+	engines += _("Available engines:");
+	addLine(engines);
 
 	const PluginList &plugins = EngineMan.getPlugins();
 	PluginList::const_iterator iter = plugins.begin();
@@ -124,32 +124,35 @@ AboutDialog::AboutDialog()
 		Common::String str;
 		str = "C0";
 		str += (*iter)->getName();
-		addLine(str.c_str());
+		addLine(str);
 
 		str = "C2";
 		str += (*iter)->get<MetaEngine>().getOriginalCopyright();
-		addLine(str.c_str());
+		addLine(str);
 
 		//addLine("");
 	}
 
 	for (i = 0; i < ARRAYSIZE(gpl_text); i++)
-		addLine(gpl_text[i]);
+		addLine(U32String(gpl_text[i]));
 
-	_lines.push_back("");
+	_lines.push_back(U32String(""));
 
 	for (i = 0; i < ARRAYSIZE(credits); i++)
-		addLine(credits[i]);
+		addLine(U32String(credits[i]));
 }
 
-void AboutDialog::addLine(const char *str) {
-	if (*str == 0) {
-		_lines.push_back("");
+void AboutDialog::addLine(const U32String &str) {
+	U32String::const_iterator strBeginItr = str.begin();
+	if (*strBeginItr == 0) {
+		_lines.push_back(U32String(""));
 	} else {
-		Common::String format(str, 2);
-		str += 2;
+		U32String dupliStr = str;
+		Common::U32String format(dupliStr.encode().c_str(), 2);
+		strBeginItr += 2;
+		U32String renderStr(strBeginItr, str.end());
 
-		static Common::String asciiStr;
+		static Common::U32String asciiStr;
 		if (format[0] == 'A') {
 			bool useAscii = false;
 #ifdef USE_TRANSLATION
@@ -159,17 +162,17 @@ void AboutDialog::addLine(const char *str) {
 			useAscii = (TransMan.getCharsetMapping() != nullptr);
 #endif
 			if (useAscii)
-				asciiStr = str;
+				asciiStr = renderStr;
 			return;
 		}
-		StringArray wrappedLines;
+		U32StringArray wrappedLines;
 		if (!asciiStr.empty()) {
 			g_gui.getFont().wordWrapText(asciiStr, _w - 2 * _xOff, wrappedLines);
 			asciiStr.clear();
 		} else
-			g_gui.getFont().wordWrapText(str, _w - 2 * _xOff, wrappedLines);
+			g_gui.getFont().wordWrapText(renderStr, _w - 2 * _xOff, wrappedLines);
 
-		for (StringArray::const_iterator i = wrappedLines.begin(); i != wrappedLines.end(); ++i) {
+		for (U32StringArray::const_iterator i = wrappedLines.begin(); i != wrappedLines.end(); ++i) {
 			_lines.push_back(format + *i);
 		}
 	}
@@ -203,11 +206,14 @@ void AboutDialog::drawDialog(DrawLayer layerToDraw) {
 	int y = _y + _yOff - (_scrollPos % _lineHeight);
 
 	for (int line = firstLine; line < lastLine; line++) {
-		const char *str = _lines[line].c_str();
+		U32String str = _lines[line];
+		U32String::const_iterator strLineItrBegin = _lines[line].begin();
+		U32String::const_iterator strLineItrEnd = _lines[line].end();
+
 		Graphics::TextAlign align = Graphics::kTextAlignCenter;
 		ThemeEngine::WidgetStateInfo state = ThemeEngine::kStateEnabled;
-		if (*str) {
-			switch (str[0]) {
+		if (*strLineItrBegin) {
+			switch (*strLineItrBegin) {
 			case 'C':
 				align = Graphics::kTextAlignCenter;
 				break;
@@ -221,7 +227,7 @@ void AboutDialog::drawDialog(DrawLayer layerToDraw) {
 				error("Unknown scroller opcode '%c'", str[0]);
 				break;
 			}
-			switch (str[1]) {
+			switch (*(strLineItrBegin + 1)) {
 			case '0':
 				state = ThemeEngine::kStateEnabled;
 				break;
@@ -242,16 +248,17 @@ void AboutDialog::drawDialog(DrawLayer layerToDraw) {
 			default:
 				error("Unknown color type '%c'", str[1]);
 			}
-			str += 2;
+			strLineItrBegin += 2;
 		}
 		// Trim leading whitespaces if center mode is on
 		if (align == Graphics::kTextAlignCenter)
-			while (*str && *str == ' ')
-				str++;
+			while (*strLineItrBegin && *strLineItrBegin == ' ')
+				strLineItrBegin++;
 
-		if (*str)
+		U32String renderStr(strLineItrBegin, strLineItrEnd);
+		if (!renderStr.empty())
 			g_gui.theme()->drawText(Common::Rect(_x + _xOff, y, _x + _w - _xOff, y + g_gui.theme()->getFontHeight()),
-									Common::convertToU32String(str), state, align, ThemeEngine::kTextInversionNone, 0, false,
+									renderStr, state, align, ThemeEngine::kTextInversionNone, 0, false,
 			                        ThemeEngine::kFontStyleBold, ThemeEngine::kFontColorNormal, true, _textDrawableArea);
 		y += _lineHeight;
 	}
diff --git a/gui/about.h b/gui/about.h
index d7cca0363c..5d952c38e3 100644
--- a/gui/about.h
+++ b/gui/about.h
@@ -33,17 +33,18 @@ namespace GUI {
 class EEHandler;
 
 class AboutDialog : public Dialog {
-	typedef Common::Array<Common::String> StringArray;
+	typedef Common::U32String U32String;
+	typedef Common::Array<Common::U32String> U32StringArray;
 protected:
-	int			_scrollPos;
-	uint32		_scrollTime;
-	StringArray	_lines;
-	uint32		_lineHeight;
-	bool		_willClose;
+	int				_scrollPos;
+	uint32			_scrollTime;
+	U32StringArray	_lines;
+	uint32			_lineHeight;
+	bool			_willClose;
 
 	int _xOff, _yOff;
 
-	void addLine(const char *str);
+	void addLine(const U32String &str);
 
 	EEHandler	*_eeHandler;
 


Commit: cbc83065c0ecbb3fa14c862dc69afe8458a365fc
    https://github.com/scummvm/scummvm/commit/cbc83065c0ecbb3fa14c862dc69afe8458a365fc
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Fix warnings with printf statements

Command line printfs used some functions which returned u32 strings. Correctly encode them and then turn into c_str

Changed paths:
    base/commandLine.cpp


diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index c45f860cbf..8e264f148e 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -917,7 +917,7 @@ static Common::Error listSaves(const Common::String &singleTarget) {
 					   "  ---- ------------------------------------------------------\n");
 
 			for (SaveStateList::const_iterator x = saveList.begin(); x != saveList.end(); ++x) {
-				printf("  %-4d %s\n", x->getSaveSlot(), x->getDescription().c_str());
+				printf("  %-4d %s\n", x->getSaveSlot(), x->getDescription().encode().c_str());
 				// TODO: Could also iterate over the full hashmap, printing all key-value pairs
 			}
 			atLeastOneFound = true;
@@ -961,7 +961,7 @@ static void listAudioDevices() {
 		const MusicPluginObject &musicObject = (*i)->get<MusicPluginObject>();
 		MusicDevices deviceList = musicObject.getDevices();
 		for (MusicDevices::iterator j = deviceList.begin(), jend = deviceList.end(); j != jend; ++j) {
-			printf("%-30s %s\n", Common::String::format("\"%s\"", j->getCompleteId().c_str()).c_str(), j->getCompleteName().c_str());
+			printf("%-30s %s\n", Common::String::format("\"%s\"", j->getCompleteId().encode().c_str()).c_str(), j->getCompleteName().encode().c_str());
 		}
 	}
 }


Commit: 49c36c2b45618f96b33401ad8c17c03caff8a5b0
    https://github.com/scummvm/scummvm/commit/49c36c2b45618f96b33401ad8c17c03caff8a5b0
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Begin converting texts in clipboards to u32strings

With this commit the base class variables and the parts where getClipboard and setClipboard are used is changed accordingly.

Changed paths:
    backends/platform/sdl/sdl.cpp
    backends/platform/sdl/sdl.h
    common/system.h
    gui/console.cpp
    gui/options.cpp
    gui/widgets/editable.cpp


diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 99ebb73d7e..e640a698a3 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -495,7 +495,7 @@ bool OSystem_SDL::hasTextInClipboard() {
 	return SDL_HasClipboardText() == SDL_TRUE;
 }
 
-Common::String OSystem_SDL::getTextFromClipboard() {
+Common::U32String OSystem_SDL::getTextFromClipboard() {
 	if (!hasTextInClipboard()) return "";
 
 	char *text = SDL_GetClipboardText();
@@ -510,17 +510,17 @@ Common::String OSystem_SDL::getTextFromClipboard() {
 		SDL_free(text);
 		text = conv_text;
 	}
-	Common::String strText = text;
+	Common::U32String strText = text;
 	SDL_free(text);
 
 	return strText;
 }
 
-bool OSystem_SDL::setTextInClipboard(const Common::String &text) {
+bool OSystem_SDL::setTextInClipboard(const Common::U32String &text) {
 	// The encoding we need to use is UTF-8. Assume we currently have the
 	// current TranslationManager encoding or ISO-8859-1.
 #ifdef USE_TRANSLATION
-	char *utf8_text = SDL_iconv_string("UTF-8", TransMan.getCurrentCharset().c_str(), text.c_str(), text.size() + 1);
+	char *utf8_text = SDL_iconv_string("UTF-8", TransMan.getCurrentCharset().c_str(), text.encode().c_str(), text.size() + 1);
 #else
 	char *utf8_text = SDL_iconv_string("UTF-8", "ISO-8859-1", text.c_str(), text.size() + 1);
 #endif
@@ -529,7 +529,7 @@ bool OSystem_SDL::setTextInClipboard(const Common::String &text) {
 		SDL_free(utf8_text);
 		return status == 0;
 	}
-	return SDL_SetClipboardText(text.c_str()) == 0;
+	return SDL_SetClipboardText(text.encode().c_str()) == 0;
 }
 #endif
 
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index 19142c8a00..72c93eff12 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -71,8 +71,8 @@ public:
 #if SDL_VERSION_ATLEAST(2, 0, 0)
 	// Clipboard
 	virtual bool hasTextInClipboard() override;
-	virtual Common::String getTextFromClipboard() override;
-	virtual bool setTextInClipboard(const Common::String &text) override;
+	virtual Common::U32String getTextFromClipboard() override;
+	virtual bool setTextInClipboard(const Common::U32String &text) override;
 #endif
 
 	virtual void setWindowCaption(const char *caption) override;
diff --git a/common/system.h b/common/system.h
index e5c08cce1c..6f1a316fe7 100644
--- a/common/system.h
+++ b/common/system.h
@@ -27,6 +27,7 @@
 #include "common/noncopyable.h"
 #include "common/array.h" // For OSystem::getGlobalKeymaps()
 #include "common/list.h" // For OSystem::getSupportedFormats()
+#include "common/ustr.h"
 #include "graphics/pixelformat.h"
 #include "graphics/mode.h"
 
@@ -221,7 +222,7 @@ protected:
 	 * Used by the default clipboard implementation, for backends that don't
 	 * implement clipboard support.
 	 */
-	Common::String _clipboard;
+	Common::U32String _clipboard;
 
 	// WORKAROUND. The 014bef9eab9fb409cfb3ec66830e033e4aaa29a9 triggered a bug
 	// in the osx_intel toolchain. Adding this variable fixes it.
@@ -1482,7 +1483,7 @@ public:
 	 *
 	 * @return clipboard contents ("" if hasTextInClipboard() == false)
 	 */
-	virtual Common::String getTextFromClipboard() { return _clipboard; }
+	virtual Common::U32String getTextFromClipboard() { return _clipboard; }
 
 	/**
 	 * Set the content of the clipboard to the given string.
@@ -1493,7 +1494,7 @@ public:
 	 *
 	 * @return true if the text was properly set in the clipboard, false otherwise
 	 */
-	virtual bool setTextInClipboard(const Common::String &text) { _clipboard = text; return true; }
+	virtual bool setTextInClipboard(const Common::U32String &text) { _clipboard = text; return true; }
 
 	/**
 	 * Open the given Url in the default browser (if available on the target
diff --git a/gui/console.cpp b/gui/console.cpp
index d2df0fd31d..84fc9616ec 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -528,8 +528,8 @@ void ConsoleDialog::specialKeys(Common::KeyCode keycode) {
 		break;
 	case Common::KEYCODE_v:
 		if (g_system->hasTextInClipboard()) {
-			Common::String text = g_system->getTextFromClipboard();
-			insertIntoPrompt(text.c_str());
+			Common::U32String text = g_system->getTextFromClipboard();
+			insertIntoPrompt(text.encode().c_str());
 			scrollToCurrent();
 			drawLine(pos2line(_currentPos));
 		}
diff --git a/gui/options.cpp b/gui/options.cpp
index b58016957c..ff206192ca 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2563,7 +2563,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 	}
 	case kPasteCodeStorageCmd: {
 		if (g_system->hasTextInClipboard()) {
-			Common::String message = g_system->getTextFromClipboard();
+			Common::U32String message = g_system->getTextFromClipboard();
 			if (!message.empty()) {
 				_storageWizardCodeBox->setEditString(message);
 				_redrawCloudTab = true;
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index 4e5a414355..51ac4b4c9f 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -197,7 +197,7 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) {
 	case Common::KEYCODE_v:
 		if (state.flags & Common::KBD_CTRL) {
 			if (g_system->hasTextInClipboard()) {
-				String text = g_system->getTextFromClipboard();
+				U32String text = g_system->getTextFromClipboard();
 				for (uint32 i = 0; i < text.size(); ++i) {
 					if (tryInsertChar(text[i], _caretPos))
 						++_caretPos;
@@ -212,7 +212,7 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) {
 	case Common::KEYCODE_c:
 		if (state.flags & Common::KBD_CTRL) {
 			if (!getEditString().empty())
-				g_system->setTextInClipboard(Common::convertFromU32String(getEditString()));
+				g_system->setTextInClipboard(getEditString());
 		} else {
 			defaultKeyDownHandler(state, dirty, forcecaret, handled);
 		}


Commit: fd763b61e5d0f3e1a57a4dfdd3b1eda56d161797
    https://github.com/scummvm/scummvm/commit/fd763b61e5d0f3e1a57a4dfdd3b1eda56d161797
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Add U32String conversion helpers to str.cpp

This commit adds a constructor and a "=" operator to allow conversion from u32strings->strings

Changed paths:
    common/str.cpp
    common/str.h


diff --git a/common/str.cpp b/common/str.cpp
index 0ec93b61d2..6189433bf3 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -125,6 +125,11 @@ String::String(char c)
 	_size = (c == 0) ? 0 : 1;
 }
 
+String::String(const U32String &str) {
+	String internString = str.encode();
+	String::String(internString);
+}
+
 String::~String() {
 	decRefCount(_extern._refCount);
 }
@@ -283,6 +288,11 @@ String &String::operator=(char c) {
 	return *this;
 }
 
+String &String::operator=(const U32String &str) {
+	String internString = str.encode();
+	return String::operator=(internString);
+}
+
 String &String::operator+=(const char *str) {
 	if (pointerInOwnBuffer(str))
 		return operator+=(String(str));
diff --git a/common/str.h b/common/str.h
index 0b2a9f6b89..72f872684b 100644
--- a/common/str.h
+++ b/common/str.h
@@ -25,6 +25,7 @@
 
 #include "common/scummsys.h"
 #include "common/str-enc.h"
+#include "common/ustr.h"
 
 #include <stdarg.h>
 
@@ -128,11 +129,15 @@ public:
 	/** Construct a string consisting of the given character. */
 	explicit String(char c);
 
+	/** Construct a new string from the given u32 string. */
+	String(const U32String &str);
+
 	~String();
 
 	String &operator=(const char *str);
 	String &operator=(const String &str);
 	String &operator=(char c);
+	String &operator=(const U32String &str);
 	String &operator+=(const char *str);
 	String &operator+=(const String &str);
 	String &operator+=(char c);


Commit: bed05ea134cd40b7a6da314432f146f0a872e50b
    https://github.com/scummvm/scummvm/commit/bed05ea134cd40b7a6da314432f146f0a872e50b
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Fix compilation errors across entire project

After the initial changes just to scummvm/gui for u32, this commit includes the whole project

- Widget creations now always have u32 descriptions, labels, or tooltips
- Message dialogs make use of default arguments instead of providing the same argument explicitly
- encode String::format properly before passing on as argument where necessary
- Modify hugo utils (yesNoBox and notify box) to use u32
- Also provide fake constructors for the above which redirect to the u32 constructor
- Convert all keymap descriptions to u32 across all engines
- showConfirmationDialog in mohawk now uses u32
- showScummVMDialog also uses u32
- Scumm engine has dialogs now which use u32
- General fixes and wrapping convertToU32String for setLabels and related functions
- Add a fake constructor to MesssageDialog which redirects to the u32 constructor

Changed paths:
    engines/access/resources.cpp
    engines/agos/animation.cpp
    engines/agos/saveload.cpp
    engines/bbvs/dialogs.cpp
    engines/bladerunner/bladerunner.cpp
    engines/bladerunner/subtitles.cpp
    engines/cge/cge.cpp
    engines/drascula/drascula.cpp
    engines/glk/adrift/os_glk.cpp
    engines/glk/advsys/vm.cpp
    engines/glk/glk_api.cpp
    engines/glk/scott/scott.cpp
    engines/glk/zcode/zcode.cpp
    engines/hdb/detection.cpp
    engines/hugo/dialogs.cpp
    engines/hugo/dialogs.h
    engines/hugo/hugo.cpp
    engines/hugo/util.cpp
    engines/hugo/util.h
    engines/illusions/menusystem.cpp
    engines/kyra/gui/saveload_eob.cpp
    engines/lure/lure.cpp
    engines/mohawk/dialogs.cpp
    engines/mohawk/myst.cpp
    engines/mohawk/myst_stacks/menu.cpp
    engines/mohawk/myst_stacks/menu.h
    engines/mohawk/riven.cpp
    engines/mohawk/riven_stacks/aspit.cpp
    engines/mohawk/riven_stacks/aspit.h
    engines/mortevielle/mortevielle.cpp
    engines/mutationofjb/util.cpp
    engines/parallaction/saveload.cpp
    engines/pegasus/pegasus.cpp
    engines/savestate.cpp
    engines/savestate.h
    engines/sci/detection.cpp
    engines/sci/engine/guest_additions.cpp
    engines/sci/engine/guest_additions.h
    engines/sci/engine/kgraphics.cpp
    engines/sci/engine/kgraphics32.cpp
    engines/sci/engine/kmisc.cpp
    engines/sci/engine/savegame.cpp
    engines/sci/engine/state.h
    engines/sci/graphics/controls32.cpp
    engines/sci/graphics/controls32.h
    engines/sci/graphics/video32.cpp
    engines/sci/resource.cpp
    engines/sci/sci.cpp
    engines/sci/sound/music.cpp
    engines/scumm/dialogs.cpp
    engines/scumm/dialogs.h
    engines/scumm/help.cpp
    engines/scumm/imuse/drivers/amiga.cpp
    engines/scumm/resource.cpp
    engines/scumm/scumm.cpp
    engines/scumm/scumm.h
    engines/scumm/string.cpp
    engines/sky/compact.cpp
    engines/sky/detection.cpp
    engines/supernova/supernova.cpp
    engines/sword1/animation.cpp
    engines/sword1/control.cpp
    engines/sword1/logic.cpp
    engines/sword2/animation.cpp
    engines/teenagent/resources.cpp
    engines/testbed/config.cpp
    engines/testbed/config.h
    engines/testbed/sound.cpp
    engines/testbed/testbed.cpp
    engines/testbed/testsuite.cpp
    engines/tinsel/sound.cpp
    engines/tony/tony.cpp
    engines/toon/toon.cpp
    engines/ultima/nuvie/nuvie.cpp
    engines/ultima/shared/engine/data_archive.cpp
    engines/ultima/ultima4/meta_engine.cpp
    engines/ultima/ultima8/gumps/u8_save_gump.cpp
    engines/wintermute/base/base_persistence_manager.cpp
    engines/wintermute/detection.cpp
    engines/wintermute/keymapper_tables.h
    engines/zvision/detection.cpp
    engines/zvision/file/save_manager.cpp
    gui/about.cpp
    gui/downloaddialog.cpp
    gui/fluidsynth-dialog.cpp
    gui/message.cpp
    gui/message.h
    gui/saveload-dialog.cpp


diff --git a/engines/access/resources.cpp b/engines/access/resources.cpp
index 2b7f1aa8f3..ac610ec908 100644
--- a/engines/access/resources.cpp
+++ b/engines/access/resources.cpp
@@ -41,7 +41,7 @@ bool Resources::load(Common::String &errorMessage) {
 	Common::File f;
 	Common::String filename = "access.dat";
 	if (!f.open(filename.c_str())) {
-		errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
+		errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
 		return false;
 	}
 
@@ -49,7 +49,7 @@ bool Resources::load(Common::String &errorMessage) {
 	char buffer[4];
 	f.read(buffer, 4);
 	if (strncmp(buffer, "SVMA", 4)) {
-		errorMessage = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
+		errorMessage = Common::String::format(_("The '%s' engine data file is corrupt.").encode().c_str(), filename.c_str());
 		return false;
 	}
 
@@ -58,7 +58,7 @@ bool Resources::load(Common::String &errorMessage) {
 	uint version = f.readUint16LE();
 	if (version != expectedVersion) {
 		errorMessage = Common::String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.").encode().c_str(),
 			filename.c_str(), expectedVersion, 0, version, 0);
 		return false;
 	}
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index e374c14701..db2e7b3828 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -555,7 +555,7 @@ MoviePlayer *makeMoviePlayer(AGOSEngine_Feeble *vm, const char *name) {
 		return new MoviePlayerSMK(vm, baseName);
 	}
 
-	Common::String buf = Common::String::format(_("Cutscene file '%s' not found!"), baseName);
+	Common::U32String buf = Common::String::format(_("Cutscene file '%s' not found!").encode().c_str(), baseName);
 	GUI::MessageDialog dialog(buf, _("OK"));
 	dialog.runModal();
 
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index 3dce7bf2df..de34e02dd1 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -125,7 +125,7 @@ void AGOSEngine_Feeble::quickLoadOrSave() {
 // was disabled
 void AGOSEngine::quickLoadOrSave() {
 	bool success;
-	Common::String buf;
+	Common::U32String buf;
 
 	// Disable loading and saving when it was not possible in the original:
 	// In overhead maps areas in Simon the Sorcerer 2
@@ -135,7 +135,7 @@ void AGOSEngine::quickLoadOrSave() {
 		(getGameType() == GType_SIMON1 && (getFeatures() & GF_DEMO)) ||
 		_mouseHideCount || _showPreposition) {
 		buf = Common::String::format("Quick load or save game isn't supported in this location");
-		GUI::MessageDialog dialog(buf, "OK");
+		GUI::MessageDialog dialog(buf);
 		dialog.runModal();
 		return;
 	}
@@ -156,7 +156,7 @@ void AGOSEngine::quickLoadOrSave() {
 		Subroutine *sub;
 		success = loadGame(genSaveName(_saveLoadSlot));
 		if (!success) {
-			buf = Common::String::format(_("Failed to load saved game from file:\n\n%s"), filename.c_str());
+			buf = Common::String::format(_("Failed to load saved game from file:\n\n%s").encode().c_str(), filename.c_str());
 		} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
 			drawIconArray(2, me(), 0, 0);
 			setBitFlag(97, true);
@@ -191,15 +191,15 @@ void AGOSEngine::quickLoadOrSave() {
 	} else {
 		success = saveGame(_saveLoadSlot, _saveLoadName);
 		if (!success)
-			buf = Common::String::format(_("Failed to save game to file:\n\n%s"), filename.c_str());
+			buf = Common::String::format(_("Failed to save game to file:\n\n%s").encode().c_str(), filename.c_str());
 	}
 
 	if (!success) {
-		GUI::MessageDialog dialog(buf, "OK");
+		GUI::MessageDialog dialog(buf);
 		dialog.runModal();
 
 	} else if (_saveLoadType == 1) {
-		buf = Common::String::format(_("Successfully saved game in file:\n\n%s"), filename.c_str());
+		buf = Common::String::format(_("Successfully saved game in file:\n\n%s").encode().c_str(), filename.c_str());
 		GUI::TimedMessageDialog dialog(buf, 1500);
 		dialog.runModal();
 
diff --git a/engines/bbvs/dialogs.cpp b/engines/bbvs/dialogs.cpp
index a0aa23733b..9f22c26c46 100644
--- a/engines/bbvs/dialogs.cpp
+++ b/engines/bbvs/dialogs.cpp
@@ -86,11 +86,11 @@ MainMenu::~MainMenu() {
 }
 
 void MainMenu::init() {
-	_buttons[0] = new GUI::ButtonWidget(this, 0, 0, 1, 1, "", 0, 0);
-	_buttons[1] = new GUI::ButtonWidget(this, 0, 0, 1, 1, "", 0, 0);
-	_buttons[2] = new GUI::ButtonWidget(this, 0, 0, 1, 1, "", 0, 0);
-	_buttons[3] = new GUI::ButtonWidget(this, 0, 0, 1, 1, "", 0, 0);
-	_buttons[4] = new GUI::ButtonWidget(this, 0, 0, 1, 1, "", 0, 0);
+	_buttons[0] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""), Common::U32String(""), 0);
+	_buttons[1] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""), Common::U32String(""), 0);
+	_buttons[2] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""), Common::U32String(""), 0);
+	_buttons[3] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""), Common::U32String(""), 0);
+	_buttons[4] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""), Common::U32String(""), 0);
 	gotoMenuScreen(kMainMenuScr);
 }
 
@@ -192,7 +192,7 @@ void MainMenu::gotoMenuScreen(int screen) {
 		} else {
 			btn = &kMenuButtons[screen * 5 + i];
 		}
-		_buttons[i]->setLabel(btn->label);
+		_buttons[i]->setLabel(Common::U32String(btn->label));
 		_buttons[i]->setCmd(btn->cmd);
 		_buttons[i]->setEnabled(btn->cmd != 0);
 	}
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index 3682737e50..eaa2d44c2f 100644
--- a/engines/bladerunner/bladerunner.cpp
+++ b/engines/bladerunner/bladerunner.cpp
@@ -2238,13 +2238,13 @@ bool BladeRunnerEngine::loadGame(Common::SeekableReadStream &stream) {
 	if ((_gameFlags->query(kFlagGamePlayedInRestoredContentMode) && !_cutContent)
 	    || (!_gameFlags->query(kFlagGamePlayedInRestoredContentMode) && _cutContent)
 	) {
-		Common::String warningMsg;
+		Common::U32String warningMsg;
 		if (!_cutContent) {
 			warningMsg = _("WARNING: This game was saved in Restored Cut Content mode, but you are playing in Original Content mode. The mode will be adjusted to Restored Cut Content for this session until you completely Quit the game.");
 		} else {
 			warningMsg = _("WARNING: This game was saved in Original Content mode, but you are playing in Restored Cut Content mode. The mode will be adjusted to Original Content mode for this session until you completely Quit the game.");
 		}
-		GUI::MessageDialog dialog(warningMsg, _("Continue"), 0);
+		GUI::MessageDialog dialog(warningMsg, _("Continue"));
 		dialog.runModal();
 		_cutContent = !_cutContent;
 		// force a Key Down event, since we need it to remove the KIA
diff --git a/engines/bladerunner/subtitles.cpp b/engines/bladerunner/subtitles.cpp
index 2e30bde32b..d9d97f4612 100644
--- a/engines/bladerunner/subtitles.cpp
+++ b/engines/bladerunner/subtitles.cpp
@@ -270,7 +270,7 @@ void Subtitles::loadOuttakeSubsText(const Common::String &outtakesName, int fram
  * Used for debug purposes mainly.
  */
 void Subtitles::setGameSubsText(Common::String dbgQuote, bool forceShowWhenNoSpeech) {
-	_currentText = _useUTF8 ? Common::convertUtf8ToUtf32(dbgQuote) : dbgQuote;
+	_currentText = _useUTF8 ? Common::convertUtf8ToUtf32(dbgQuote) : Common::convertToU32String(dbgQuote.c_str());
 	_forceShowWhenNoSpeech = forceShowWhenNoSpeech; // overrides not showing subtitles when no one is speaking
 }
 
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index 62881c3fc4..5592f485eb 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -225,10 +225,10 @@ Common::Error CGEEngine::run() {
 
 	// If game is finished, display ending message
 	if (_flag[3]) {
-		Common::String msg = Common::String(_text->getText(kSayTheEnd));
-		if (msg.size() != 0) {
+		Common::U32String msg = Common::U32String(_text->getText(kSayTheEnd));
+		if (!msg.empty()) {
 			g_system->delayMillis(10);
-			GUI::MessageDialog dialog(msg, "OK");
+			GUI::MessageDialog dialog(msg, Common::U32String("OK"));
 			dialog.runModal();
 		}
 	}
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 460da8e1b3..fc21c8b2cc 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -928,7 +928,7 @@ bool DrasculaEngine::loadDrasculaDat() {
 	in.open(filename.c_str());
 
 	if (!in.isOpen()) {
-		Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
+		Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
 		GUIErrorMessage(errorMessage);
 		warning("%s", errorMessage.c_str());
 
@@ -942,7 +942,7 @@ bool DrasculaEngine::loadDrasculaDat() {
 	buf[8] = '\0';
 
 	if (strcmp(buf, "DRASCULA") != 0) {
-		Common::String errorMessage = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
+		Common::String errorMessage = Common::String::format(_("The '%s' engine data file is corrupt.").encode().c_str(), filename.c_str());
 		GUIErrorMessage(errorMessage);
 		warning("%s", errorMessage.c_str());
 
@@ -953,7 +953,7 @@ bool DrasculaEngine::loadDrasculaDat() {
 
 	if (ver != DRASCULA_DAT_VER) {
 		Common::String errorMessage = Common::String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.").encode().c_str(),
 			filename.c_str(), DRASCULA_DAT_VER, 0, ver, 0);
 		GUIErrorMessage(errorMessage);
 		warning("%s", errorMessage.c_str());
diff --git a/engines/glk/adrift/os_glk.cpp b/engines/glk/adrift/os_glk.cpp
index 958cf55d7d..c5f25f76ca 100644
--- a/engines/glk/adrift/os_glk.cpp
+++ b/engines/glk/adrift/os_glk.cpp
@@ -2811,7 +2811,7 @@ static int gsc_startup_code(Common::SeekableReadStream *game_stream, int restore
 		 * Display a brief loading game message; here we have to use a timeout
 		 * to ensure that the text is flushed to Glk.
 		 */
-		g_vm->glk_put_string(_("Loading game...\n"));
+		g_vm->glk_put_string(_("Loading game...\n").encode().c_str());
 		if (g_vm->glk_gestalt(gestalt_Timer, 0)) {
 			event_t event;
 
diff --git a/engines/glk/advsys/vm.cpp b/engines/glk/advsys/vm.cpp
index 1cb42dad7b..eb264b4485 100644
--- a/engines/glk/advsys/vm.cpp
+++ b/engines/glk/advsys/vm.cpp
@@ -593,7 +593,7 @@ bool VM::getWord(Common::String &line) {
 		_words.push_back(iw);
 		return true;
 	} else {
-		Common::String msg = Common::String::format(_("I don't know the word \"%s\".\n"), iw._text.c_str());
+		Common::String msg = Common::String::format(_("I don't know the word \"%s\".\n").encode().c_str(), iw._text.c_str());
 		print(msg);
 		return false;
 	}
diff --git a/engines/glk/glk_api.cpp b/engines/glk/glk_api.cpp
index d7ea0e0f30..9de8aa6b2f 100644
--- a/engines/glk/glk_api.cpp
+++ b/engines/glk/glk_api.cpp
@@ -60,7 +60,7 @@ GlkAPI::GlkAPI(OSystem *syst, const GlkGameDescription &gameDesc) :
 }
 
 void GlkAPI::glk_exit(void) {
-	glk_put_string(_("[ press any key to exit ]"));
+	glk_put_string(_("[ press any key to exit ]").encode().c_str());
 	_events->waitForPress();
 
 	// Trigger a ScumMVM shutdown of game
diff --git a/engines/glk/scott/scott.cpp b/engines/glk/scott/scott.cpp
index a974b839a9..24b1363f23 100644
--- a/engines/glk/scott/scott.cpp
+++ b/engines/glk/scott/scott.cpp
@@ -391,7 +391,7 @@ void Scott::outputNumber(int a) {
 
 void Scott::look(void) {
 	const char *const ExitNames[6] = {
-		_("North"), _("South"), _("East"), _("West"), _("Up"), _("Down")
+		_("North").encode().c_str(), _("South").encode().c_str(), _("East").encode().c_str(), _("West").encode().c_str(), _("Up").encode().c_str(), _("Down").encode().c_str()
 	};
 	Room *r;
 	int ct, f;
@@ -403,9 +403,9 @@ void Scott::look(void) {
 	if ((_bitFlags & (1 << DARKBIT)) && _items[LIGHT_SOURCE]._location != CARRIED
 			&& _items[LIGHT_SOURCE]._location != MY_LOC) {
 		if (_options & YOUARE)
-			display(_topWindow, _("You can't see. It is too dark!\n"));
+			display(_topWindow, _("You can't see. It is too dark!\n").encode().c_str());
 		else
-			display(_topWindow, _("I can't see. It is too dark!\n"));
+			display(_topWindow, _("I can't see. It is too dark!\n").encode().c_str());
 		if (_options & TRS80_STYLE)
 			display(_topWindow, TRS80_LINE);
 		return;
@@ -415,14 +415,14 @@ void Scott::look(void) {
 		display(_topWindow, "%s\n", r->_text.c_str() + 1);
 	else {
 		if (_options & YOUARE)
-			display(_topWindow, _("You are in a %s\n"), r->_text.c_str());
+			display(_topWindow, _("You are in a %s\n").encode().c_str(), r->_text.c_str());
 		else
-			display(_topWindow, _("I'm in a %s\n"), r->_text.c_str());
+			display(_topWindow, _("I'm in a %s\n").encode().c_str(), r->_text.c_str());
 	}
 
 	ct = 0;
 	f = 0;
-	display(_topWindow, _("\nObvious exits: "));
+	display(_topWindow, _("\nObvious exits: ").encode().c_str());
 	while (ct < 6) {
 		if (r->_exits[ct] != 0) {
 			if (f == 0)
@@ -435,7 +435,7 @@ void Scott::look(void) {
 	}
 
 	if (f == 0)
-		display(_topWindow, _("none"));
+		display(_topWindow, _("none").encode().c_str());
 	display(_topWindow, ".\n");
 	ct = 0;
 	f = 0;
@@ -444,10 +444,10 @@ void Scott::look(void) {
 		if (_items[ct]._location == MY_LOC) {
 			if (f == 0) {
 				if (_options & YOUARE) {
-					display(_topWindow, _("\nYou can also see: "));
+					display(_topWindow, _("\nYou can also see: ").encode().c_str());
 					pos = 18;
 				} else {
-					display(_topWindow, _("\nI can also see: "));
+					display(_topWindow, _("\nI can also see: ").encode().c_str());
 					pos = 16;
 				}
 				f++;
diff --git a/engines/glk/zcode/zcode.cpp b/engines/glk/zcode/zcode.cpp
index 66df44cb70..4cd1612dc0 100644
--- a/engines/glk/zcode/zcode.cpp
+++ b/engines/glk/zcode/zcode.cpp
@@ -141,7 +141,7 @@ Common::Error ZCode::saveGameState(int slot, const Common::String &desc, bool is
 	bool success = q.save(*file, this, desc);
 
 	if (!success)
-		print_string(_("Error writing save file\n"));
+		print_string(_("Error writing save file\n").encode().c_str());
 
 	return Common::kNoError;
 
diff --git a/engines/hdb/detection.cpp b/engines/hdb/detection.cpp
index 438ec89e03..f04227ead2 100644
--- a/engines/hdb/detection.cpp
+++ b/engines/hdb/detection.cpp
@@ -254,7 +254,7 @@ SaveStateList HDBMetaEngine::listSaves(const char *target) const {
 				if (slotNum < 8)
 					desc.setDescription(Common::String::format("Auto: %s", mapName));
 				else
-					desc.setDescription(mapName);
+					desc.setDescription(Common::convertToU32String(mapName));
 
 				saveList.push_back(desc);
 			}
@@ -284,7 +284,7 @@ SaveStateDescriptor HDBMetaEngine::querySaveMetaInfos(const char *target, int sl
 
 		desc.setSaveSlot(slot);
 		desc.setPlayTime(timeSeconds * 1000);
-		desc.setDescription(mapName);
+		desc.setDescription(Common::convertToU32String(mapName));
 
 		return desc;
 	}
diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp
index c2caf421e0..62a508953a 100644
--- a/engines/hugo/dialogs.cpp
+++ b/engines/hugo/dialogs.cpp
@@ -56,15 +56,15 @@ void TopMenu::init() {
 	int x = kMenuX;
 	int y = kMenuY;
 
-	_whatButton = new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight, "What is it?", kCmdWhat);
-	_musicButton = new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight, "Music", kCmdMusic);
-	_soundFXButton = new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight, "Sound FX", kCmdSoundFX);
-	_saveButton = new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight, "Save game", kCmdSave);
-	_loadButton = new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight, "Load game", kCmdLoad);
-	_recallButton = new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight, "Recall last command", kCmdRecall);
-	_turboButton = new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight, "Turbo", kCmdTurbo);
-	_lookButton = new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight, "Description of the scene", kCmdLook);
-	_inventButton = new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight, "Inventory", kCmdInvent);
+	_whatButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("What is it?"),				kCmdWhat);
+	_musicButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Music"),						kCmdMusic);
+	_soundFXButton =	new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Sound FX"),					kCmdSoundFX);
+	_saveButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Save game"),					kCmdSave);
+	_loadButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Load game"),					kCmdLoad);
+	_recallButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Recall last command"),		kCmdRecall);
+	_turboButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Turbo"),						kCmdTurbo);
+	_lookButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Description of the scene"),	kCmdLook);
+	_inventButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Inventory"),					kCmdInvent);
 }
 
 void TopMenu::reflowLayout() {
@@ -276,14 +276,14 @@ EntryDialog::EntryDialog(const Common::String &title, const Common::String &butt
 								lines[i], Graphics::kTextAlignCenter);
 	}
 
-	_text = new GUI::EditTextWidget(this, 10, 10 + lineCount * (kLineHeight + 1), _w - 20, kLineHeight, "", "", 0, kCmdFinishEdit);
+	_text = new GUI::EditTextWidget(this, 10, 10 + lineCount * (kLineHeight + 1), _w - 20, kLineHeight, Common::U32String(""), Common::U32String(""), 0, kCmdFinishEdit);
 	_text->setEditString(defaultValue);
 
 	_h += kLineHeight + 5;
 
 	buttonPos = (_w - buttonWidth) / 2;
 
-	new GUI::ButtonWidget(this, buttonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, buttonLabel, 0, kCmdButton, Common::ASCII_RETURN);	// Confirm dialog
+	new GUI::ButtonWidget(this, buttonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, buttonLabel, Common::U32String(""), kCmdButton, Common::ASCII_RETURN);	// Confirm dialog
 
 }
 
diff --git a/engines/hugo/dialogs.h b/engines/hugo/dialogs.h
index 138b29de06..f1f7537549 100644
--- a/engines/hugo/dialogs.h
+++ b/engines/hugo/dialogs.h
@@ -107,7 +107,7 @@ public:
 
 	void handleCommand(GUI::CommandSender *sender, uint32 command, uint32 data) override;
 
-	const Common::String &getEditString() const	{ return _text->getEditString(); }
+	const Common::U32String &getEditString() const	{ return _text->getEditString(); }
 
 protected:
 	GUI::EditTextWidget *_text;
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 62a1e3e485..9919d87c07 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -433,7 +433,7 @@ bool HugoEngine::loadHugoDat() {
 	in.open(filename.c_str());
 
 	if (!in.isOpen()) {
-		Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
+		Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
 		GUIErrorMessage(errorMessage);
 		warning("%s", errorMessage.c_str());
 		return false;
@@ -444,7 +444,7 @@ bool HugoEngine::loadHugoDat() {
 	in.read(buf, 4);
 
 	if (memcmp(buf, "HUGO", 4)) {
-		Common::String errorMessage = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
+		Common::String errorMessage = Common::String::format(_("The '%s' engine data file is corrupt.").encode().c_str(), filename.c_str());
 		GUIErrorMessage(errorMessage);
 		return false;
 	}
@@ -454,7 +454,7 @@ bool HugoEngine::loadHugoDat() {
 
 	if ((majVer != HUGO_DAT_VER_MAJ) || (minVer != HUGO_DAT_VER_MIN)) {
 		Common::String errorMessage = Common::String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.").encode().c_str(),
 			filename.c_str(),HUGO_DAT_VER_MAJ, HUGO_DAT_VER_MIN, majVer, minVer);
 		GUIErrorMessage(errorMessage);
 		return false;
diff --git a/engines/hugo/util.cpp b/engines/hugo/util.cpp
index bc1525382c..3e44908ae9 100644
--- a/engines/hugo/util.cpp
+++ b/engines/hugo/util.cpp
@@ -87,10 +87,14 @@ void reverseByte(byte *data) {
 }
 
 void notifyBox(const Common::String &msg) {
+	notifyBox(Common::U32String(msg));
+}
+
+void notifyBox(const Common::U32String &msg) {
 	if (msg.empty())
 		return;
 
-	GUI::MessageDialog dialog(msg, "OK");
+	GUI::MessageDialog dialog(msg);
 	dialog.runModal();
 }
 
@@ -106,10 +110,14 @@ Common::String promptBox(const Common::String &msg) {
 }
 
 bool yesNoBox(const Common::String &msg) {
+	return yesNoBox(Common::U32String(msg));
+}
+
+bool yesNoBox(const Common::U32String &msg) {
 	if (msg.empty())
 		return 0;
 
-	GUI::MessageDialog dialog(msg, "YES", "NO");
+	GUI::MessageDialog dialog(msg, Common::U32String("YES"), Common::U32String("NO"));
 	return (dialog.runModal() == GUI::kMessageOK);
 }
 
diff --git a/engines/hugo/util.h b/engines/hugo/util.h
index 3a76e3c6f4..66be189b80 100644
--- a/engines/hugo/util.h
+++ b/engines/hugo/util.h
@@ -47,7 +47,8 @@ void  reverseByte(byte *data);
  * Show a dialog notifying the user about something, with
  * only a simple "OK" button to dismiss it.
  */
-void notifyBox(const Common::String &msg);
+void notifyBox(const Common::String &msg);	// Redirect to call notifyBox with u32strings
+void notifyBox(const Common::U32String &msg);
 
 /**
  * Show a dialog prompting the player to input some text.
@@ -57,7 +58,8 @@ Common::String promptBox(const Common::String &msg);
 /**
  * Show a dialog prompting the player for a "yes"/"no" choice.
  */
-bool yesNoBox(const Common::String &msg);
+bool yesNoBox(const Common::String &msg);	// Redirect to call yesNoBox with u32strings
+bool yesNoBox(const Common::U32String &msg);
 
 /**
  * Convert a string to lower case, in place.
diff --git a/engines/illusions/menusystem.cpp b/engines/illusions/menusystem.cpp
index 72cdeeeade..c00dace72d 100644
--- a/engines/illusions/menusystem.cpp
+++ b/engines/illusions/menusystem.cpp
@@ -697,12 +697,12 @@ MenuActionSaveGame::MenuActionSaveGame(BaseMenuSystem *menuSystem, uint choiceIn
 
 void MenuActionSaveGame::execute() {
 	GUI::SaveLoadChooser *dialog;
-	Common::String desc;
+	Common::U32String desc;
 	int slot;
 
 	dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
 	slot = dialog->runModalWithCurrentTarget();
-	desc = dialog->getResultString().c_str();
+	desc = dialog->getResultString().encode().c_str();
 
 	delete dialog;
 
diff --git a/engines/kyra/gui/saveload_eob.cpp b/engines/kyra/gui/saveload_eob.cpp
index 0d6f156a28..83bf5987ef 100644
--- a/engines/kyra/gui/saveload_eob.cpp
+++ b/engines/kyra/gui/saveload_eob.cpp
@@ -594,7 +594,7 @@ bool EoBCoreEngine::importOriginalSaveFile(int destSlot, const char *sourceFile)
 				}
 
 				delete fs;
-				::GUI::MessageDialog dialog(Common::String::format(_("The following original saved game file has been found in your game path:\n\n%s %s\n\nDo you wish to use this saved game file with ScummVM?\n\n"), temp.c_str(), dsc.c_str()), _("Yes"), _("No"));
+				::GUI::MessageDialog dialog(Common::String::format(_("The following original saved game file has been found in your game path:\n\n%s %s\n\nDo you wish to use this saved game file with ScummVM?\n\n").encode().c_str(), temp.c_str(), dsc.c_str()), _("Yes"), _("No"));
 				if (dialog.runModal())
 					origFiles.push_back(temp);
 			}
@@ -627,7 +627,7 @@ bool EoBCoreEngine::importOriginalSaveFile(int destSlot, const char *sourceFile)
 
 	if (destSlot != -1) {
 		if (Common::find(_gui->_saveSlots.begin(), _gui->_saveSlots.end(), destSlot) != _gui->_saveSlots.end()) {
-			::GUI::MessageDialog dialog(Common::String::format(_("A saved game file was found in the specified slot %d. Overwrite?\n\n"), destSlot), _("Yes"), _("No"));
+			::GUI::MessageDialog dialog(Common::String::format(_("A saved game file was found in the specified slot %d. Overwrite?\n\n").encode().c_str(), destSlot), _("Yes"), _("No"));
 			if (!dialog.runModal())
 				return false;
 		}
@@ -660,7 +660,7 @@ bool EoBCoreEngine::importOriginalSaveFile(int destSlot, const char *sourceFile)
 	_inf->reset();
 
 	if (destSlot == -1 && importedCount) {
-		::GUI::MessageDialog dialog(Common::String::format(_("%d original saved games have been successfully imported into\nScummVM. If you want to manually import original saved game later you will\nneed to open the ScummVM debug console and use the command 'import_savefile'.\n\n"), importedCount));
+		::GUI::MessageDialog dialog(Common::String::format(_("%d original saved games have been successfully imported into\nScummVM. If you want to manually import original saved game later you will\nneed to open the ScummVM debug console and use the command 'import_savefile'.\n\n").encode().c_str(), importedCount));
 		dialog.runModal();
 	}
 
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index d6eccb1f30..b39e3002f7 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -61,7 +61,7 @@ Common::Error LureEngine::init() {
 	Common::File f;
 	VersionStructure version;
 	if (!f.open(SUPPORT_FILENAME)) {
-		GUIErrorMessageFormat(_("Unable to locate the '%s' engine data file."), SUPPORT_FILENAME);
+		GUIErrorMessageFormat(Common::convertFromU32String(_("Unable to locate the '%s' engine data file.")).c_str(), SUPPORT_FILENAME);
 		return Common::kUnknownError;
 	}
 
@@ -70,10 +70,10 @@ Common::Error LureEngine::init() {
 	f.close();
 
 	if (READ_LE_UINT16(&version.id) != 0xffff) {
-		GUIErrorMessageFormat(_("The '%s' engine data file is corrupt."), SUPPORT_FILENAME);
+		GUIErrorMessageFormat(Common::convertFromU32String(_("The '%s' engine data file is corrupt.")).c_str(), SUPPORT_FILENAME);
 		return Common::kUnknownError;
 	} else if ((version.vMajor != LURE_DAT_MAJOR) || (version.vMinor != LURE_DAT_MINOR)) {
-		GUIErrorMessageFormat(_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+		GUIErrorMessageFormat(Common::convertFromU32String(_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.")).c_str(),
 			SUPPORT_FILENAME, LURE_DAT_MAJOR, LURE_DAT_MINOR,
 			version.vMajor, version.vMinor);
 		return Common::kUnknownError;
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp
index 18219ef13c..18766f410d 100644
--- a/engines/mohawk/dialogs.cpp
+++ b/engines/mohawk/dialogs.cpp
@@ -122,16 +122,16 @@ MystOptionsWidget::MystOptionsWidget(GuiObject *boss, const Common::String &name
 		assert(vm);
 
 		// I18N: Drop book page
-		_dropPageButton = new GUI::ButtonWidget(widgetsBoss(), "MystOptionsDialog.DropPage", _("~D~rop Page"), nullptr, kDropCmd);
+		_dropPageButton = new GUI::ButtonWidget(widgetsBoss(), "MystOptionsDialog.DropPage", _("~D~rop Page"), Common::U32String(""), kDropCmd);
 
 		// Myst ME only has maps
 		if (vm->isGameVariant(GF_ME)) {
-			_showMapButton = new GUI::ButtonWidget(widgetsBoss(), "MystOptionsDialog.ShowMap", _("Show ~M~ap"), nullptr, kMapCmd);
+			_showMapButton = new GUI::ButtonWidget(widgetsBoss(), "MystOptionsDialog.ShowMap", _("Show ~M~ap"), Common::U32String(""), kMapCmd);
 		}
 
 		// Myst demo only has a menu
 		if (vm->isGameVariant(GF_DEMO)) {
-			_returnToMenuButton = new GUI::ButtonWidget(widgetsBoss(), "MystOptionsDialog.MainMenu", _("Main Men~u~"), nullptr, kMenuCmd);
+			_returnToMenuButton = new GUI::ButtonWidget(widgetsBoss(), "MystOptionsDialog.MainMenu", _("Main Men~u~"), Common::U32String(""), kMenuCmd);
 		}
 
 		if (vm->isGameVariant(GF_25TH)) {
@@ -142,7 +142,7 @@ MystOptionsWidget::MystOptionsWidget(GuiObject *boss, const Common::String &name
 
 			const MystLanguage *languages = MohawkEngine_Myst::listLanguages();
 			while (languages->language != Common::UNK_LANG) {
-				_languagePopUp->appendEntry(Common::getLanguageDescription(languages->language), languages->language);
+				_languagePopUp->appendEntry(Common::convertToU32String(Common::getLanguageDescription(languages->language)), languages->language);
 				languages++;
 			}
 		}
@@ -344,7 +344,7 @@ RivenOptionsWidget::RivenOptionsWidget(GuiObject *boss, const Common::String &na
 
 		const RivenLanguage *languages = MohawkEngine_Riven::listLanguages();
 		while (languages->language != Common::UNK_LANG) {
-			_languagePopUp->appendEntry(Common::getLanguageDescription(languages->language), languages->language);
+			_languagePopUp->appendEntry(Common::convertToU32String(Common::getLanguageDescription(languages->language)), languages->language);
 			languages++;
 		}
 	}
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 1b426518d1..28db0c4f82 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -560,7 +560,7 @@ Common::KeymapArray MohawkEngine_Myst::initKeymaps(const char *target) {
 	bool is25th = checkGameGUIOption(GAMEOPTION_25TH, guiOptions);
 	bool isDemo = checkGameGUIOption(GAMEOPTION_DEMO, guiOptions);
 
-	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "myst", "Myst");
+	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "myst", Common::convertToU32String("Myst"));
 
 	Action *act;
 
diff --git a/engines/mohawk/myst_stacks/menu.cpp b/engines/mohawk/myst_stacks/menu.cpp
index 3e97104481..f31eacd8dc 100644
--- a/engines/mohawk/myst_stacks/menu.cpp
+++ b/engines/mohawk/myst_stacks/menu.cpp
@@ -366,7 +366,7 @@ void Menu::introMovies_run() {
 	}
 }
 
-bool Menu::showConfirmationDialog(const char *message, const char *confirmButton, const char *cancelButton) {
+bool Menu::showConfirmationDialog(const Common::U32String &message, const Common::U32String &confirmButton, const Common::U32String &cancelButton) {
 	if (!_inGame) {
 		return true;
 	}
diff --git a/engines/mohawk/myst_stacks/menu.h b/engines/mohawk/myst_stacks/menu.h
index 75140b41f4..3cdeae84b0 100644
--- a/engines/mohawk/myst_stacks/menu.h
+++ b/engines/mohawk/myst_stacks/menu.h
@@ -80,7 +80,7 @@ private:
 	int _introStep;
 	void introMovies_run();
 
-	bool showConfirmationDialog(const char *message, const char *confirmButton, const char *cancelButton);
+	bool showConfirmationDialog(const Common::U32String &message, const Common::U32String &confirmButton, const Common::U32String &cancelButton);
 
 	void drawButtonImages(const Common::U32String &text, MystAreaImageSwitch *area, Graphics::TextAlign align, uint16 highlightedIndex, uint16 disabledIndex) const;
 	void replaceButtonSubImageWithText(const Common::U32String &text, const Graphics::TextAlign &align, MystAreaImageSwitch *area,
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 47dc9a129d..e92ac48526 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -498,7 +498,7 @@ bool MohawkEngine_Riven::checkDatafiles() {
 		return true;
 	}
 
-	Common::String message = _("You are missing the following required Riven data files:\n") + missingFiles;
+	Common::String message = _("You are missing the following required Riven data files:\n").encode() + missingFiles;
 	warning("%s", message.c_str());
 	GUIErrorMessage(message);
 
@@ -829,7 +829,7 @@ Common::KeymapArray MohawkEngine_Riven::initKeymaps(const char *target) {
 	bool is25th = checkGameGUIOption(GAMEOPTION_25TH, guiOptions);
 	bool isDemo = checkGameGUIOption(GAMEOPTION_DEMO, guiOptions);
 
-	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "riven", "Riven");
+	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "riven", Common::convertToU32String("Riven"));
 
 	Action *act;
 
diff --git a/engines/mohawk/riven_stacks/aspit.cpp b/engines/mohawk/riven_stacks/aspit.cpp
index ed353aa917..5bed1abd3a 100644
--- a/engines/mohawk/riven_stacks/aspit.cpp
+++ b/engines/mohawk/riven_stacks/aspit.cpp
@@ -387,14 +387,14 @@ void ASpit::xaNewGame(const ArgumentArray &args) {
 	_vm->_scriptMan->runScript(script, false);
 }
 
-bool ASpit::showConfirmationDialog(const char *message, const char *confirmButton, const char *cancelButton) {
+bool ASpit::showConfirmationDialog(const Common::U32String &message, const Common::U32String &confirmButton, const Common::U32String &cancelButton) {
 	if (!_vm->isGameStarted()) {
 		return true;
 	}
 
 	GUI::MessageDialog dialog(message, confirmButton, cancelButton);
 
-	return dialog.runModal() !=0;
+	return dialog.runModal() != 0;
 }
 
 void ASpit::xadisablemenureturn(const ArgumentArray &args) {
diff --git a/engines/mohawk/riven_stacks/aspit.h b/engines/mohawk/riven_stacks/aspit.h
index aa3c20f437..509d8b9ce0 100644
--- a/engines/mohawk/riven_stacks/aspit.h
+++ b/engines/mohawk/riven_stacks/aspit.h
@@ -89,7 +89,7 @@ private:
 
 	void cathBookDrawPage(uint32 page);
 
-	bool showConfirmationDialog(const char *message, const char *confirmButton, const char *cancelButton);
+	bool showConfirmationDialog(const Common::U32String &message, const Common::U32String &confirmButton, const Common::U32String &cancelButton);
 };
 
 } // End of namespace RivenStacks
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp
index 1853f33fe4..dd29a10c03 100644
--- a/engines/mortevielle/mortevielle.cpp
+++ b/engines/mortevielle/mortevielle.cpp
@@ -302,7 +302,7 @@ Common::ErrorCode MortevielleEngine::loadMortDat() {
 
 	// Open the mort.dat file
 	if (!f.open(MORT_DAT)) {
-		GUIErrorMessageFormat(_("Unable to locate the '%s' engine data file."), MORT_DAT);
+		GUIErrorMessageFormat(_("Unable to locate the '%s' engine data file.").encode().c_str(), MORT_DAT);
 		return Common::kReadingFailed;
 	}
 
@@ -310,7 +310,7 @@ Common::ErrorCode MortevielleEngine::loadMortDat() {
 	char fileId[4];
 	f.read(fileId, 4);
 	if (strncmp(fileId, "MORT", 4) != 0) {
-		GUIErrorMessageFormat(_("The '%s' engine data file is corrupt."), MORT_DAT);
+		GUIErrorMessageFormat(_("The '%s' engine data file is corrupt.").encode().c_str(), MORT_DAT);
 		return Common::kReadingFailed;
 	}
 
@@ -320,7 +320,7 @@ Common::ErrorCode MortevielleEngine::loadMortDat() {
 
 	if (majVer < MORT_DAT_REQUIRED_VERSION) {
 		GUIErrorMessageFormat(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.").encode().c_str(),
 			MORT_DAT, MORT_DAT_REQUIRED_VERSION, 0, majVer, minVer);
 		return Common::kReadingFailed;
 	}
diff --git a/engines/mutationofjb/util.cpp b/engines/mutationofjb/util.cpp
index 1483fb26e4..fe4440b7ee 100644
--- a/engines/mutationofjb/util.cpp
+++ b/engines/mutationofjb/util.cpp
@@ -30,7 +30,7 @@
 namespace MutationOfJB {
 
 void reportFileMissingError(const char *fileName) {
-	Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file"), fileName);
+	Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file").encode().c_str(), fileName);
 	GUIErrorMessage(errorMessage);
 	warning("%s", errorMessage.c_str());
 }
diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp
index 56cb3632c3..b319385409 100644
--- a/engines/parallaction/saveload.cpp
+++ b/engines/parallaction/saveload.cpp
@@ -127,7 +127,7 @@ void SaveLoad_ns::doLoadGame(uint16 slot) {
 void SaveLoad_ns::doSaveGame(uint16 slot, const char* name) {
 	Common::OutSaveFile *f = getOutSaveFile(slot);
 	if (f == 0) {
-		Common::String buf = Common::String::format(_("Can't save game in slot %i\n\n"), slot);
+		Common::String buf = Common::String::format(_("Can't save game in slot %i\n\n").encode().c_str(), slot);
 		GUI::MessageDialog dialog(buf);
 		dialog.runModal();
 		return;
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 4a944b7ad8..e6568aae16 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -384,7 +384,7 @@ Common::Error PegasusEngine::showSaveDialog() {
 void PegasusEngine::showSaveFailedDialog(const Common::Error &status) {
 	Common::String failMessage = Common::String::format(_("Failed to save game (%s)! "
 			"Please consult the README for basic information, and for "
-			"instructions on how to obtain further assistance."), status.getDesc().c_str());
+			"instructions on how to obtain further assistance.").encode().c_str(), status.getDesc().c_str());
 	GUI::MessageDialog dialog(failMessage);
 	dialog.runModal();
 }
@@ -2476,7 +2476,7 @@ uint PegasusEngine::getNeighborhoodCD(const NeighborhoodID neighborhood) const {
 Common::KeymapArray PegasusEngine::initKeymaps() {
 	using namespace Common;
 
-	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "pegasus", "Pegasus Prime");
+	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "pegasus", Common::convertToU32String("Pegasus Prime"));
 
 	Action *act;
 
diff --git a/engines/savestate.cpp b/engines/savestate.cpp
index e440a58f23..75b5b624f2 100644
--- a/engines/savestate.cpp
+++ b/engines/savestate.cpp
@@ -38,6 +38,10 @@ SaveStateDescriptor::SaveStateDescriptor(int s, const Common::U32String &d)
 	_thumbnail(), _saveType(kSaveTypeUndetermined) {
 }
 
+SaveStateDescriptor::SaveStateDescriptor(int s, const Common::String &d) {
+	SaveStateDescriptor(s, Common::U32String(d));
+}
+
 void SaveStateDescriptor::setThumbnail(Graphics::Surface *t) {
 	if (_thumbnail.get() == t)
 		return;
diff --git a/engines/savestate.h b/engines/savestate.h
index 2baf47e2c4..ae8e0649a2 100644
--- a/engines/savestate.h
+++ b/engines/savestate.h
@@ -53,6 +53,7 @@ private:
 public:
 	SaveStateDescriptor();
 	SaveStateDescriptor(int s, const Common::U32String &d);
+	SaveStateDescriptor(int s, const Common::String &d);
 
 	/**
 	 * @param slot The saveslot id, as it would be passed to the "-x" command line switch.
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index b47191b7c0..7166933e12 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -1017,7 +1017,7 @@ SaveStateDescriptor SciMetaEngine::querySaveMetaInfos(const char *target, int sl
 			// invalid
 			delete in;
 
-			descriptor.setDescription("*Invalid*");
+			descriptor.setDescription(Common::convertToU32String("*Invalid*"));
 			return descriptor;
 		}
 
@@ -1028,7 +1028,7 @@ SaveStateDescriptor SciMetaEngine::querySaveMetaInfos(const char *target, int sl
 			// invalid
 			delete in;
 
-			descriptor.setDescription("*Invalid*");
+			descriptor.setDescription(Common::convertToU32String("*Invalid*"));
 			return descriptor;
 		}
 		descriptor.setThumbnail(thumbnail);
diff --git a/engines/sci/engine/guest_additions.cpp b/engines/sci/engine/guest_additions.cpp
index 266113a5a5..b6f7da665c 100644
--- a/engines/sci/engine/guest_additions.cpp
+++ b/engines/sci/engine/guest_additions.cpp
@@ -672,7 +672,7 @@ reg_t GuestAdditions::promptSaveRestoreRama(EngineState *s, int argc, reg_t *arg
 int GuestAdditions::runSaveRestore(const bool isSave, reg_t outDescription, const int forcedSaveId) const {
 	assert(!(isSave && outDescription.isNull()));
 
-	Common::String descriptionString;
+	Common::U32String descriptionString;
 	int saveId = runSaveRestore(isSave, descriptionString, forcedSaveId);
 
 	if (!outDescription.isNull()) {
@@ -686,14 +686,14 @@ int GuestAdditions::runSaveRestore(const bool isSave, reg_t outDescription, cons
 	return saveId;
 }
 
-int GuestAdditions::runSaveRestore(const bool isSave, Common::String &outDescription, const int forcedSaveId) const {
+int GuestAdditions::runSaveRestore(const bool isSave, Common::U32String &outDescription, const int forcedSaveId) const {
 	int saveId;
 
 	if (!isSave && forcedSaveId != -1) {
 		saveId = forcedSaveId;
 	} else {
-		const char *title;
-		const char *action;
+		Common::U32String title;
+		Common::U32String action;
 		if (isSave) {
 			title = _("Save game:");
 			action = _("Save");
diff --git a/engines/sci/engine/guest_additions.h b/engines/sci/engine/guest_additions.h
index 7cae8fb201..1f066dfcc9 100644
--- a/engines/sci/engine/guest_additions.h
+++ b/engines/sci/engine/guest_additions.h
@@ -271,7 +271,7 @@ public:
 	 * id to this value.
 	 */
 	int runSaveRestore(const bool isSave, const reg_t outDescription, const int forcedSaveId = -1) const;
-	int runSaveRestore(const bool isSave, Common::String &outDescription, const int forcedSaveId = -1) const;
+	int runSaveRestore(const bool isSave, Common::U32String &outDescription, const int forcedSaveId = -1) const;
 #endif
 
 #pragma mark -
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 91be30fc76..f00c963db9 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -70,7 +70,7 @@ static int16 adjustGraphColor(int16 color) {
 		return color;
 }
 
-int showScummVMDialog(const Common::String &message, const char *altButton = nullptr, bool alignCenter = true) {
+int showScummVMDialog(const Common::U32String &message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true) {
 	Graphics::TextAlign alignment = alignCenter ? Graphics::kTextAlignCenter : Graphics::kTextAlignLeft;
 	GUI::MessageDialog dialog(message, _("OK"), altButton, alignment);
 	return dialog.runModal();
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index 9768911613..e22be3ee2f 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -62,7 +62,7 @@
 namespace Sci {
 #ifdef ENABLE_SCI32
 
-extern int showScummVMDialog(const Common::String& message, const char* altButton = nullptr, bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String& message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
 
 reg_t kBaseSetter32(EngineState *s, int argc, reg_t *argv) {
 	reg_t object = argv[0];
@@ -355,7 +355,7 @@ reg_t kWinHelp(EngineState *s, int argc, reg_t *argv) {
 	case 1:
 		// Load a help file
 		// Maybe in the future we can implement this, but for now this message should suffice
-		showScummVMDialog(Common::String::format(_("Please use an external viewer to open the game's help file: %s"), s->_segMan->getString(argv[1]).c_str()));
+		showScummVMDialog(Common::String::format(_("Please use an external viewer to open the game's help file: %s").encode().c_str(), s->_segMan->getString(argv[1]).c_str()));
 		break;
 	case 2:
 		// Looks like some init function
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index aae0d15eb9..8ea18be757 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -795,7 +795,7 @@ reg_t kPlatform(EngineState *s, int argc, reg_t *argv) {
 	return NULL_REG;
 }
 
-extern int showScummVMDialog(const Common::String& message, const char* altButton = nullptr, bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String& message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
 
 #ifdef ENABLE_SCI32
 reg_t kPlatform32(EngineState *s, int argc, reg_t *argv) {
@@ -870,7 +870,7 @@ reg_t kWinDLL(EngineState *s, int argc, reg_t *argv) {
 	switch (operation) {
 	case 0:	// load DLL
 		if (dllName == "PENGIN16.DLL")
-			showScummVMDialog("The Poker logic is hardcoded in an external DLL, and is not implemented yet. There exists some dummy logic for now, where opponent actions are chosen randomly");
+			showScummVMDialog(Common::convertToU32String("The Poker logic is hardcoded in an external DLL, and is not implemented yet. There exists some dummy logic for now, where opponent actions are chosen randomly"));
 
 		// This is originally a call to LoadLibrary() and to the Watcom function GetIndirectFunctionHandle
 		return make_reg(0, 1000);	// fake ID for loaded DLL, normally returned from Windows LoadLibrary()
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 9ebebb3848..3f048ff0b0 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -1239,7 +1239,7 @@ bool gamestate_save(EngineState *s, Common::WriteStream *fh, const Common::Strin
 	return true;
 }
 
-extern int showScummVMDialog(const Common::String& message, const char* altButton = nullptr, bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String& message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
 
 void gamestate_afterRestoreFixUp(EngineState *s, int savegameId) {
 	switch (g_sci->getGameId()) {
@@ -1406,7 +1406,7 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
 			if (meta.version < MINIMUM_SAVEGAME_VERSION) {
 				showScummVMDialog(_("The format of this saved game is obsolete, unable to load it"));
 			} else {
-				Common::String msg = Common::String::format(_("Savegame version is %d, maximum supported is %0d"), meta.version, CURRENT_SAVEGAME_VERSION);
+				Common::U32String msg = Common::String::format(_("Savegame version is %d, maximum supported is %0d").encode().c_str(), meta.version, CURRENT_SAVEGAME_VERSION);
 				showScummVMDialog(msg);
 			}
 
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 46161a3187..31b4fb8db9 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -138,7 +138,7 @@ public:
 
 	// see kmisc.cpp / kMacPlatform32
 	int _kq7MacSaveGameId; // the saved game id to use when saving (might not exist yet)
-	Common::String _kq7MacSaveGameDescription; // description to use when saving game
+	Common::U32String _kq7MacSaveGameDescription; // description to use when saving game
 
 	uint _chosenQfGImportItem; // Remembers the item selected in QfG import rooms
 
diff --git a/engines/sci/graphics/controls32.cpp b/engines/sci/graphics/controls32.cpp
index cb71a4e62f..7b903529b3 100644
--- a/engines/sci/graphics/controls32.cpp
+++ b/engines/sci/graphics/controls32.cpp
@@ -907,7 +907,7 @@ void GfxControls32::destroyScrollWindow(const reg_t id) {
 #pragma mark -
 #pragma mark Message box
 
-int16 GfxControls32::showMessageBox(const Common::String &message, const char *const okLabel, const char *const altLabel, const int16 okValue, const int16 altValue) {
+int16 GfxControls32::showMessageBox(const Common::U32String &message, const Common::U32String &okLabel, const Common::U32String &altLabel, const int16 okValue, const int16 altValue) {
 	GUI::MessageDialog dialog(message, okLabel, altLabel);
 	return (dialog.runModal() == GUI::kMessageOK) ? okValue : altValue;
 }
@@ -922,7 +922,7 @@ reg_t GfxControls32::kernelMessageBox(const Common::String &message, const Commo
 
 	switch (style & 0xF) {
 	case kMessageBoxOK:
-		result = showMessageBox(message, _("OK"), NULL, 1, 1);
+		result = showMessageBox(message, _("OK"), Common::U32String(""), 1, 1);
 	break;
 	case kMessageBoxYesNo:
 		result = showMessageBox(message, _("Yes"), _("No"), 6, 7);
diff --git a/engines/sci/graphics/controls32.h b/engines/sci/graphics/controls32.h
index 3f743191fc..43feed3419 100644
--- a/engines/sci/graphics/controls32.h
+++ b/engines/sci/graphics/controls32.h
@@ -481,7 +481,7 @@ private:
 	/**
 	 * Convenience function for creating and showing a message box.
 	 */
-	int16 showMessageBox(const Common::String &message, const char *const okLabel, const char *const altLabel, const int16 okValue, const int16 altValue);
+	int16 showMessageBox(const Common::U32String &message, const Common::U32String &okLabel, const Common::U32String &altLabel, const int16 okValue, const int16 altValue);
 };
 
 } // End of namespace Sci
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp
index 8c1741686e..cc3a3815d7 100644
--- a/engines/sci/graphics/video32.cpp
+++ b/engines/sci/graphics/video32.cpp
@@ -65,8 +65,8 @@ bool VideoPlayer::open(const Common::String &fileName) {
 	// KQ7 2.00b videos are compressed in 24bpp Cinepak, so cannot play on a
 	// system with no RGB support
 	if (_decoder->getPixelFormat().bytesPerPixel != 1) {
-		void showScummVMDialog(const Common::String &message, const char* altButton = nullptr, bool alignCenter = true);
-		showScummVMDialog(Common::String::format(_("Cannot play back %dbpp video on a system with maximum color depth of 8bpp"), _decoder->getPixelFormat().bpp()));
+		void showScummVMDialog(const Common::U32String &message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
+		showScummVMDialog(Common::String::format(_("Cannot play back %dbpp video on a system with maximum color depth of 8bpp").encode().c_str(), _decoder->getPixelFormat().bpp()));
 		_decoder->close();
 		return false;
 	}
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 0881521f39..79bc64ce9a 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -813,7 +813,7 @@ void ResourceManager::addScriptChunkSources() {
 #endif
 }
 
-extern int showScummVMDialog(const Common::String& message, const char* altButton = nullptr, bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String& message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
 
 void ResourceManager::scanNewSources() {
 	_hasBadResources = false;
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 8bed5e1ee5..ae4e6b4140 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -256,7 +256,7 @@ SciEngine::~SciEngine() {
 	g_sci = 0;
 }
 
-extern int showScummVMDialog(const Common::String& message, const char* altButton = nullptr, bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String& message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
 
 Common::Error SciEngine::run() {
 	_resMan = new ResourceManager();
@@ -511,15 +511,15 @@ bool SciEngine::gameHasFanMadePatch() {
 }
 
 void SciEngine::suggestDownloadGK2SubTitlesPatch() {
-	const char* altButton;
-	Common::String downloadMessage;
+	Common::U32String altButton;
+	Common::U32String downloadMessage;
 
 	if (g_system->hasFeature(OSystem::kFeatureOpenUrl)) {
 		altButton = _("Download patch");
 		downloadMessage = _("(or click 'Download patch' button. But note - it only downloads, you will have to continue from there)\n");
 	}
 	else {
-		altButton = nullptr;
+		altButton = "";
 		downloadMessage = "";
 	}
 
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index a624e4040b..c2637b57ea 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -157,10 +157,10 @@ void SciMusic::init() {
 		} else {
 			const char *missingFiles = _pMidiDrv->reportMissingFiles();
 			if (missingFiles) {
-				Common::String message = _(
+				Common::U32String message = _(
 					"The selected audio driver requires the following file(s):\n\n"
 				);
-				message += missingFiles;
+				message += Common::convertToU32String(missingFiles);
 				message += _("\n\n"
 					"Some audio drivers (at least for some games) were made\n"
 					"available by Sierra as aftermarket patches and thus might not\n"
@@ -170,7 +170,7 @@ void SciMusic::init() {
 					"separately but only as content of (patched) resource bundles.\n"
 					"In that case you may need to apply the original Sierra patch.\n\n"
 				);
-				::GUI::displayErrorDialog(message.c_str());
+				::GUI::displayErrorDialog(message);
 			}
 			error("Failed to initialize sound driver");
 		}
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index c5d85f04bf..25ac9211d2 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -26,6 +26,7 @@
 #include "common/events.h"
 #include "common/localization.h"
 #include "common/translation.h"
+#include "common/ustr.h"
 
 #include "graphics/scaler.h"
 
@@ -269,7 +270,7 @@ enum {
 
 HelpDialog::HelpDialog(const GameSettings &game)
 	: ScummDialog("ScummHelp"), _game(game) {
-	_title = new GUI::StaticTextWidget(this, "ScummHelp.Title", "");
+	_title = new GUI::StaticTextWidget(this, "ScummHelp.Title", Common::U32String(""));
 
 	_page = 1;
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundDefault;
@@ -277,10 +278,10 @@ HelpDialog::HelpDialog(const GameSettings &game)
 	_numPages = ScummHelp::numPages(_game.id);
 
 	// I18N: Previous page button
-	_prevButton = new GUI::ButtonWidget(this, "ScummHelp.Prev", _("~P~revious"), 0, kPrevCmd);
+	_prevButton = new GUI::ButtonWidget(this, "ScummHelp.Prev", _("~P~revious"), Common::U32String(""), kPrevCmd);
 	// I18N: Next page button
-	_nextButton = new GUI::ButtonWidget(this, "ScummHelp.Next", _("~N~ext"), 0, kNextCmd);
-	new GUI::ButtonWidget(this, "ScummHelp.Close", _("~C~lose"), 0, GUI::kCloseCmd);
+	_nextButton = new GUI::ButtonWidget(this, "ScummHelp.Next", _("~N~ext"), Common::U32String(""), kNextCmd);
+	new GUI::ButtonWidget(this, "ScummHelp.Close", _("~C~lose"), Common::U32String(""), GUI::kCloseCmd);
 	_prevButton->clearFlags(WIDGET_ENABLED);
 
 	GUI::ContainerWidget *placeHolder = new GUI::ContainerWidget(this, "ScummHelp.HelpText");
@@ -290,8 +291,8 @@ HelpDialog::HelpDialog(const GameSettings &game)
 
 	// Dummy entries
 	for (int i = 0; i < HELP_NUM_LINES; i++) {
-		_key[i] = new GUI::StaticTextWidget(this, 0, 0, 10, 10, "", Graphics::kTextAlignRight);
-		_dsc[i] = new GUI::StaticTextWidget(this, 0, 0, 10, 10, "", Graphics::kTextAlignLeft);
+		_key[i] = new GUI::StaticTextWidget(this, 0, 0, 10, 10, Common::U32String(""), Graphics::kTextAlignRight);
+		_dsc[i] = new GUI::StaticTextWidget(this, 0, 0, 10, 10, Common::U32String(""), Graphics::kTextAlignLeft);
 	}
 
 }
@@ -388,7 +389,7 @@ InfoDialog::InfoDialog(ScummEngine *scumm, int res)
 	_text = new GUI::StaticTextWidget(this, 0, 0, 10, 10, _message, kTextAlignCenter);
 }
 
-InfoDialog::InfoDialog(ScummEngine *scumm, const String& message)
+InfoDialog::InfoDialog(ScummEngine *scumm, const U32String& message)
 : ScummDialog(0, 0, 0, 0), _vm(scumm) { // dummy x and w
 
 	_message = message;
@@ -397,7 +398,7 @@ InfoDialog::InfoDialog(ScummEngine *scumm, const String& message)
 	_text = new GUI::StaticTextWidget(this, 0, 0, 10, 10, _message, kTextAlignCenter);
 }
 
-void InfoDialog::setInfoText(const String& message) {
+void InfoDialog::setInfoText(const U32String& message) {
 	_message = message;
 	_text->setLabel(_message);
 	//reflowLayout(); // FIXME: Should we call this here? Depends on the usage patterns, I guess...
@@ -476,8 +477,8 @@ void PauseDialog::handleKeyDown(Common::KeyState state) {
 ConfirmDialog::ConfirmDialog(ScummEngine *scumm, int res)
 	: InfoDialog(scumm, res), _yesKey('y'), _noKey('n') {
 
-	if (_message.lastChar() != ')') {
-		_yesKey = _message.lastChar();
+	if (_message.encode().lastChar() != ')') {
+		_yesKey = _message.encode().lastChar();
 		_message.deleteLastChar();
 
 		if (_yesKey >= 'A' && _yesKey <= 'Z')
@@ -566,7 +567,7 @@ void ValueDisplayDialog::open() {
 }
 
 SubtitleSettingsDialog::SubtitleSettingsDialog(ScummEngine *scumm, int value)
-	: InfoDialog(scumm, ""), _value(value), _timer(0) {
+	: InfoDialog(scumm, U32String("")), _value(value), _timer(0) {
 
 }
 
@@ -605,7 +606,7 @@ void SubtitleSettingsDialog::cycleValue() {
 		_value = 0;
 
 	if (_value == 1 && g_system->getOverlayWidth() <= 320)
-		setInfoText(_sc("Speech & Subs", "lowres"));
+		setInfoText(Common::convertToU32String(_sc("Speech & Subs", "lowres")));
 	else
 		setInfoText(_(subtitleDesc[_value]));
 
@@ -613,7 +614,7 @@ void SubtitleSettingsDialog::cycleValue() {
 }
 
 Indy3IQPointsDialog::Indy3IQPointsDialog(ScummEngine *scumm, char* text)
-	: InfoDialog(scumm, text) {
+	: InfoDialog(scumm, U32String(text)) {
 }
 
 void Indy3IQPointsDialog::handleKeyDown(Common::KeyState state) {
@@ -624,7 +625,7 @@ void Indy3IQPointsDialog::handleKeyDown(Common::KeyState state) {
 }
 
 DebugInputDialog::DebugInputDialog(ScummEngine *scumm, char* text)
-	: InfoDialog(scumm, text) {
+	: InfoDialog(scumm, U32String(text)) {
 	mainText = text;
 	done = 0;
 }
@@ -656,9 +657,9 @@ LoomTownsDifficultyDialog::LoomTownsDifficultyDialog()
 	GUI::StaticTextWidget *text2 = new GUI::StaticTextWidget(this, "LoomTownsDifficultyDialog.Description2", _("Refer to your Loom(TM) manual for help."));
 	text2->setAlign(Graphics::kTextAlignCenter);
 
-	new GUI::ButtonWidget(this, "LoomTownsDifficultyDialog.Standard", _("Standard"), 0, kStandardCmd);
-	new GUI::ButtonWidget(this, "LoomTownsDifficultyDialog.Practice", _("Practice"), 0, kPracticeCmd);
-	new GUI::ButtonWidget(this, "LoomTownsDifficultyDialog.Expert", _("Expert"), 0, kExpertCmd);
+	new GUI::ButtonWidget(this, "LoomTownsDifficultyDialog.Standard", _("Standard"), Common::U32String(""), kStandardCmd);
+	new GUI::ButtonWidget(this, "LoomTownsDifficultyDialog.Practice", _("Practice"), Common::U32String(""), kPracticeCmd);
+	new GUI::ButtonWidget(this, "LoomTownsDifficultyDialog.Expert", _("Expert"), Common::U32String(""), kExpertCmd);
 }
 
 void LoomTownsDifficultyDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 59cc471dec..afcf301b28 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -45,6 +45,7 @@ public:
 
 protected:
 	typedef Common::String String;
+	typedef Common::U32String U32String;
 };
 
 #ifndef DISABLE_HELP
@@ -68,16 +69,16 @@ protected:
 class InfoDialog : public ScummDialog {
 protected:
 	ScummEngine		*_vm;
-	String _message;
+	U32String _message;
 	GUI::StaticTextWidget *_text;
 
 public:
 	// arbitrary message
-	InfoDialog(ScummEngine *scumm, const String& message);
+	InfoDialog(ScummEngine *scumm, const U32String& message);
 	// from resources
 	InfoDialog(ScummEngine *scumm, int res);
 
-	void setInfoText(const String& message);
+	void setInfoText(const U32String& message);
 
 	void handleMouseDown(int x, int y, int button, int clickCount) override {
 		setResult(0);
diff --git a/engines/scumm/help.cpp b/engines/scumm/help.cpp
index 15f1977c8f..16d796a957 100644
--- a/engines/scumm/help.cpp
+++ b/engines/scumm/help.cpp
@@ -82,9 +82,9 @@ void ScummHelp::updateStrings(byte gameId, byte version, Common::Platform platfo
 #ifdef MACOSX
 		ADD_BIND("Cmd q", _("Quit"));
 #else
-		ADD_BIND(String(_("Alt")) + " x, " + _("Ctrl") + " z", _("Quit"));
+		ADD_BIND(String(_("Alt")) + " x, " + _("Ctrl").encode() + " z", _("Quit").encode());
 #endif
-		ADD_BIND(String(_("Alt")) + " " + _("Enter"), _("Toggle fullscreen"));
+		ADD_BIND(String(_("Alt")) + " " + _("Enter").encode(), _("Toggle fullscreen"));
 		ADD_BIND("[, ]", _("Music volume up / down"));
 		ADD_BIND("-, +", _("Text speed slower / faster"));
 		ADD_BIND(_("Enter"), _("Simulate left mouse button"));
@@ -98,9 +98,9 @@ void ScummHelp::updateStrings(byte gameId, byte version, Common::Platform platfo
 		ADD_BIND(String(_("Ctrl")) + " f", _("Run in fast mode (*)"));
 		ADD_BIND(String(_("Ctrl")) + " g", _("Run in really fast mode (*)"));
 		ADD_BIND(String(_("Ctrl")) + " m", _("Toggle mouse capture"));
-		ADD_BIND(String(_("Ctrl")) + " " + _("Alt") + " 1-8", _("Switch between graphics filters"));
-		ADD_BIND(String(_("Ctrl")) + " " + _("Alt") + " +, -", _("Increase / Decrease scale factor"));
-		ADD_BIND(String(_("Ctrl")) + " " + _("Alt") + " a", _("Toggle aspect-ratio correction"));
+		ADD_BIND(String(_("Ctrl")) + " " + _("Alt").encode() + " 1-8", _("Switch between graphics filters"));
+		ADD_BIND(String(_("Ctrl")) + " " + _("Alt").encode() + " +, -", _("Increase / Decrease scale factor"));
+		ADD_BIND(String(_("Ctrl")) + " " + _("Alt").encode() + " a", _("Toggle aspect-ratio correction"));
 		ADD_LINE;
 		ADD_LINE;
 		// FIXME: This should use word-wrapping, and should not assume
diff --git a/engines/scumm/imuse/drivers/amiga.cpp b/engines/scumm/imuse/drivers/amiga.cpp
index 9407f78a92..9e819939c6 100644
--- a/engines/scumm/imuse/drivers/amiga.cpp
+++ b/engines/scumm/imuse/drivers/amiga.cpp
@@ -651,13 +651,13 @@ int IMuseDriver_Amiga::open() {
 	// when playing from the floppy disks. Obviously we don't need the redundancy files. The error dialog will display
 	// only the required files. These are different for MI2 and INDY4.
 	if (_missingFiles) {
-		Common::String message = _("This AMIGA version is missing (at least) the following file(s):\n\n");
+		Common::U32String message = _("This AMIGA version is missing (at least) the following file(s):\n\n");
 		for (int i = 0; i < 11; ++i) {
 			if (_missingFiles & (1 << i))
 				message += Common::String::format("AMIGA%d.IMS\n", i + 1);
 		}
 		message += _("\nPlease copy these file(s) into the game data directory.\n\n");
-		::GUI::displayErrorDialog(message.c_str());
+		::GUI::displayErrorDialog(message);
 		return MERR_DEVICE_NOT_AVAILABLE;
 	}
 
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index 6dccf99334..a894be6d4d 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -232,7 +232,7 @@ void ScummEngine::askForDisk(const char *filename, int disknum) {
 #endif
 	} else {
 		sprintf(buf, "Cannot find file: '%s'", filename);
-		InfoDialog dialog(this, (char *)buf);
+		InfoDialog dialog(this, Common::convertToU32String(buf));
 		runDialog(dialog);
 		error("Cannot find file: '%s'", filename);
 	}
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 7a2565f6cb..d3851269ca 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1896,8 +1896,8 @@ void ScummEngine::setupMusic(int midi) {
 			GUI::MessageDialog dialog(
 				Common::String::format(
 					_("Native MIDI support requires the Roland Upgrade from LucasArts,\n"
-					"but %s is missing. Using AdLib instead."), fileName.c_str()),
-				_("OK"));
+					"but %s is missing. Using AdLib instead.").encode().c_str(), fileName.c_str()),
+				_("OK").encode());
 			dialog.runModal();
 			_sound->_musicType = MDT_ADLIB;
 		}
@@ -2444,7 +2444,7 @@ void ScummEngine::scummLoop_updateScummVars() {
 void ScummEngine::scummLoop_handleSaveLoad() {
 	if (_saveLoadFlag) {
 		bool success;
-		const char *errMsg = 0;
+		Common::U32String errMsg("");
 
 		if (_game.version == 8 && _saveTemporaryState)
 			VAR(VAR_GAME_LOADED) = 0;
@@ -2470,13 +2470,13 @@ void ScummEngine::scummLoop_handleSaveLoad() {
 		}
 
 		if (!success) {
-			displayMessage(0, errMsg, filename.c_str());
+			displayMessage(0, errMsg.encode().c_str(), filename.c_str());
 		} else if (_saveLoadFlag == 1 && _saveLoadSlot != 0 && !_saveTemporaryState) {
 			// Display "Save successful" message, except for auto saves
 			char buf[256];
-			snprintf(buf, sizeof(buf), _("Successfully saved game in file:\n\n%s"), filename.c_str());
+			snprintf(buf, sizeof(buf), _("Successfully saved game in file:\n\n%s").encode().c_str(), filename.c_str());
 
-			GUI::TimedMessageDialog dialog(buf, 1500);
+			GUI::TimedMessageDialog dialog(Common::convertToU32String(buf), 1500);
 			runDialog(dialog);
 		}
 		if (success && _saveLoadFlag != 1)
@@ -2759,7 +2759,7 @@ bool ScummEngine::startManiac() {
 		eventMan->pushEvent(event);
 		return true;
 	} else {
-		displayMessage(0, "%s", _("Usually, Maniac Mansion would start now. But for that to work, the game files for Maniac Mansion have to be in the 'Maniac' directory inside the Tentacle game directory, and the game has to be added to ScummVM."));
+		displayMessage(0, "%s", _("Usually, Maniac Mansion would start now. But for that to work, the game files for Maniac Mansion have to be in the 'Maniac' directory inside the Tentacle game directory, and the game has to be added to ScummVM.").encode().c_str());
 		return false;
 	}
 }
@@ -2802,7 +2802,7 @@ void ScummEngine_v7::pauseEngineIntern(bool pause) {
 }
 #endif
 
-void ScummEngine::messageDialog(const char *message) {
+void ScummEngine::messageDialog(const Common::U32String &message) {
 	if (!_messageDialog)
 		_messageDialog = new InfoDialog(this, message);
 	((InfoDialog *)_messageDialog)->setInfoText(message);
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 52c88af1f2..550ae0f6b1 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -500,7 +500,7 @@ protected:
 	void confirmExitDialog();
 	void confirmRestartDialog();
 	void pauseDialog();
-	void messageDialog(const char *message);
+	void messageDialog(const Common::U32String &message);
 	void versionDialog();
 
 public:
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 0735546446..3ef6b9b766 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -115,7 +115,7 @@ void ScummEngine::showMessageDialog(const byte *msg) {
 	if (_string[3].color == 0)
 		_string[3].color = 4;
 
-	InfoDialog dialog(this, (char *)buf);
+	InfoDialog dialog(this, Common::convertToU32String((char *)buf));
 	VAR(VAR_KEYPRESS) = runDialog(dialog);
 }
 
diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp
index 160004eeb4..dd9b83e349 100644
--- a/engines/sky/compact.cpp
+++ b/engines/sky/compact.cpp
@@ -128,7 +128,7 @@ SkyCompact::SkyCompact() {
 	_cptFile = new Common::File();
 	Common::String filename = "sky.cpt";
 	if (!_cptFile->open(filename.c_str())) {
-                Common::String msg = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
+                Common::String msg = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
                 GUIErrorMessage(msg);
                 error("%s", msg.c_str());
 	}
@@ -138,7 +138,7 @@ SkyCompact::SkyCompact() {
 		error("unknown \"sky.cpt\" version");
 
 	if (SKY_CPT_SIZE != _cptFile->size()) {
-		GUI::MessageDialog dialog(_("The \"sky.cpt\" engine data file has an incorrect size."), _("OK"), NULL);
+		GUI::MessageDialog dialog(_("The \"sky.cpt\" engine data file has an incorrect size."), _("OK"));
 		dialog.runModal();
 		error("Incorrect sky.cpt size (%d, expected: %d)", _cptFile->size(), SKY_CPT_SIZE);
 	}
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index 59c65a4096..0984ad0b74 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -209,7 +209,7 @@ Common::KeymapArray SkyMetaEngine::initKeymaps(const char *target) const {
 	using namespace Common;
 	using namespace Sky;
 
-	Keymap *mainKeymap = new Keymap(Keymap::kKeymapTypeGame, "sky-main", "Beneath a Steel Sky");
+	Keymap *mainKeymap = new Keymap(Keymap::kKeymapTypeGame, "sky-main", Common::convertToU32String("Beneath a Steel Sky"));
 
 	Action *act;
 
@@ -237,7 +237,7 @@ Common::KeymapArray SkyMetaEngine::initKeymaps(const char *target) const {
 	act->addDefaultInputMapping("JOY_Y");
 	mainKeymap->addAction(act);
 
-	Keymap *shortcutsKeymap = new Keymap(Keymap::kKeymapTypeGame, SkyEngine::shortcutsKeymapId, "Beneath a Steel Sky - Shortcuts");
+	Keymap *shortcutsKeymap = new Keymap(Keymap::kKeymapTypeGame, SkyEngine::shortcutsKeymapId, Common::convertToU32String("Beneath a Steel Sky - Shortcuts"));
 
 	act = new Action(kStandardActionOpenMainMenu, _("Open control panel"));
 	act->setCustomEngineActionEvent(kSkyActionOpenControlPanel);
@@ -313,7 +313,7 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const {
 		Common::InSaveFile *in = saveFileMan->openForLoading(*file);
 		if (in) {
 			saveList.push_back(SaveStateDescriptor(slotNum,
-				(slotNum == 0) ? _("Autosave") : savenames[slotNum - 1]));
+				(slotNum == 0) ? _("Autosave").encode() : savenames[slotNum - 1]));
 			delete in;
 		}
 	}
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index f731cc8904..e95bcb9418 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -184,7 +184,7 @@ Common::Error SupernovaEngine::loadGameStrings() {
 
 	if (stream == nullptr) {
 		Common::Language l = Common::parseLanguage(ConfMan.get("language"));
-		GUIErrorMessageFormat(_("Unable to locate the text for %s language in engine data file."), Common::getLanguageDescription(l));
+		GUIErrorMessageFormat(_("Unable to locate the text for %s language in engine data file.").encode().c_str(), Common::getLanguageDescription(l));
 		return Common::kReadingFailed;
 	}
 
@@ -455,19 +455,19 @@ Common::SeekableReadStream *SupernovaEngine::getBlockFromDatFile(Common::String
 	char id[5], lang[5];
 	id[4] = lang[4] = '\0';
 	if (!f.open(SUPERNOVA_DAT)) {
-		GUIErrorMessageFormat(_("Unable to locate the '%s' engine data file."), SUPERNOVA_DAT);
+		GUIErrorMessageFormat(_("Unable to locate the '%s' engine data file.").encode().c_str(), SUPERNOVA_DAT);
 		return nullptr;
 	}
 	f.read(id, 3);
 	if (strncmp(id, "MSN", 3) != 0) {
-		GUIErrorMessageFormat(_("The '%s' engine data file is corrupt."), SUPERNOVA_DAT);
+		GUIErrorMessageFormat(_("The '%s' engine data file is corrupt.").encode().c_str(), SUPERNOVA_DAT);
 		return nullptr;
 	}
 
 	int version = f.readByte();
 	if (version != SUPERNOVA_DAT_VERSION) {
 		GUIErrorMessageFormat(
-			_("Incorrect version of the '%s' engine data file found. Expected %d but got %d."),
+			_("Incorrect version of the '%s' engine data file found. Expected %d but got %d.").encode().c_str(),
 			SUPERNOVA_DAT, SUPERNOVA_DAT_VERSION, version);
 		return nullptr;
 	}
@@ -477,7 +477,7 @@ Common::SeekableReadStream *SupernovaEngine::getBlockFromDatFile(Common::String
 		int part = f.readByte();
 		gameBlockSize = f.readUint32LE();
 		if (f.eos()){
-			GUIErrorMessageFormat(_("Unable to find block for part %d"), _MSPart);
+			GUIErrorMessageFormat(_("Unable to find block for part %d").encode().c_str(), _MSPart);
 			return nullptr;
 		}
 		if (part == _MSPart) {
@@ -520,7 +520,7 @@ Common::Error SupernovaEngine::showTextReader(const char *extension) {
 			filename = Common::String::format("ms2.%s", extension);
 
 		if (!file.open(filename)) {
-			GUIErrorMessageFormat(_("Unable to find '%s' in game folder or the engine data file."), filename.c_str());
+			GUIErrorMessageFormat(_("Unable to find '%s' in game folder or the engine data file.").encode().c_str(), filename.c_str());
 			return Common::kReadingFailed;
 		}
 		stream = file.readStream(file.size());
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index bf2ab654d5..777c7264b8 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -573,7 +573,7 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan *
 	}
 
 	if (!vm->isPsx() || scumm_stricmp(sequenceList[id], "enddemo") != 0) {
-		Common::String buf = Common::String::format(_("Cutscene '%s' not found"), sequenceList[id]);
+		Common::U32String buf = Common::String::format(_("Cutscene '%s' not found").encode().c_str(), sequenceList[id]);
 		GUI::MessageDialog dialog(buf, _("OK"));
 		dialog.runModal();
 	}
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index 43b2f13bb5..2f94a0ef4d 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -1258,8 +1258,8 @@ bool Control::convertSaveGame(uint8 slot, char *desc) {
 	if (testSave) {
 		delete testSave;
 
-		Common::String msg = Common::String::format(_("Target new saved game already exists!\n"
-		                     "Would you like to keep the old saved game (%s) or the new one (%s)?\n"),
+		Common::U32String msg = Common::String::format(_("Target new saved game already exists!\n"
+		                     "Would you like to keep the old saved game (%s) or the new one (%s)?\n").encode().c_str(),
 		                     oldFileName, newFileName);
 		GUI::MessageDialog dialog0(msg, _("Keep the old one"), _("Keep the new one"));
 
diff --git a/engines/sword1/logic.cpp b/engines/sword1/logic.cpp
index a4c6cf675c..a5d98ad150 100644
--- a/engines/sword1/logic.cpp
+++ b/engines/sword1/logic.cpp
@@ -1632,7 +1632,7 @@ int Logic::fnRestartGame(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32
 
 int Logic::fnQuitGame(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32 d, int32 z, int32 x) {
 	if (SwordEngine::_systemVars.isDemo) {
-		GUI::MessageDialog dialog(_("This is the end of the Broken Sword 1 Demo"), _("OK"), NULL);
+		GUI::MessageDialog dialog(_("This is the end of the Broken Sword 1 Demo"), _("OK"));
 		dialog.runModal();
 		Engine::quitGame();
 	} else
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index 907e406b38..ee2f22d328 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -471,7 +471,7 @@ MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, OSystem *system
 	// The demo tries to play some cutscenes that aren't there, so make those warnings more discreet.
 	// In addition, some of the later re-releases of the game don't have the "eye" Virgin logo movie.
 	if (!vm->_logic->readVar(DEMO) && strcmp(name, "eye") != 0) {
-		Common::String buf = Common::String::format(_("Cutscene '%s' not found"), name);
+		Common::U32String buf = Common::String::format(_("Cutscene '%s' not found").encode().c_str(), name);
 		GUI::MessageDialog dialog(buf, _("OK"));
 		dialog.runModal();
 	} else
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index 8388ee032e..4cc602dd35 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -94,7 +94,7 @@ bool Resources::loadArchives(const ADGameDescription *gd) {
 	Common::String filename = "teenagent.dat";
 	if (!dat_file->open(filename.c_str())) {
 		delete dat_file;
-		Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
+		Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
 		warning("%s", errorMessage.c_str());
 		GUIErrorMessage(errorMessage);
 		return false;
diff --git a/engines/testbed/config.cpp b/engines/testbed/config.cpp
index 4831eb89c1..c8313a6d6e 100644
--- a/engines/testbed/config.cpp
+++ b/engines/testbed/config.cpp
@@ -34,8 +34,8 @@ TestbedOptionsDialog::TestbedOptionsDialog(Common::Array<Testsuite *> &tsList, T
 		GUI::Dialog("TestbedOptions"),
 		_testbedConfMan(tsConfMan) {
 
-	new GUI::StaticTextWidget(this, "TestbedOptions.Headline", "Select Testsuites to Execute");
-	new GUI::StaticTextWidget(this, "TestbedOptions.Info", "Use Doubleclick to select/deselect");
+	new GUI::StaticTextWidget(this, "TestbedOptions.Headline", Common::convertToU32String("Select Testsuites to Execute"));
+	new GUI::StaticTextWidget(this, "TestbedOptions.Info", Common::convertToU32String("Use Doubleclick to select/deselect"));
 
 	// Construct a String Array
 	Common::Array<Testsuite *>::const_iterator iter;
@@ -63,12 +63,12 @@ TestbedOptionsDialog::TestbedOptionsDialog(Common::Array<Testsuite *> &tsList, T
 	_testListDisplay->setEditable(false);
 
 	if (selected > (tsList.size() - selected)) {
-		_selectButton = new GUI::ButtonWidget(this, "TestbedOptions.SelectAll", "Deselect All", 0, kTestbedDeselectAll, 0);
+		_selectButton = new GUI::ButtonWidget(this, "TestbedOptions.SelectAll", Common::convertToU32String("Deselect All"), Common::U32String(""), kTestbedDeselectAll, 0);
 	} else {
-		_selectButton = new GUI::ButtonWidget(this, "TestbedOptions.SelectAll", "Select All", 0, kTestbedSelectAll, 0);
+		_selectButton = new GUI::ButtonWidget(this, "TestbedOptions.SelectAll", Common::convertToU32String("Select All"), Common::U32String(""), kTestbedSelectAll, 0);
 	}
-	new GUI::ButtonWidget(this, "TestbedOptions.RunTests", "Run tests", 0, GUI::kCloseCmd);
-	new GUI::ButtonWidget(this, "TestbedOptions.Quit", "Exit Testbed", 0, kTestbedQuitCmd);
+	new GUI::ButtonWidget(this, "TestbedOptions.RunTests", Common::convertToU32String("Run tests"), Common::U32String(""), GUI::kCloseCmd);
+	new GUI::ButtonWidget(this, "TestbedOptions.Quit", Common::convertToU32String("Exit Testbed"), Common::U32String(""), kTestbedQuitCmd);
 }
 
 TestbedOptionsDialog::~TestbedOptionsDialog() {}
@@ -102,7 +102,7 @@ void TestbedOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd,
 		break;
 
 	case kTestbedDeselectAll:
-		_selectButton->setLabel("Select All");
+		_selectButton->setLabel(Common::convertToU32String("Select All"));
 		_selectButton->setCmd(kTestbedSelectAll);
 		for (uint i = 0; i < _testSuiteArray.size(); i++) {
 			_testListDisplay->markAsDeselected(i);
@@ -114,7 +114,7 @@ void TestbedOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd,
 		break;
 
 	case kTestbedSelectAll:
-		_selectButton->setLabel("Deselect All");
+		_selectButton->setLabel(Common::convertToU32String("Deselect All"));
 		_selectButton->setCmd(kTestbedDeselectAll);
 		for (uint i = 0; i < _testSuiteArray.size(); i++) {
 			_testListDisplay->markAsSelected(i);
@@ -152,11 +152,11 @@ void TestbedInteractionDialog::addButton(uint w, uint h, const Common::String na
 		xOffset = _xOffset;
 	}
 	_yOffset += yPadding;
-	_buttonArray.push_back(new GUI::ButtonWidget(this, xOffset, _yOffset, w, h, name, 0, cmd));
+	_buttonArray.push_back(new GUI::ButtonWidget(this, xOffset, _yOffset, w, h, name, Common::U32String(""), cmd));
 	_yOffset += h;
 }
 
-void TestbedInteractionDialog::addList(uint x, uint y, uint w, uint h, const Common::Array<Common::String> &strArray, GUI::ListWidget::ColorList *colors, uint yPadding) {
+void TestbedInteractionDialog::addList(uint x, uint y, uint w, uint h, const Common::Array<Common::U32String> &strArray, GUI::ListWidget::ColorList *colors, uint yPadding) {
 	_yOffset += yPadding;
 	GUI::ListWidget *list = new GUI::ListWidget(this, x, y, w, h);
 	list->setEditable(false);
@@ -166,7 +166,7 @@ void TestbedInteractionDialog::addList(uint x, uint y, uint w, uint h, const Com
 }
 
 void TestbedInteractionDialog::addButtonXY(uint x, uint /* y */, uint w, uint h, const Common::String name, uint32 cmd) {
-	_buttonArray.push_back(new GUI::ButtonWidget(this, x, _yOffset, w, h, name, 0, cmd));
+	_buttonArray.push_back(new GUI::ButtonWidget(this, x, _yOffset, w, h, name, Common::U32String(""), cmd));
 }
 
 void TestbedInteractionDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/engines/testbed/config.h b/engines/testbed/config.h
index ac48486d22..02149e6d09 100644
--- a/engines/testbed/config.h
+++ b/engines/testbed/config.h
@@ -72,15 +72,15 @@ public:
 	TestbedListWidget(GUI::Dialog *boss, const Common::String &name, Common::Array<Testsuite *> tsArray) : GUI::ListWidget(boss, name), _testSuiteArray(tsArray) {}
 
 	void markAsSelected(int i) {
-		if (!_list[i].contains("selected")) {
-			_list[i] += " (selected)";
+		if (!_list[i].encode().contains("selected")) {
+			_list[i] += Common::convertToU32String(" (selected)");
 		}
 		_listColors[i] = GUI::ThemeEngine::kFontColorNormal;
 		draw();
 	}
 
 	void markAsDeselected(int i) {
-		if (_list[i].contains("selected")) {
+		if (_list[i].encode().contains("selected")) {
 			_list[i] = _testSuiteArray[i]->getDescription();
 		}
 		_listColors[i] = GUI::ThemeEngine::kFontColorAlternate;
@@ -107,7 +107,7 @@ private:
 	GUI::ListWidget::ColorList _colors;
 	GUI::ButtonWidget	*_selectButton;
 	Common::Array<Testsuite *> _testSuiteArray;
-	Common::StringArray _testSuiteDescArray;
+	Common::U32StringArray _testSuiteDescArray;
 	TestbedListWidget *_testListDisplay;
 	TestbedConfigManager *_testbedConfMan;
 };
@@ -120,7 +120,7 @@ public:
 	void addButton(uint w, uint h, const Common::String name, uint32 cmd, uint xOffset = 0, uint yPadding = 8);
 	void addButtonXY(uint x, uint y, uint w, uint h, const Common::String name, uint32 cmd);
 	void addText(uint w, uint h, const Common::String text, Graphics::TextAlign textAlign, uint xOffset, uint yPadding = 8);
-	void addList(uint x, uint y, uint w, uint h, const Common::Array<Common::String> &strArray, GUI::ListWidget::ColorList *colors = 0, uint yPadding = 8);
+	void addList(uint x, uint y, uint w, uint h, const Common::Array<Common::U32String> &strArray, GUI::ListWidget::ColorList *colors = 0, uint yPadding = 8);
 protected:
 	Common::Array<GUI::ButtonWidget *> _buttonArray;
 	uint _xOffset;
diff --git a/engines/testbed/sound.cpp b/engines/testbed/sound.cpp
index 998afbf7db..1c8c219cc3 100644
--- a/engines/testbed/sound.cpp
+++ b/engines/testbed/sound.cpp
@@ -76,32 +76,32 @@ void SoundSubsystemDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd,
 
 	switch (cmd) {
 		case kPlayChannel1:
-			_buttonArray[0]->setLabel("Pause Channel #1");
+			_buttonArray[0]->setLabel(Common::convertToU32String("Pause Channel #1"));
 			_buttonArray[0]->setCmd(kPauseChannel1);
 			_mixer->pauseHandle(_h1, false);
 			break;
 		case kPlayChannel2:
-			_buttonArray[1]->setLabel("Pause Channel #2");
+			_buttonArray[1]->setLabel(Common::convertToU32String("Pause Channel #2"));
 			_buttonArray[1]->setCmd(kPauseChannel2);
 			_mixer->pauseHandle(_h2, false);
 			break;
 		case kPlayChannel3:
-			_buttonArray[2]->setLabel("Pause Channel #3");
+			_buttonArray[2]->setLabel(Common::convertToU32String("Pause Channel #3"));
 			_buttonArray[2]->setCmd(kPauseChannel3);
 			_mixer->pauseHandle(_h3, false);
 			break;
 		case kPauseChannel1:
-			_buttonArray[0]->setLabel("Play Channel #1");
+			_buttonArray[0]->setLabel(Common::convertToU32String("Play Channel #1"));
 			_buttonArray[0]->setCmd(kPlayChannel1);
 			_mixer->pauseHandle(_h1, true);
 			break;
 		case kPauseChannel2:
-			_buttonArray[1]->setLabel("Play Channel #2");
+			_buttonArray[1]->setLabel(Common::convertToU32String("Play Channel #2"));
 			_buttonArray[1]->setCmd(kPlayChannel2);
 			_mixer->pauseHandle(_h2, true);
 			break;
 		case kPauseChannel3:
-			_buttonArray[2]->setLabel("Play Channel #3");
+			_buttonArray[2]->setLabel(Common::convertToU32String("Play Channel #3"));
 			_buttonArray[2]->setCmd(kPlayChannel3);
 			_mixer->pauseHandle(_h3, true);
 			break;
diff --git a/engines/testbed/testbed.cpp b/engines/testbed/testbed.cpp
index e17b68e656..cf98513d04 100644
--- a/engines/testbed/testbed.cpp
+++ b/engines/testbed/testbed.cpp
@@ -58,7 +58,7 @@ void TestbedExitDialog::init() {
 	_yOffset = 0;
 	Common::String text = "Thank you for using ScummVM testbed! Here are yor summarized results:";
 	addText(450, 20, text, Graphics::kTextAlignCenter, _xOffset, 15);
-	Common::Array<Common::String> strArray;
+	Common::Array<Common::U32String> strArray;
 	GUI::ListWidget::ColorList colors;
 
 	for (Common::Array<Testsuite *>::const_iterator i = _testsuiteList.begin(); i != _testsuiteList.end(); ++i) {
@@ -67,7 +67,7 @@ void TestbedExitDialog::init() {
 		if ((*i)->isEnabled()) {
 			strArray.push_back(Common::String::format("Passed: %d  Failed: %d Skipped: %d", (*i)->getNumTestsPassed(), (*i)->getNumTestsFailed(), (*i)->getNumTestsSkipped()));
 		} else {
-			strArray.push_back("Skipped");
+			strArray.push_back(Common::convertToU32String("Skipped"));
 		}
 		colors.push_back(GUI::ThemeEngine::kFontColorAlternate);
 	}
diff --git a/engines/testbed/testsuite.cpp b/engines/testbed/testsuite.cpp
index 817b70ede3..14123fd845 100644
--- a/engines/testbed/testsuite.cpp
+++ b/engines/testbed/testsuite.cpp
@@ -111,12 +111,12 @@ void Testsuite::genReport() const {
 }
 
 bool Testsuite::handleInteractiveInput(const Common::String &textToDisplay, const char *opt1, const char *opt2, OptionSelected result) {
-	GUI::MessageDialog prompt(textToDisplay, opt1, opt2);
+	GUI::MessageDialog prompt(textToDisplay.c_str(), opt1, opt2);
 	return prompt.runModal() == result ? true : false;
 }
 
 void Testsuite::displayMessage(const Common::String &textToDisplay, const char *defaultButton) {
-	GUI::MessageDialog prompt(textToDisplay, defaultButton);
+	GUI::MessageDialog prompt(textToDisplay.c_str(), defaultButton);
 	prompt.runModal();
 }
 
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index b198aa8b30..6794908772 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -483,12 +483,12 @@ void SoundManager::setSFXVolumes(uint8 volume) {
 }
 
 void SoundManager::showSoundError(const char *errorMsg, const char *soundFile) {
-	Common::String msg;
+	Common::U32String msg;
 	msg = Common::String::format(errorMsg, soundFile);
-	GUI::MessageDialog dialog(msg, "OK");
+	GUI::MessageDialog dialog(msg);
 	dialog.runModal();
 
-	error("%s", msg.c_str());
+	error("%s", msg.encode().c_str());
 }
 
 /**
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index 8ae2fe21b5..8b3d1a77f9 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -193,7 +193,7 @@ bool TonyEngine::loadTonyDat() {
 	in.open(filename.c_str());
 
 	if (!in.isOpen()) {
-		msg = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
+		msg = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
 		GUIErrorMessage(msg);
 		warning("%s", msg.c_str());
 		return false;
@@ -205,7 +205,7 @@ bool TonyEngine::loadTonyDat() {
 	buf[4] = '\0';
 
 	if (strcmp(buf, "TONY")) {
-		msg = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
+		msg = Common::String::format(_("The '%s' engine data file is corrupt.").encode().c_str(), filename.c_str());
 		GUIErrorMessage(msg);
 		warning("%s", msg.c_str());
 		return false;
@@ -216,7 +216,7 @@ bool TonyEngine::loadTonyDat() {
 
 	if ((majVer != TONY_DAT_VER_MAJ) || (minVer != TONY_DAT_VER_MIN)) {
 		msg = Common::String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.").encode().c_str(),
 			filename.c_str(), TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer);
 		GUIErrorMessage(msg);
 		warning("%s", msg.c_str());
@@ -253,7 +253,7 @@ bool TonyEngine::loadTonyDat() {
 
 	int numVariant = in.readUint16BE();
 	if (expectedLangVariant > numVariant - 1) {
-		msg = Common::String::format(_("Font variant not present in '%s' engine data file."), filename.c_str());
+		msg = Common::String::format(_("Font variant not present in '%s' engine data file.").encode().c_str(), filename.c_str());
 		GUIErrorMessage(msg);
 		warning("%s", msg.c_str());
 
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 0f2e0da9c8..2c7548c1bf 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -222,12 +222,12 @@ void ToonEngine::parseInput() {
 				if (slotNum >= 0 && slotNum <= 9 && canSaveGameStateCurrently()) {
 					if (saveGame(slotNum, "")) {
 						// ok
-						Common::String buf = Common::String::format(_("Saved game in slot #%d "), slotNum);
+						Common::U32String buf = Common::String::format(_("Saved game in slot #%d ").encode().c_str(), slotNum);
 						GUI::TimedMessageDialog dialog(buf, 1000);
 						dialog.runModal();
 					} else {
-						Common::String buf = Common::String::format(_("Could not quick save into slot #%d"), slotNum);
-						GUI::MessageDialog dialog(buf, "OK", 0);
+						Common::U32String buf = Common::String::format(_("Could not quick save into slot #%d").encode().c_str(), slotNum);
+						GUI::MessageDialog dialog(buf);
 						dialog.runModal();
 
 					}
@@ -239,12 +239,12 @@ void ToonEngine::parseInput() {
 				if (slotNum >= 0 && slotNum <= 9 && canLoadGameStateCurrently()) {
 					if (loadGame(slotNum)) {
 						// ok
-						Common::String buf = Common::String::format(_("Saved game #%d quick loaded"), slotNum);
+						Common::U32String buf = Common::String::format(_("Saved game #%d quick loaded").encode().c_str(), slotNum);
 						GUI::TimedMessageDialog dialog(buf, 1000);
 						dialog.runModal();
 					} else {
-						Common::String buf = Common::String::format(_("Could not quick load the saved game #%d"), slotNum);
-						GUI::MessageDialog dialog(buf, "OK", 0);
+						Common::U32String buf = Common::String::format(_("Could not quick load the saved game #%d").encode().c_str(), slotNum);
+						GUI::MessageDialog dialog(buf);
 						warning("%s", buf.c_str());
 						dialog.runModal();
 					}
@@ -1524,7 +1524,7 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) {
 
 	// load package
 	if (!resources()->openPackage(createRoomFilename(locationName + ".PAK"))) {
-		Common::String msg = Common::String::format(_("Unable to locate the '%s' data file."), createRoomFilename(locationName + ".PAK").c_str());
+		Common::String msg = Common::String::format(_("Unable to locate the '%s' data file.").encode().c_str(), createRoomFilename(locationName + ".PAK").c_str());
 		GUIErrorMessage(msg);
 		warning("%s", msg.c_str());
 		_shouldQuit = true;
@@ -4949,7 +4949,7 @@ bool ToonEngine::loadToonDat() {
 	in.open(filename.c_str());
 
 	if (!in.isOpen()) {
-		msg = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
+		msg = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
 		GUIErrorMessage(msg);
 		warning("%s", msg.c_str());
 		return false;
@@ -4961,7 +4961,7 @@ bool ToonEngine::loadToonDat() {
 	buf[4] = '\0';
 
 	if (strcmp(buf, "TOON")) {
-		msg = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
+		msg = Common::String::format(_("The '%s' engine data file is corrupt.").encode().c_str(), filename.c_str());
 		GUIErrorMessage(msg);
 		warning("%s", msg.c_str());
 		return false;
@@ -4972,7 +4972,7 @@ bool ToonEngine::loadToonDat() {
 
 	if ((majVer != TOON_DAT_VER_MAJ) || (minVer != TOON_DAT_VER_MIN)) {
 		msg = Common::String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.").encode().c_str(),
 			filename.c_str(), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer);
 		GUIErrorMessage(msg);
 		warning("%s", msg.c_str());
diff --git a/engines/ultima/nuvie/nuvie.cpp b/engines/ultima/nuvie/nuvie.cpp
index ff4776f63b..e9292c4840 100644
--- a/engines/ultima/nuvie/nuvie.cpp
+++ b/engines/ultima/nuvie/nuvie.cpp
@@ -321,7 +321,7 @@ Common::Error NuvieEngine::saveGameState(int slot, const Common::String &desc, b
 
 			// Display that the game was saved
 			MsgScroll *scroll = Game::get_game()->get_scroll();
-			scroll->display_string(_("\nGame Saved\n\n"));
+			scroll->display_string(_("\nGame Saved\n\n").encode().c_str());
 			scroll->display_prompt();
 		}
 
@@ -370,12 +370,12 @@ bool NuvieEngine::quickSave(int saveSlot, bool isLoad) {
 		if (!canLoadGameStateCurrently(false))
 			return false;
 
-		text = _("loading quick save %d");
+		text = Common::convertFromU32String(_("loading quick save %d"));
 	} else {
 		if (!canSaveGameStateCurrently(false))
 			return false;
 
-		text = _("saving quick save %d");
+		text = Common::convertFromU32String(_("saving quick save %d"));
 	}
 
 	text = Std::string::format(text.c_str(), saveSlot);
@@ -389,7 +389,7 @@ bool NuvieEngine::quickSave(int saveSlot, bool isLoad) {
 			return false;
 		}
 	} else {
-		Common::String saveDesc = Common::String::format(_("Quicksave %03d"), saveSlot);
+		Common::String saveDesc = Common::String::format(_("Quicksave %03d").encode().c_str(), saveSlot);
 		return saveGameState(saveSlot, saveDesc, false).getCode() == Common::kNoError;
 	}
 }
diff --git a/engines/ultima/shared/engine/data_archive.cpp b/engines/ultima/shared/engine/data_archive.cpp
index 5966431a70..457bbfe6ab 100644
--- a/engines/ultima/shared/engine/data_archive.cpp
+++ b/engines/ultima/shared/engine/data_archive.cpp
@@ -78,7 +78,7 @@ bool UltimaDataArchive::load(const Common::String &subfolder,
 			(dataArchive = Common::makeZipArchive(DATA_FILENAME)) == 0 ||
 			!f.open(Common::String::format("%s/version.txt", subfolder.c_str()), *dataArchive)) {
 			delete dataArchive;
-			errorMsg = Common::String::format(_("Could not locate engine data %s"), DATA_FILENAME);
+			errorMsg = Common::String::format(_("Could not locate engine data %s").encode().c_str(), DATA_FILENAME);
 			return false;
 		}
 	}
@@ -96,7 +96,7 @@ bool UltimaDataArchive::load(const Common::String &subfolder,
 
 	if (major != reqMajorVersion || minor != reqMinorVersion) {
 		delete dataArchive;
-		errorMsg = Common::String::format(_("Out of date engine data. Expected %d.%d, but got version %d.%d"),
+		errorMsg = Common::String::format(_("Out of date engine data. Expected %d.%d, but got version %d.%d").encode().c_str(),
 			reqMajorVersion, reqMinorVersion, major, minor);
 		return false;
 	}
diff --git a/engines/ultima/ultima4/meta_engine.cpp b/engines/ultima/ultima4/meta_engine.cpp
index 46384354e6..550750924b 100644
--- a/engines/ultima/ultima4/meta_engine.cpp
+++ b/engines/ultima/ultima4/meta_engine.cpp
@@ -201,7 +201,7 @@ Common::KeymapArray MetaEngine::initKeymaps(KeybindingMode mode) {
 	for (int kCtr = 0; recPtr->_id; ++recPtr, ++kCtr) {
 		// Core keymaps
 		keyMap = new Common::Keymap(Common::Keymap::kKeymapTypeGame,
-			recPtr->_id, recPtr->_desc);
+			recPtr->_id, Common::convertToU32String(recPtr->_desc));
 		keymapArray.push_back(keyMap);
 
 		if (kCtr == 0) {
diff --git a/engines/ultima/ultima8/gumps/u8_save_gump.cpp b/engines/ultima/ultima8/gumps/u8_save_gump.cpp
index f97201e93e..a3af0d67a2 100644
--- a/engines/ultima/ultima8/gumps/u8_save_gump.cpp
+++ b/engines/ultima/ultima8/gumps/u8_save_gump.cpp
@@ -296,13 +296,13 @@ void U8SaveGump::loadDescriptions() {
 		// FIXME: move version checks elsewhere!!
 		switch (state) {
 		case SavegameReader::SAVE_CORRUPT:
-			_descriptions[i] = _("[corrupt]");
+			_descriptions[i] = Common::convertFromU32String(_("[corrupt]"));
 			break;
 		case SavegameReader::SAVE_OUT_OF_DATE:
-			_descriptions[i] = _("[outdated]");
+			_descriptions[i] = Common::convertFromU32String(_("[outdated]"));
 			break;
 		case SavegameReader::SAVE_TOO_RECENT:
-			_descriptions[i] = _("[too modern]");
+			_descriptions[i] = Common::convertFromU32String(_("[too modern]"));
 			break;
 		default:
 			break;
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp
index ad38f5d529..d0c495bf9c 100644
--- a/engines/wintermute/base/base_persistence_manager.cpp
+++ b/engines/wintermute/base/base_persistence_manager.cpp
@@ -153,7 +153,7 @@ void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &des
 		return;
 	}
 	desc.setSaveSlot(slot);
-	desc.setDescription(_savedDescription);
+	desc.setDescription(Common::convertToU32String(_savedDescription));
 	desc.setDeletableFlag(true);
 	desc.setWriteProtectedFlag(false);
 
diff --git a/engines/wintermute/detection.cpp b/engines/wintermute/detection.cpp
index ebd5487973..0ead7579d4 100644
--- a/engines/wintermute/detection.cpp
+++ b/engines/wintermute/detection.cpp
@@ -209,7 +209,7 @@ public:
 	SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override {
 		Wintermute::BasePersistenceManager pm(target, true);
 		SaveStateDescriptor retVal;
-		retVal.setDescription("Invalid savegame");
+		retVal.setDescription(Common::convertToU32String("Invalid savegame"));
 		pm.getSaveStateDesc(slot, retVal);
 		return retVal;
 	}
diff --git a/engines/wintermute/keymapper_tables.h b/engines/wintermute/keymapper_tables.h
index f65030661f..52bc3b9557 100644
--- a/engines/wintermute/keymapper_tables.h
+++ b/engines/wintermute/keymapper_tables.h
@@ -34,9 +34,9 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 
 	using namespace Common;
 
-	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "wintermute", "Wintermute engine");
-	Keymap *gameKeyMap = new Keymap(Keymap::kKeymapTypeGame, gameId, gameDescr);
-	Keymap *extraKeyMap = new Keymap(Keymap::kKeymapTypeGame, "extras", "ScummVM extra actions");
+	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "wintermute", Common::convertToU32String("Wintermute engine"));
+	Keymap *gameKeyMap = new Keymap(Keymap::kKeymapTypeGame, gameId, Common::convertToU32String(gameDescr));
+	Keymap *extraKeyMap = new Keymap(Keymap::kKeymapTypeGame, "extras", Common::convertToU32String("ScummVM extra actions"));
 
 	Action *act;
 
diff --git a/engines/zvision/detection.cpp b/engines/zvision/detection.cpp
index d97cee5ef4..3723a8f217 100644
--- a/engines/zvision/detection.cpp
+++ b/engines/zvision/detection.cpp
@@ -129,7 +129,7 @@ Common::KeymapArray ZVisionMetaEngine::initKeymaps(const char *target) const {
 	using namespace Common;
 	using namespace ZVision;
 
-	Keymap *mainKeymap = new Keymap(Keymap::kKeymapTypeGame, mainKeymapId, "Z-Vision");
+	Keymap *mainKeymap = new Keymap(Keymap::kKeymapTypeGame, mainKeymapId, Common::convertToU32String("Z-Vision"));
 
 	Action *act;
 
@@ -145,7 +145,7 @@ Common::KeymapArray ZVisionMetaEngine::initKeymaps(const char *target) const {
 	act->addDefaultInputMapping("JOY_B");
 	mainKeymap->addAction(act);
 
-	Keymap *gameKeymap = new Keymap(Keymap::kKeymapTypeGame, gameKeymapId, "Z-Vision - Game");
+	Keymap *gameKeymap = new Keymap(Keymap::kKeymapTypeGame, gameKeymapId, Common::convertToU32String("Z-Vision - Game"));
 
 	act = new Action(kStandardActionMoveUp, _("Look Up"));
 	act->setCustomEngineActionEvent(kZVisionActionUp);
@@ -232,7 +232,7 @@ Common::KeymapArray ZVisionMetaEngine::initKeymaps(const char *target) const {
 	act->addDefaultInputMapping("C+p");
 	gameKeymap->addAction(act);
 
-	Keymap *cutscenesKeymap = new Keymap(Keymap::kKeymapTypeGame, cutscenesKeymapId, "Z-Vision - Cutscenes");
+	Keymap *cutscenesKeymap = new Keymap(Keymap::kKeymapTypeGame, cutscenesKeymapId, Common::convertToU32String("Z-Vision - Cutscenes"));
 
 	act = new Action(kStandardActionSkip, _("Skip cutscene"));
 	act->setCustomEngineActionEvent(kZVisionActionSkipCutscene);
diff --git a/engines/zvision/file/save_manager.cpp b/engines/zvision/file/save_manager.cpp
index ec5e28375e..8d7c7a42b9 100644
--- a/engines/zvision/file/save_manager.cpp
+++ b/engines/zvision/file/save_manager.cpp
@@ -221,7 +221,7 @@ bool SaveManager::readSaveGameHeader(Common::InSaveFile *in, SaveGameHeader &hea
 			Common::String::format(
 				_("This saved game uses version %u, but this engine only "
 				  "supports up to version %d. You will need an updated version "
-				  "of the engine to use this saved game."), tempVersion, SAVE_VERSION
+				  "of the engine to use this saved game.").encode().c_str(), tempVersion, SAVE_VERSION
 			),
 		_("OK"));
 		dialog.runModal();
diff --git a/gui/about.cpp b/gui/about.cpp
index a82e3252e7..4238607fdc 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -99,7 +99,7 @@ AboutDialog::AboutDialog()
 	version += gScummVMVersion;
 	_lines.push_back(version);
 
-	Common::String date = Common::String::format(_("(built on %s)").encode().c_str(), gScummVMBuildDate);
+	Common::U32String date = Common::String::format(_("(built on %s)").encode().c_str(), gScummVMBuildDate);
 	_lines.push_back(U32String("C2") + date);
 
 	for (i = 0; i < ARRAYSIZE(copyright_text); i++)
diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp
index aeb4d927cd..0708978719 100644
--- a/gui/downloaddialog.cpp
+++ b/gui/downloaddialog.cpp
@@ -224,8 +224,8 @@ Common::U32String DownloadDialog::getSpeedLabelText() {
 
 void DownloadDialog::refreshWidgets() {
 	_localDirectory = CloudMan.getDownloadLocalDirectory();
-	_remoteDirectoryLabel->setLabel(_("From: ") + CloudMan.getDownloadRemoteDirectory());
-	_localDirectoryLabel->setLabel(_("To: ") + _localDirectory);
+	_remoteDirectoryLabel->setLabel(_("From: ").encode() + CloudMan.getDownloadRemoteDirectory());
+	_localDirectoryLabel->setLabel(_("To: ").encode() + _localDirectory);
 	uint32 progress = (uint32)(100 * CloudMan.getDownloadingProgress());
 	_percentLabel->setLabel(Common::String::format("%u %%", progress));
 	_downloadSizeLabel->setLabel(getSizeLabelText());
diff --git a/gui/fluidsynth-dialog.cpp b/gui/fluidsynth-dialog.cpp
index 82405a9091..25ec69cab8 100644
--- a/gui/fluidsynth-dialog.cpp
+++ b/gui/fluidsynth-dialog.cpp
@@ -75,28 +75,28 @@ FluidSynthSettingsDialog::FluidSynthSettingsDialog()
 	// 0.00 - 1.20, Default: 0.20
 	_reverbRoomSizeSlider->setMinValue(0);
 	_reverbRoomSizeSlider->setMaxValue(120);
-	_reverbRoomSizeLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeLabel", "20");
+	_reverbRoomSizeLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.RoomSizeLabel", Common::U32String("20"));
 
 	_reverbDampingDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingText", _("Damp:"));
 	_reverbDampingSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingSlider", Common::U32String(""), kReverbDampingChangedCmd);
 	// 0.00 - 1.00, Default: 0.00
 	_reverbDampingSlider->setMinValue(0);
 	_reverbDampingSlider->setMaxValue(100);
-	_reverbDampingLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingLabel", "0");
+	_reverbDampingLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.DampingLabel", Common::U32String("0"));
 
 	_reverbWidthDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthText", _("Width:"));
 	_reverbWidthSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthSlider", Common::U32String(""), kReverbWidthChangedCmd);
 	// 0 - 100, Default: 1
 	_reverbWidthSlider->setMinValue(0);
 	_reverbWidthSlider->setMaxValue(100);
-	_reverbWidthLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthLabel", "1");
+	_reverbWidthLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.WidthLabel", Common::U32String("1"));
 
 	_reverbLevelDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelText", _("Level:"));
 	_reverbLevelSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelSlider", Common::U32String(""), kReverbLevelChangedCmd);
 	// 0.00 - 1.00, Default: 0.90
 	_reverbLevelSlider->setMinValue(0);
 	_reverbLevelSlider->setMaxValue(100);
-	_reverbLevelLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelLabel", "90");
+	_reverbLevelLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Reverb.LevelLabel", Common::U32String("90"));
 
 	_tabWidget->addTab(_("Chorus"), "FluidSynthSettings_Chorus");
 
@@ -107,28 +107,28 @@ FluidSynthSettingsDialog::FluidSynthSettingsDialog()
 	// 0-99, Default: 3
 	_chorusVoiceCountSlider->setMinValue(0);
 	_chorusVoiceCountSlider->setMaxValue(99);
-	_chorusVoiceCountLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountLabel", "3");
+	_chorusVoiceCountLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.VoiceCountLabel", Common::U32String("3"));
 
 	_chorusLevelDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelText", _("Level:"));
 	_chorusLevelSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelSlider", Common::U32String(""), kChorusLevelChangedCmd);
 	// 0.00 - 1.00, Default: 1.00
 	_chorusLevelSlider->setMinValue(0);
 	_chorusLevelSlider->setMaxValue(100);
-	_chorusLevelLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelLabel", "100");
+	_chorusLevelLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.LevelLabel", Common::U32String("100"));
 
 	_chorusSpeedDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedText", _("Speed:"));
 	_chorusSpeedSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedSlider", Common::U32String(""), kChorusSpeedChangedCmd);
 	// 0.30 - 5.00, Default: 0.30
 	_chorusSpeedSlider->setMinValue(30);
 	_chorusSpeedSlider->setMaxValue(500);
-	_chorusSpeedLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedLabel", "30");
+	_chorusSpeedLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.SpeedLabel", Common::U32String("30"));
 
 	_chorusDepthDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthText", _("Depth:"));
 	_chorusDepthSlider = new SliderWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthSlider", Common::U32String(""), kChorusDepthChangedCmd);
 	// 0.00 - 21.00, Default: 8.00
 	_chorusDepthSlider->setMinValue(0);
 	_chorusDepthSlider->setMaxValue(210);
-	_chorusDepthLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthLabel", "80");
+	_chorusDepthLabel = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.DepthLabel", Common::U32String("80"));
 
 	_chorusWaveFormTypePopUpDesc = new StaticTextWidget(_tabWidget, "FluidSynthSettings_Chorus.WaveFormTypeText", _("Type:"));
 	_chorusWaveFormTypePopUp = new PopUpWidget(_tabWidget, "FluidSynthSettings_Chorus.WaveFormType");
diff --git a/gui/message.cpp b/gui/message.cpp
index 8981c71279..9c23120d3a 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -100,6 +100,12 @@ MessageDialog::MessageDialog(const Common::U32String &message, Common::U32String
 		new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, altButton, Common::U32String(""), kCancelCmd, Common::ASCII_ESCAPE);	// Cancel dialog
 }
 
+MessageDialog::MessageDialog(const char *message, const char *defaultButton, const char *altButton, Graphics::TextAlign alignment)
+	: Dialog(30, 20, 260, 124) {
+
+	MessageDialog::MessageDialog(Common::U32String(message), Common::U32String(defaultButton), Common::U32String(altButton), alignment);
+}
+
 void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 	// FIXME: It's a really bad thing that we use two arbitrary constants
 	if (cmd == kOkCmd) {
diff --git a/gui/message.h b/gui/message.h
index 49a11c90b6..89ccd8ff25 100644
--- a/gui/message.h
+++ b/gui/message.h
@@ -42,6 +42,7 @@ enum {
 class MessageDialog : public Dialog {
 public:
 	MessageDialog(const Common::U32String &message, Common::U32String defaultButton = Common::U32String("OK"), Common::U32String altButton = Common::U32String(""), Graphics::TextAlign alignment = Graphics::kTextAlignCenter, const char *url = nullptr);
+	MessageDialog(const char *message, const char *defaultButton = "OK", const char *altButton = "", Graphics::TextAlign alignment = Graphics::kTextAlignCenter, const char *url = nullptr);
 
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 48369033f0..2676b50590 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -591,11 +591,11 @@ void SaveLoadChooserSimple::updateSelection(bool redraw) {
 		if (_saveDateSupport) {
 			const Common::String &saveDate = desc.getSaveDate();
 			if (!saveDate.empty())
-				_date->setLabel(_("Date: ") + saveDate);
+				_date->setLabel(_("Date: ").encode() + saveDate);
 
 			const Common::String &saveTime = desc.getSaveTime();
 			if (!saveTime.empty())
-				_time->setLabel(_("Time: ") + saveTime);
+				_time->setLabel(_("Time: ").encode() + saveTime);
 		}
 
 		if (_playTimeSupport) {
@@ -1108,13 +1108,13 @@ void SaveLoadChooserGrid::updateSaves() {
 		tooltip += desc.getDescription();
 
 		if (_saveDateSupport) {
-			const Common::String &saveDate = desc.getSaveDate();
+			const Common::U32String &saveDate = desc.getSaveDate();
 			if (!saveDate.empty()) {
 				tooltip += Common::U32String("\n");
 				tooltip +=  _("Date: ") + saveDate;
 			}
 
-			const Common::String &saveTime = desc.getSaveTime();
+			const Common::U32String &saveTime = desc.getSaveTime();
 			if (!saveTime.empty()) {
 				tooltip += Common::U32String("\n");
 				tooltip += _("Time: ") + saveTime;


Commit: d4d5b8906eed8ddf5d49b311024918dd45191c9f
    https://github.com/scummvm/scummvm/commit/d4d5b8906eed8ddf5d49b311024918dd45191c9f
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Begin making TTS take in U32Strings for saying

Only for strings without an explicit action. The first level takes in a u32 string, encodes it, and passes it along further with the default action

- For gui widgets, the strings are passed in as native u32 strings.
- For everything else, they are being converted to u32 by Common::convertToU32... and then being passed along

Changed paths:
    backends/graphics/opengl/opengl-graphics.cpp
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    common/text-to-speech.cpp
    common/text-to-speech.h
    engines/glk/zcode/zcode.cpp
    engines/lure/surface.cpp
    engines/mads/dialogs.cpp
    engines/sherlock/scalpel/scalpel_user_interface.cpp
    engines/sherlock/talk.cpp
    engines/testbed/speech.cpp
    gui/widget.cpp
    gui/widget.h
    gui/widgets/popup.cpp
    gui/widgets/popup.h


diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 006006546a..cd5bcd0141 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -857,7 +857,7 @@ void OpenGLGraphicsManager::osdMessageUpdateSurface() {
 			ConfMan.getBool("tts_enabled", "scummvm")) {
 		Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 		if (ttsMan)
-			ttsMan->say(Common::convertFromU32String(_osdMessageNextData));
+			ttsMan->say(_osdMessageNextData);
 	}
 #endif // USE_TTS
 	// Clear the text update request
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 159c39912f..d3d44357ee 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2225,7 +2225,7 @@ void SurfaceSdlGraphicsManager::displayMessageOnOSD(const Common::U32String &msg
 	assert(_transactionMode == kTransactionNone);
 	assert(!msg.empty());
 #ifdef USE_TTS
-	Common::String textToSay = Common::convertFromU32String(msg);
+	Common::U32String textToSay = msg;
 #endif // USE_TTS
 
 	Common::StackLock lock(_graphicsMutex);	// Lock the mutex until this function ends
diff --git a/common/text-to-speech.cpp b/common/text-to-speech.cpp
index 8e4742b3e9..074ff7b819 100644
--- a/common/text-to-speech.cpp
+++ b/common/text-to-speech.cpp
@@ -31,12 +31,12 @@ TTSVoice::TTSVoice()
 	: _gender(UNKNOWN_GENDER)
 	, _age(UNKNOWN_AGE)
 	, _data(nullptr)
-	, _description("") {
+	, _description(Common::U32String("")) {
 	_refCount = new int;
 	*_refCount = 1;
 }
 
-TTSVoice::TTSVoice(Gender gender, Age age, void *data, String description)
+TTSVoice::TTSVoice(Gender gender, Age age, void *data, U32String description)
 	: _gender(gender)
 	, _age(age)
 	, _data(data)
diff --git a/common/text-to-speech.h b/common/text-to-speech.h
index d35553b4c5..a237ddb749 100644
--- a/common/text-to-speech.h
+++ b/common/text-to-speech.h
@@ -53,7 +53,7 @@ class TTSVoice {
 	public:
 		TTSVoice();
 
-		TTSVoice(Gender gender, Age age, void *data, String description) ;
+		TTSVoice(Gender gender, Age age, void *data, U32String description) ;
 
 		TTSVoice(const TTSVoice& voice);
 
@@ -111,13 +111,13 @@ class TTSVoice {
 		 * Returns the voice description. This description is really tts engine
 		 * specific and might be not be available with some tts engines.
 		 */
-		String getDescription() { return _description; };
+		U32String getDescription() { return _description; };
 
 	protected:
 		Gender _gender; ///< Gender of the voice
 		Age _age; ///< Age of the voice
 		void *_data; ///< Pointer to tts engine specific data about the voice
-		String _description; ///< Description of the voice (gets displayed in GUI)
+		U32String _description; ///< Description of the voice (gets displayed in GUI)
 		int *_refCount; ///< Reference count (serves for proper feeing of _data)
 };
 
@@ -158,7 +158,7 @@ public:
 	 * @param charset The encoding of the string. If empty this is assumed to be the
 	 *        encoding used for the GUI.
 	 */
-	bool say(String str, String charset = "") { return say(str, INTERRUPT_NO_REPEAT, charset); }
+	bool say(U32String str, String charset = "") { return say(str.encode(), INTERRUPT_NO_REPEAT, charset); }
 
 	/**
 	 * Says the given string
@@ -322,6 +322,6 @@ protected:
 
 } // End of namespace Common
 
-#endif
+#endif	// USE_TTS
 
 #endif // BACKENDS_TEXT_TO_SPEECH_ABSTRACT_H
diff --git a/engines/glk/zcode/zcode.cpp b/engines/glk/zcode/zcode.cpp
index 4cd1612dc0..818aec711f 100644
--- a/engines/glk/zcode/zcode.cpp
+++ b/engines/glk/zcode/zcode.cpp
@@ -123,7 +123,7 @@ Common::Error ZCode::loadGameState(int slot) {
 			|| h_screen_cols != old_screen_cols))
 			erase_window(1);
 	} else {
-		error("%s", _("Error reading save file"));
+		error("%s", _("Error reading save file").encode().c_str());
 	}
 
 	return Common::kNoError;
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index ad5d0e4d96..8ce1be5bf6 100644
--- a/engines/lure/surface.cpp
+++ b/engines/lure/surface.cpp
@@ -491,7 +491,7 @@ Surface *Surface::newDialog(uint16 width, uint8 numLines, const char **lines, bo
 		Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 		if (ttsMan != nullptr) {
 			ttsMan->stop();
-			ttsMan->say(text.c_str());
+			ttsMan->say(Common::convertToU32String(text.c_str()));
 		}
 	}
 #endif
diff --git a/engines/mads/dialogs.cpp b/engines/mads/dialogs.cpp
index cadb7ae0f0..4b97f623fa 100644
--- a/engines/mads/dialogs.cpp
+++ b/engines/mads/dialogs.cpp
@@ -352,7 +352,7 @@ void TextDialog::draw() {
 	// Draw the text lines
 	int lineYp = _position.y + 5;
 #ifdef USE_TTS
-	Common::String text;
+	Common::U32String text;
 #endif
 	for (int lineNum = 0; lineNum <= _numLines; ++lineNum) {
 		if (_lineXp[lineNum] == -1) {
@@ -393,7 +393,7 @@ void TextDialog::draw() {
 		Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 		if (ttsMan != nullptr) {
 			ttsMan->stop();
-			ttsMan->say(text.c_str());
+			ttsMan->say(text);
 		}
 	}
 #endif
diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp
index f819acf7f1..0a01dc0192 100644
--- a/engines/sherlock/scalpel/scalpel_user_interface.cpp
+++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp
@@ -2069,7 +2069,7 @@ void ScalpelUserInterface::printObjectDesc(const Common::String &str, bool first
 		Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 		if (ttsMan != nullptr) {
 			ttsMan->stop();
-			ttsMan->say(str.c_str());
+			ttsMan->say(Common::convertToU32String(str.c_str()));
 		}
 	}
 #endif
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index f92b7c142a..7c823b97a1 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -362,7 +362,7 @@ void Talk::talkTo(const Common::String filename) {
 				Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 				if (ttsMan != nullptr) {
 					ttsMan->stop();
-					ttsMan->say(_statements[select]._reply.c_str());
+					ttsMan->say(Common::convertToU32String(_statements[select]._reply.c_str()));
 				}
 			}
 #endif
diff --git a/engines/testbed/speech.cpp b/engines/testbed/speech.cpp
index 754f7cc263..1d9622abe6 100644
--- a/engines/testbed/speech.cpp
+++ b/engines/testbed/speech.cpp
@@ -59,7 +59,7 @@ TestExitStatus Speechtests::testMale() {
 		return kTestFailed;
 	}
 	ttsMan->setVoice(maleVoices[0]);
-	ttsMan->say("Testing text to speech with male voice.");
+	ttsMan->say(Common::convertToU32String("Testing text to speech with male voice."));
 	if (!ttsMan->isSpeaking()) {
 		Testsuite::logDetailedPrintf("Male TTS failed\n");
 		return kTestFailed;
@@ -96,7 +96,7 @@ TestExitStatus Speechtests::testFemale() {
 		return kTestFailed;
 	}
 	ttsMan->setVoice(femaleVoices[0]);
-	ttsMan->say("Testing text to speech with female voice.");
+	ttsMan->say(Common::convertToU32String("Testing text to speech with female voice."));
 	if (!ttsMan->isSpeaking()) {
 		Testsuite::logDetailedPrintf("Female TTS failed\n");
 		return kTestFailed;
@@ -128,7 +128,7 @@ TestExitStatus Speechtests::testStop() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say("Testing text to speech, the speech should stop after approximately a second after it started, so it shouldn't have the time to read this.");
+	ttsMan->say(Common::convertToU32String("Testing text to speech, the speech should stop after approximately a second after it started, so it shouldn't have the time to read this."));
 	g_system->delayMillis(1000);
 	ttsMan->stop();
 	// It is allright if the voice isn't available right away, but a second should be
@@ -201,7 +201,7 @@ TestExitStatus Speechtests::testPauseResume() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say("Testing text to speech, the speech should pause after a second");
+	ttsMan->say(Common::convertToU32String("Testing text to speech, the speech should pause after a second"));
 	g_system->delayMillis(1000);
 	ttsMan->pause();
 	if (!ttsMan->isPaused()) {
@@ -247,10 +247,10 @@ TestExitStatus Speechtests::testRate() {
 	}
 
 	ttsMan->setRate(-100);
-	ttsMan->say("Text to speech slow rate.");
+	ttsMan->say(Common::convertToU32String("Text to speech slow rate."));
 	waitForSpeechEnd(ttsMan);
 	ttsMan->setRate(100);
-	ttsMan->say("Text to speech fast rate.");
+	ttsMan->say(Common::convertToU32String("Text to speech fast rate."));
 	waitForSpeechEnd(ttsMan);
 
 	Common::String prompt = "Did you hear a voice saying: \"Text to speech slow rate.\" slowly and then \"Text to speech fast rate.\" fast?";
@@ -280,10 +280,10 @@ TestExitStatus Speechtests::testVolume() {
 	}
 
 	ttsMan->setVolume(20);
-	ttsMan->say("Text to speech low volume.");
+	ttsMan->say(Common::convertToU32String("Text to speech low volume."));
 	waitForSpeechEnd(ttsMan);
 	ttsMan->setVolume(100);
-	ttsMan->say("Text to speech max volume.");
+	ttsMan->say(Common::convertToU32String("Text to speech max volume."));
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice saying: \"Text to speech low volume.\" quietly and then \"Text to speech max volume.\" at a higher volume?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
@@ -312,10 +312,10 @@ TestExitStatus Speechtests::testPitch() {
 	}
 
 	ttsMan->setPitch(100);
-	ttsMan->say("Text to speech high pitch.");
+	ttsMan->say(Common::convertToU32String("Text to speech high pitch."));
 	waitForSpeechEnd(ttsMan);
 	ttsMan->setPitch(-100);
-	ttsMan->say("Text to speech low pitch.");
+	ttsMan->say(Common::convertToU32String("Text to speech low pitch."));
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a high pitched voice saying: \"Text to speech high pitch.\" and then a low pitched voice: \"Text to speech low pitch.\" ?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
@@ -343,7 +343,7 @@ TestExitStatus Speechtests::testStateStacking() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say("Voice number 1 is speaking");
+	ttsMan->say(Common::convertToU32String("Voice number 1 is speaking"));
 	waitForSpeechEnd(ttsMan);
 	ttsMan->pushState();
 	Common::Array<int> femaleVoices = ttsMan->getVoiceIndicesByGender(Common::TTSVoice::FEMALE);
@@ -355,20 +355,20 @@ TestExitStatus Speechtests::testStateStacking() {
 	ttsMan->setVolume(80);
 	ttsMan->setPitch(40);
 	ttsMan->setRate(-30);
-	ttsMan->say("Voice number 2 is speaking");
+	ttsMan->say(Common::convertToU32String("Voice number 2 is speaking"));
 	waitForSpeechEnd(ttsMan);
 	ttsMan->pushState();
 	ttsMan->setVoice(2 % allVoices.size());
 	ttsMan->setVolume(90);
 	ttsMan->setPitch(-80);
 	ttsMan->setRate(-50);
-	ttsMan->say("Voice number 3 is speaking");
+	ttsMan->say(Common::convertToU32String("Voice number 3 is speaking"));
 	waitForSpeechEnd(ttsMan);
 	ttsMan->popState();
-	ttsMan->say("Voice number 2 is speaking");
+	ttsMan->say(Common::convertToU32String("Voice number 2 is speaking"));
 	waitForSpeechEnd(ttsMan);
 	ttsMan->popState();
-	ttsMan->say("Voice number 1 is speaking");
+	ttsMan->say(Common::convertToU32String("Voice number 1 is speaking"));
 	waitForSpeechEnd(ttsMan);
 
 	Common::String prompt = "Did you hear three different voices speaking in this order: 1, 2, 3, 2, 1 and each time the same voice spoke, it sounded the same?";
@@ -397,7 +397,7 @@ TestExitStatus Speechtests::testQueueing() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say("This is first speech.");
+	ttsMan->say(Common::convertToU32String("This is first speech."));
 	ttsMan->say("This is second speech.", Common::TextToSpeechManager::QUEUE);
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice saying: \"This is first speech. This is second speech\" ?";
@@ -426,7 +426,7 @@ TestExitStatus Speechtests::testInterrupting() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say("A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z");
+	ttsMan->say(Common::convertToU32String("A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z"));
 	g_system->delayMillis(1000);
 	ttsMan->say("Speech interrupted", Common::TextToSpeechManager::INTERRUPT);
 	waitForSpeechEnd(ttsMan);
@@ -456,7 +456,7 @@ TestExitStatus Speechtests::testDroping() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say("Today is a really nice weather, perfect day to use ScummVM, don't you think?");
+	ttsMan->say(Common::convertToU32String("Today is a really nice weather, perfect day to use ScummVM, don't you think?"));
 	ttsMan->say("Speech interrupted, fail", Common::TextToSpeechManager::DROP);
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice say: \"Today is a really nice weather, perfect day to use ScummVM, don't you think?\" and nothing else?";
@@ -485,7 +485,7 @@ TestExitStatus Speechtests::testInterruptNoRepeat() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say("This is the first sentence, this should get interrupted");
+	ttsMan->say(Common::convertToU32String("This is the first sentence, this should get interrupted"));
 	ttsMan->say("Failure", Common::TextToSpeechManager::QUEUE);
 	g_system->delayMillis(1000);
 	ttsMan->say("This is the second sentence, it should play only once", Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
@@ -522,7 +522,7 @@ TestExitStatus Speechtests::testQueueNoRepeat() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say("This is the first sentence.");
+	ttsMan->say(Common::convertToU32String("This is the first sentence."));
 	ttsMan->say("This is the first sentence.", Common::TextToSpeechManager::QUEUE_NO_REPEAT);
 	g_system->delayMillis(1000);
 	ttsMan->say("This is the first sentence.", Common::TextToSpeechManager::QUEUE_NO_REPEAT);
diff --git a/gui/widget.cpp b/gui/widget.cpp
index f909223d2d..2a56861543 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -277,7 +277,7 @@ Common::U32String Widget::cleanupHotkey(const Common::U32String &label) {
 	return Common::U32String(res);
 }
 
-void Widget::read(Common::String str) {
+void Widget::read(Common::U32String str) {
 #ifdef USE_TTS
 	if (ConfMan.hasKey("tts_enabled", "scummvm") &&
 			ConfMan.getBool("tts_enabled", "scummvm")) {
diff --git a/gui/widget.h b/gui/widget.h
index 3709b4a133..c7e805d70f 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -175,7 +175,7 @@ public:
 
 	virtual bool containsWidget(Widget *) const { return false; }
 
-	void read(Common::String str);
+	void read(Common::U32String str);
 
 protected:
 	void updateState(int oldFlags, int newFlags);
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index b96236e874..374d862c27 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -199,7 +199,7 @@ void PopUpDialog::handleMouseLeft(int button) {
 	_lastRead = -1;
 }
 
-void PopUpDialog::read(Common::String str) {
+void PopUpDialog::read(Common::U32String str) {
 #ifdef USE_TTS
 	if (ConfMan.hasKey("tts_enabled", "scummvm") &&
 			ConfMan.getBool("tts_enabled", "scummvm")) {
diff --git a/gui/widgets/popup.h b/gui/widgets/popup.h
index b5e317549c..2dec77793e 100644
--- a/gui/widgets/popup.h
+++ b/gui/widgets/popup.h
@@ -140,7 +140,7 @@ protected:
 
 	void moveUp();
 	void moveDown();
-	void read(Common::String);
+	void read(Common::U32String);
 };
 
 } // End of namespace GUI


Commit: ef7ec444d31c140b4746215dcc5f86be6d47f0b3
    https://github.com/scummvm/scummvm/commit/ef7ec444d31c140b4746215dcc5f86be6d47f0b3
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Enable u32 for tts (Windows)

They always take in U32 strings now.

- Revert tts descriptions to string, they don't use translations, so better to keep it as strings.
- Make read() take in const U32 references.

Changed paths:
    backends/text-to-speech/windows/windows-text-to-speech.cpp
    backends/text-to-speech/windows/windows-text-to-speech.h
    common/text-to-speech.cpp
    common/text-to-speech.h
    engines/testbed/speech.cpp
    gui/Tooltip.cpp
    gui/widget.cpp
    gui/widget.h
    gui/widgets/list.cpp
    gui/widgets/popup.cpp
    gui/widgets/popup.h
    gui/widgets/tab.cpp


diff --git a/backends/text-to-speech/windows/windows-text-to-speech.cpp b/backends/text-to-speech/windows/windows-text-to-speech.cpp
index 09e4239487..d52014b3db 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.cpp
+++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp
@@ -174,7 +174,7 @@ DWORD WINAPI startSpeech(LPVOID parameters) {
 	return 0;
 }
 
-bool WindowsTextToSpeechManager::say(Common::String str, Action action, Common::String charset) {
+bool WindowsTextToSpeechManager::say(const Common::U32String &str, Action action, Common::String charset) {
 	if (_speechState == BROKEN || _speechState == NO_VOICE) {
 		warning("The text to speech cannot speak in this state");
 		return true;
@@ -191,10 +191,12 @@ bool WindowsTextToSpeechManager::say(Common::String str, Action action, Common::
 #endif
 	}
 
+	Common::String strToSpeak = str.encode();
+
 	// We have to set the pitch by prepending xml code at the start of the said string;
 	Common::String pitch = Common::String::format("<pitch absmiddle=\"%d\">", _ttsState->_pitch / 10);
-	str.replace((uint32)0, 0, pitch);
-	WCHAR *strW = (WCHAR *) Common::Encoding::convert("UTF-16", charset, str.c_str(), str.size());
+	strToSpeak.replace((uint32)0, 0, pitch);
+	WCHAR *strW = (WCHAR *) Common::Encoding::convert("UTF-16", charset, strToSpeak.c_str(), strToSpeak.size());
 	if (strW == nullptr) {
 		warning("Cannot convert from %s encoding for text to speech", charset.c_str());
 		return true;
diff --git a/backends/text-to-speech/windows/windows-text-to-speech.h b/backends/text-to-speech/windows/windows-text-to-speech.h
index 7f52549a5f..ac0906117a 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.h
+++ b/backends/text-to-speech/windows/windows-text-to-speech.h
@@ -29,6 +29,7 @@
 
 #include "common/text-to-speech.h"
 #include "common/str.h"
+#include "common/ustr.h"
 #include "common/list.h"
 
 
@@ -51,7 +52,7 @@ public:
 	WindowsTextToSpeechManager();
 	virtual ~WindowsTextToSpeechManager() override;
 
-	virtual bool say(Common::String str, Action action, Common::String charset = "") override;
+	virtual bool say(const Common::U32String &str, Action action, Common::String charset = "") override;
 
 	virtual bool stop() override;
 	virtual bool pause() override;
diff --git a/common/text-to-speech.cpp b/common/text-to-speech.cpp
index 074ff7b819..8e4742b3e9 100644
--- a/common/text-to-speech.cpp
+++ b/common/text-to-speech.cpp
@@ -31,12 +31,12 @@ TTSVoice::TTSVoice()
 	: _gender(UNKNOWN_GENDER)
 	, _age(UNKNOWN_AGE)
 	, _data(nullptr)
-	, _description(Common::U32String("")) {
+	, _description("") {
 	_refCount = new int;
 	*_refCount = 1;
 }
 
-TTSVoice::TTSVoice(Gender gender, Age age, void *data, U32String description)
+TTSVoice::TTSVoice(Gender gender, Age age, void *data, String description)
 	: _gender(gender)
 	, _age(age)
 	, _data(data)
diff --git a/common/text-to-speech.h b/common/text-to-speech.h
index a237ddb749..62aa953bf7 100644
--- a/common/text-to-speech.h
+++ b/common/text-to-speech.h
@@ -53,7 +53,7 @@ class TTSVoice {
 	public:
 		TTSVoice();
 
-		TTSVoice(Gender gender, Age age, void *data, U32String description) ;
+		TTSVoice(Gender gender, Age age, void *data, String description) ;
 
 		TTSVoice(const TTSVoice& voice);
 
@@ -111,13 +111,13 @@ class TTSVoice {
 		 * Returns the voice description. This description is really tts engine
 		 * specific and might be not be available with some tts engines.
 		 */
-		U32String getDescription() { return _description; };
+		String getDescription() { return _description; };
 
 	protected:
 		Gender _gender; ///< Gender of the voice
 		Age _age; ///< Age of the voice
 		void *_data; ///< Pointer to tts engine specific data about the voice
-		U32String _description; ///< Description of the voice (gets displayed in GUI)
+		String _description; ///< Description of the voice (gets displayed in GUI)
 		int *_refCount; ///< Reference count (serves for proper feeing of _data)
 };
 
@@ -158,7 +158,7 @@ public:
 	 * @param charset The encoding of the string. If empty this is assumed to be the
 	 *        encoding used for the GUI.
 	 */
-	bool say(U32String str, String charset = "") { return say(str.encode(), INTERRUPT_NO_REPEAT, charset); }
+	bool say(const U32String &str, String charset = "") { return say(str, INTERRUPT_NO_REPEAT, charset); }
 
 	/**
 	 * Says the given string
@@ -178,7 +178,7 @@ public:
 	 * @param charset The encoding of the string. If empty this is assumed to be the
 	 *        encoding used for the GUI.
 	 */
-	virtual bool say(String str, Action action, String charset = "") { return false; }
+	virtual bool say(const U32String &str, Action action, String charset = "") { return false; }
 
 	/**
 	 * Stops the speech
diff --git a/engines/testbed/speech.cpp b/engines/testbed/speech.cpp
index 1d9622abe6..056207efc6 100644
--- a/engines/testbed/speech.cpp
+++ b/engines/testbed/speech.cpp
@@ -208,7 +208,7 @@ TestExitStatus Speechtests::testPauseResume() {
 		Testsuite::logDetailedPrintf("TTS pause failed\n");
 		return kTestFailed;
 	}
-	ttsMan->say("and then resume again", Common::TextToSpeechManager::QUEUE);
+	ttsMan->say(Common::convertToU32String("and then resume again"), Common::TextToSpeechManager::QUEUE);
 	g_system->delayMillis(3000);
 	if (!ttsMan->isPaused()) {
 		Testsuite::logDetailedPrintf("TTS pause failed\n");
@@ -398,7 +398,7 @@ TestExitStatus Speechtests::testQueueing() {
 	}
 
 	ttsMan->say(Common::convertToU32String("This is first speech."));
-	ttsMan->say("This is second speech.", Common::TextToSpeechManager::QUEUE);
+	ttsMan->say(Common::convertToU32String("This is second speech."), Common::TextToSpeechManager::QUEUE);
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice saying: \"This is first speech. This is second speech\" ?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
@@ -428,7 +428,7 @@ TestExitStatus Speechtests::testInterrupting() {
 
 	ttsMan->say(Common::convertToU32String("A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z"));
 	g_system->delayMillis(1000);
-	ttsMan->say("Speech interrupted", Common::TextToSpeechManager::INTERRUPT);
+	ttsMan->say(Common::convertToU32String("Speech interrupted"), Common::TextToSpeechManager::INTERRUPT);
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice saying the engilsh alphabet, but it got interrupted and said: \"Speech interrupted\" instead?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
@@ -457,7 +457,7 @@ TestExitStatus Speechtests::testDroping() {
 	}
 
 	ttsMan->say(Common::convertToU32String("Today is a really nice weather, perfect day to use ScummVM, don't you think?"));
-	ttsMan->say("Speech interrupted, fail", Common::TextToSpeechManager::DROP);
+	ttsMan->say(Common::convertToU32String("Speech interrupted, fail"), Common::TextToSpeechManager::DROP);
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice say: \"Today is a really nice weather, perfect day to use ScummVM, don't you think?\" and nothing else?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
@@ -486,15 +486,15 @@ TestExitStatus Speechtests::testInterruptNoRepeat() {
 	}
 
 	ttsMan->say(Common::convertToU32String("This is the first sentence, this should get interrupted"));
-	ttsMan->say("Failure", Common::TextToSpeechManager::QUEUE);
+	ttsMan->say(Common::convertToU32String("Failure"), Common::TextToSpeechManager::QUEUE);
 	g_system->delayMillis(1000);
-	ttsMan->say("This is the second sentence, it should play only once", Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
-	ttsMan->say("Failure", Common::TextToSpeechManager::QUEUE);
+	ttsMan->say(Common::convertToU32String("This is the second sentence, it should play only once"), Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
+	ttsMan->say(Common::convertToU32String("Failure"), Common::TextToSpeechManager::QUEUE);
 	g_system->delayMillis(1000);
-	ttsMan->say("This is the second sentence, it should play only once", Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
-	ttsMan->say("Failure", Common::TextToSpeechManager::QUEUE);
+	ttsMan->say(Common::convertToU32String("This is the second sentence, it should play only once"), Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
+	ttsMan->say(Common::convertToU32String("Failure"), Common::TextToSpeechManager::QUEUE);
 	g_system->delayMillis(1000);
-	ttsMan->say("This is the second sentence, it should play only once", Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
+	ttsMan->say(Common::convertToU32String("This is the second sentence, it should play only once"), Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice say: \"This is the first sentence, this should get interrupted\", but it got interrupted and \"This is the second sentence, it should play only once.\" got said instead?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
@@ -523,13 +523,13 @@ TestExitStatus Speechtests::testQueueNoRepeat() {
 	}
 
 	ttsMan->say(Common::convertToU32String("This is the first sentence."));
-	ttsMan->say("This is the first sentence.", Common::TextToSpeechManager::QUEUE_NO_REPEAT);
+	ttsMan->say(Common::convertToU32String("This is the first sentence."), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
 	g_system->delayMillis(1000);
-	ttsMan->say("This is the first sentence.", Common::TextToSpeechManager::QUEUE_NO_REPEAT);
-	ttsMan->say("This is the second sentence.", Common::TextToSpeechManager::QUEUE_NO_REPEAT);
-	ttsMan->say("This is the second sentence.", Common::TextToSpeechManager::QUEUE_NO_REPEAT);
+	ttsMan->say(Common::convertToU32String("This is the first sentence."), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
+	ttsMan->say(Common::convertToU32String("This is the second sentence."), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
+	ttsMan->say(Common::convertToU32String("This is the second sentence."), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
 	g_system->delayMillis(1000);
-	ttsMan->say("This is the second sentence.", Common::TextToSpeechManager::QUEUE_NO_REPEAT);
+	ttsMan->say(Common::convertToU32String("This is the second sentence."), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice say: \"This is the first sentence. This the second sentence\" and nothing else?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
diff --git a/gui/Tooltip.cpp b/gui/Tooltip.cpp
index 4e32b175df..9c8a894642 100644
--- a/gui/Tooltip.cpp
+++ b/gui/Tooltip.cpp
@@ -64,7 +64,7 @@ void Tooltip::setup(Dialog *parent, Widget *widget, int x, int y) {
 		Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 		if (ttsMan == nullptr)
 			return;
-		ttsMan->say(Common::convertFromU32String(widget->getTooltip()), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
+		ttsMan->say(widget->getTooltip(), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
 	}
 #endif
 }
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 2a56861543..9499676ba9 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -277,7 +277,7 @@ Common::U32String Widget::cleanupHotkey(const Common::U32String &label) {
 	return Common::U32String(res);
 }
 
-void Widget::read(Common::U32String str) {
+void Widget::read(const Common::U32String &str) {
 #ifdef USE_TTS
 	if (ConfMan.hasKey("tts_enabled", "scummvm") &&
 			ConfMan.getBool("tts_enabled", "scummvm")) {
diff --git a/gui/widget.h b/gui/widget.h
index c7e805d70f..66e313cf50 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -175,7 +175,7 @@ public:
 
 	virtual bool containsWidget(Widget *) const { return false; }
 
-	void read(Common::U32String str);
+	void read(const Common::U32String &str);
 
 protected:
 	void updateState(int oldFlags, int newFlags);
@@ -208,7 +208,7 @@ public:
 	const Common::U32String &getLabel() const		{ return _label; }
 	void setAlign(Graphics::TextAlign align);
 	Graphics::TextAlign getAlign() const		{ return _align; }
-	void readLabel() { read(Common::convertFromU32String(_label)); }
+	void readLabel() { read(_label); }
 
 protected:
 	void drawWidget() override;
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index da7e8f1bf4..c0b1d1c4d5 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -287,7 +287,7 @@ void ListWidget::handleMouseMoved(int x, int y, int button) {
 
 	if (item != -1) {
 		if(_lastRead != item) {
-			read(Common::convertFromU32String(_dataList[item]));
+			read(_dataList[item]);
 			_lastRead = item;
 		}
 	}
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index 374d862c27..fa30fb73ea 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -190,7 +190,7 @@ void PopUpDialog::handleMouseMoved(int x, int y, int button) {
 	// ...and update the selection accordingly
 	setSelection(item);
 	if (_lastRead != item && _entries.size() > 0 && item != -1) {
-		read(Common::convertFromU32String(_entries[item]));
+		read(_entries[item]);
 		_lastRead = item;
 	}
 }
@@ -199,7 +199,7 @@ void PopUpDialog::handleMouseLeft(int button) {
 	_lastRead = -1;
 }
 
-void PopUpDialog::read(Common::U32String str) {
+void PopUpDialog::read(const Common::U32String &str) {
 #ifdef USE_TTS
 	if (ConfMan.hasKey("tts_enabled", "scummvm") &&
 			ConfMan.getBool("tts_enabled", "scummvm")) {
diff --git a/gui/widgets/popup.h b/gui/widgets/popup.h
index 2dec77793e..732593b93e 100644
--- a/gui/widgets/popup.h
+++ b/gui/widgets/popup.h
@@ -78,7 +78,7 @@ public:
 	uint32 getSelectedTag() const				{ return (_selectedItem >= 0) ? _entries[_selectedItem].tag : (uint32)-1; }
 //	const String& getSelectedString() const		{ return (_selectedItem >= 0) ? _entries[_selectedItem].name : String::emptyString; }
 
-	void handleMouseEntered(int button) override	{ if (_selectedItem != -1) read(Common::convertFromU32String(_entries[_selectedItem].name)); setFlags(WIDGET_HILITED); markAsDirty(); }
+	void handleMouseEntered(int button) override	{ if (_selectedItem != -1) read(_entries[_selectedItem].name); setFlags(WIDGET_HILITED); markAsDirty(); }
 	void handleMouseLeft(int button) override	{ clearFlags(WIDGET_HILITED); markAsDirty(); }
 
 	void reflowLayout() override;
@@ -140,7 +140,7 @@ protected:
 
 	void moveUp();
 	void moveDown();
-	void read(Common::U32String);
+	void read(const Common::U32String &str);
 };
 
 } // End of namespace GUI
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp
index 645e7110c7..b9ea2f960f 100644
--- a/gui/widgets/tab.cpp
+++ b/gui/widgets/tab.cpp
@@ -260,7 +260,7 @@ void TabWidget::handleMouseMoved(int x, int y, int button) {
 
 	if (tabID <= _lastVisibleTab) {
 		if (tabID != _lastRead) {
-			read(Common::convertFromU32String(_tabs[tabID].title));
+			read(_tabs[tabID].title);
 			_lastRead = tabID;
 		}
 	}


Commit: bcbe2fe2ea5bdaeae78a4ae401e1c02851268d1a
    https://github.com/scummvm/scummvm/commit/bcbe2fe2ea5bdaeae78a4ae401e1c02851268d1a
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Enable u32 for tts (Linux)

Changed paths:
    backends/text-to-speech/linux/linux-text-to-speech.cpp
    backends/text-to-speech/linux/linux-text-to-speech.h


diff --git a/backends/text-to-speech/linux/linux-text-to-speech.cpp b/backends/text-to-speech/linux/linux-text-to-speech.cpp
index 9d8ed8fd2c..b2215f1754 100644
--- a/backends/text-to-speech/linux/linux-text-to-speech.cpp
+++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp
@@ -177,7 +177,7 @@ void SpeechDispatcherManager::updateState(SpeechDispatcherManager::SpeechEvent e
 	}
 }
 
-bool SpeechDispatcherManager::say(Common::String str, Action action, Common::String charset) {
+bool SpeechDispatcherManager::say(const Common::U32String &str, Action action, Common::String charset) {
 
 	pthread_mutex_lock(&_speechMutex);
 	// reinitialize if needed
@@ -202,7 +202,9 @@ bool SpeechDispatcherManager::say(Common::String str, Action action, Common::Str
 #endif
 	}
 
-	char *tmpStr = Common::Encoding::convert("UTF-8", charset, str.c_str(), str.size());
+	Common::String strToSpeak = str.encode();
+
+	char *tmpStr = Common::Encoding::convert("UTF-8", charset, strToSpeak.c_str(), strToSpeak.size());
 	if (tmpStr == nullptr) {
 		warning("Cannot convert from %s encoding for text to speech", charset.c_str());
 		pthread_mutex_unlock(&_speechMutex);
diff --git a/backends/text-to-speech/linux/linux-text-to-speech.h b/backends/text-to-speech/linux/linux-text-to-speech.h
index 0e0c8d2f4d..77b790509d 100644
--- a/backends/text-to-speech/linux/linux-text-to-speech.h
+++ b/backends/text-to-speech/linux/linux-text-to-speech.h
@@ -29,6 +29,7 @@
 
 #include "common/text-to-speech.h"
 #include "common/str.h"
+#include "common/ustr.h"
 #include "common/list.h"
 #include "common/mutex.h"
 
@@ -59,7 +60,7 @@ public:
 	SpeechDispatcherManager();
 	virtual ~SpeechDispatcherManager() override;
 
-	virtual bool say(Common::String str, Action action, Common::String charset = "") override;
+	virtual bool say(const Common::U32String &str, Action action, Common::String charset = "") override;
 
 	virtual bool stop() override;
 	virtual bool pause() override;


Commit: 0118839c59198ea58e4ae37bd0a87209cc6b4eb8
    https://github.com/scummvm/scummvm/commit/0118839c59198ea58e4ae37bd0a87209cc6b4eb8
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use u32 for tts (MacOS)

Changed paths:
    backends/text-to-speech/macosx/macosx-text-to-speech.h
    backends/text-to-speech/macosx/macosx-text-to-speech.mm


diff --git a/backends/text-to-speech/macosx/macosx-text-to-speech.h b/backends/text-to-speech/macosx/macosx-text-to-speech.h
index 19679d3f86..b3e96c228b 100644
--- a/backends/text-to-speech/macosx/macosx-text-to-speech.h
+++ b/backends/text-to-speech/macosx/macosx-text-to-speech.h
@@ -29,13 +29,14 @@
 
 #include "common/text-to-speech.h"
 #include "common/queue.h"
+#include "common/ustr.h"
 
 class MacOSXTextToSpeechManager : public Common::TextToSpeechManager {
 public:
 	MacOSXTextToSpeechManager();
 	virtual ~MacOSXTextToSpeechManager() override;
 
-	virtual bool say(Common::String str, Action action, Common::String charset = "") override;
+	virtual bool say(const Common::U32String &str, Action action, Common::String charset = "") override;
 
 	virtual bool stop() override;
 	virtual bool pause() override;
@@ -67,7 +68,7 @@ private:
 	struct SpeechText {
 		Common::String text;
 		Common::String encoding;
-		SpeechText(const Common::String& txt, const Common::String& enc) : text(txt), encoding(enc) {}
+		SpeechText(const Common::String &txt, const Common::String &enc) : text(txt), encoding(enc) {}
 	};
 	Common::Queue<SpeechText> _messageQueue;
 	Common::String _currentSpeech;
diff --git a/backends/text-to-speech/macosx/macosx-text-to-speech.mm b/backends/text-to-speech/macosx/macosx-text-to-speech.mm
index 3f19653408..ddf4a4fab7 100644
--- a/backends/text-to-speech/macosx/macosx-text-to-speech.mm
+++ b/backends/text-to-speech/macosx/macosx-text-to-speech.mm
@@ -81,7 +81,8 @@ MacOSXTextToSpeechManager::~MacOSXTextToSpeechManager() {
 	[synthesizerDelegate release];
 }
 
-bool MacOSXTextToSpeechManager::say(Common::String text, Action action, Common::String encoding) {
+bool MacOSXTextToSpeechManager::say(const Common::U32String &text, Action action, Common::String encoding) {
+	Common::String strToSpeak = text.encode();
 	if (isSpeaking()) {
 		// Interruptions are done on word boundaries for nice transitions.
 		// Should we interrupt immediately?
@@ -94,14 +95,14 @@ bool MacOSXTextToSpeechManager::say(Common::String text, Action action, Common::
 			// If the new speech is the one being currently said, continue that speech but clear the queue.
 			// And otherwise both clear the queue and interrupt the current speech.
 			_messageQueue.clear();
-			if (_currentSpeech == text)
+			if (_currentSpeech == strToSpeak)
 				return true;
 			[synthesizer stopSpeakingAtBoundary:NSSpeechWordBoundary];
 		} else if (action == QUEUE_NO_REPEAT) {
 			if (!_messageQueue.empty()) {
-				if (_messageQueue.back().text == text)
+				if (_messageQueue.back().text == strToSpeak)
 					return true;
-			} else if (_currentSpeech == text)
+			} else if (_currentSpeech == strToSpeak)
 				return true;
 		}
 	}
@@ -112,7 +113,7 @@ bool MacOSXTextToSpeechManager::say(Common::String text, Action action, Common::
 #endif
 	}
 
-	_messageQueue.push(SpeechText(text, encoding));
+	_messageQueue.push(SpeechText(strToSpeak, encoding));
 	if (!isSpeaking())
 		startNextSpeech();
 	return true;


Commit: 1ca1712b4dd922dfc683e161c8ea67e2c1bbb48e
    https://github.com/scummvm/scummvm/commit/1ca1712b4dd922dfc683e161c8ea67e2c1bbb48e
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Fix problems with u32strings formatting

- Improve U32's format helper
- Add insertString helper to u32

Changed paths:
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    common/ustr.cpp
    common/ustr.h
    gui/about.cpp
    gui/about.h


diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index d3d44357ee..ae7e427840 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2464,9 +2464,8 @@ void SurfaceSdlGraphicsManager::handleScalerHotkeys(int scalefactor, int scalerT
 			g++;
 		}
 		if (newScalerName) {
-			const Common::U32String message = Common::String::format(
-				"%s %s\n%d x %d -> %d x %d",
-				_("Active graphics filter:").encode().c_str(),
+			const Common::U32String message = Common::U32String::format(
+				_("Active graphics filter: ") + Common::U32String("%s\n%d x %d -> %d x %d"),
 				newScalerName,
 				_videoMode.screenWidth, _videoMode.screenHeight,
 				_hwScreen->w, _hwScreen->h);
diff --git a/common/ustr.cpp b/common/ustr.cpp
index 17cb4d5738..965225fb92 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -238,6 +238,12 @@ void U32String::insertChar(value_type c, uint32 p) {
 	_str[p] = c;
 }
 
+void U32String::insertString(String s, uint32 p) {
+	for (String::iterator i = s.begin(); i != s.end(); i++) {
+		U32String::insertChar(*i, p++);
+	}
+}
+
 void U32String::deleteChar(uint32 p) {
 	assert(p < _size);
 
@@ -520,68 +526,65 @@ void U32String::trim() {
 	}
 }
 
-// static
-U32String U32String::format(const char *fmt, ...) {
-	U32String output;
+U32String U32String::format(U32String fmt, ...) {
+	U32String output = fmt;
+	int len;
 
 	va_list va;
 	va_start(va, fmt);
-	output = U32String::vformat(fmt, va);
+	len = U32String::vformat(output, output.begin(), va);
 	va_end(va);
 
 	return output;
 }
 
-// static
-U32String U32String::vformat(const char *fmt, va_list args) {
-	U32String output = "";
-	assert(output.isStorageIntern());
-	output._str;
-	va_list va;
-	scumm_va_copy(va, args);
-	int len = vsnprintf((char *)output._str, _builtinCapacity, fmt, va);
-	va_end(va);
-
-	if (len == -1 || len == _builtinCapacity - 1) {
-		// MSVC and IRIX don't return the size the full string would take up.
-		// MSVC returns -1, IRIX returns the number of characters actually written,
-		// which is at the most the size of the buffer minus one, as the string is
-		// truncated to fit.
-
-		// We assume MSVC failed to output the correct, null-terminated string
-		// if the return value is either -1 or size.
-		// For IRIX, because we lack a better mechanism, we assume failure
-		// if the return value equals size - 1.
-		// The downside to this is that whenever we try to format a string where the
-		// size is 1 below the built-in capacity, the size is needlessly increased.
-
-		// Try increasing the size of the string until it fits.
-		int size = _builtinCapacity;
-		do {
-			size *= 2;
-			output.ensureCapacity(size - 1, false);
-			assert(!output.isStorageIntern());
-			size = output._extern._capacity;
-
-			scumm_va_copy(va, args);
-			len = vsnprintf((char *)output._str, size, fmt, va);
-			va_end(va);
-		} while (len == -1 || len >= size - 1);
-		output._size = len;
-	} else if (len < (int)_builtinCapacity) {
-		// vsnprintf succeeded
-		output._size = len;
-	} else {
-		// vsnprintf didn't have enough space, so grow buffer
-		output.ensureCapacity(len, false);
-		scumm_va_copy(va, args);
-		int len2 = vsnprintf((char *)output._str, len + 1, fmt, va);
-		va_end(va);
-		assert(len == len2);
-		output._size = len2;
+int U32String::vformat(U32String &output, U32String::iterator fmt, va_list args) {
+	int int_temp;
+	char char_temp;
+	char *string_temp;
+
+	char ch;
+	int length = 0;
+	int len = 0;
+	int pos = 0;
+
+	char buffer[512];
+
+	while (fmt != output.end() && pos < output.size()) {
+		ch = *fmt++;
+		if (ch == '%') {
+			switch (ch = *fmt++)
+			{
+			case 's':
+				string_temp = va_arg(args, char *);
+				len = strlen(string_temp);
+				length += len;
+				fmt -= 2;
+				output.deleteChar(pos); // remove %
+				output.deleteChar(pos); // remove s
+				output.insertString(string_temp, pos);
+				fmt += len;
+				pos += len;
+				break;
+			case 'd':
+				int_temp = va_arg(args, int);
+				fmt -= 2;
+				output.deleteChar(pos); // remove %
+				output.deleteChar(pos); // remove d
+				itoa(int_temp, buffer, 10);
+				output.insertString(buffer, pos);
+				len = strlen(buffer);
+				length += len;
+				fmt += len;
+				break;
+			default:
+				break;
+			}
+		}
+		pos++;
 	}
 
-	return output;
+	return length;
 }
 
 } // End of namespace Common
diff --git a/common/ustr.h b/common/ustr.h
index 7aaa3a1510..35489925ed 100644
--- a/common/ustr.h
+++ b/common/ustr.h
@@ -167,6 +167,7 @@ public:
 
 	/** Insert character c before position p. */
 	void insertChar(value_type c, uint32 p);
+	void insertString(String s, uint32 p);
 
 	/**
 	 * Removes the value at position p from the string.
@@ -240,14 +241,14 @@ public:
 	 * except that it stores the result in (variably sized) String
 	 * instead of a fixed size buffer.
 	 */
-	static U32String format(const char *fmt, ...) GCC_PRINTF(1, 2);
+	static U32String format(U32String fmt, ...) GCC_PRINTF(1, 2);
 
 	/**
 	 * Print formatted data into a String object. Similar to vsprintf,
 	 * except that it stores the result in (variably sized) String
 	 * instead of a fixed size buffer.
 	 */
-	static U32String vformat(const char *fmt, va_list args);
+	static int vformat(U32String &output, U32String::iterator fmt, va_list args);
 
 private:
 	void makeUnique();
diff --git a/gui/about.cpp b/gui/about.cpp
index 4238607fdc..c9eb5ac8bc 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -99,8 +99,8 @@ AboutDialog::AboutDialog()
 	version += gScummVMVersion;
 	_lines.push_back(version);
 
-	Common::U32String date = Common::String::format(_("(built on %s)").encode().c_str(), gScummVMBuildDate);
-	_lines.push_back(U32String("C2") + date);
+	 Common::U32String date = Common::U32String::format(_("(built on %s)"), gScummVMBuildDate);
+	 _lines.push_back(U32String("C2") + date);
 
 	for (i = 0; i < ARRAYSIZE(copyright_text); i++)
 		addLine(U32String(copyright_text[i]));
diff --git a/gui/about.h b/gui/about.h
index 5d952c38e3..597ef07dc2 100644
--- a/gui/about.h
+++ b/gui/about.h
@@ -25,6 +25,7 @@
 
 #include "gui/dialog.h"
 #include "common/str.h"
+#include "common/ustr.h"
 #include "common/array.h"
 #include "common/keyboard.h"
 
@@ -33,6 +34,7 @@ namespace GUI {
 class EEHandler;
 
 class AboutDialog : public Dialog {
+	typedef Common::String String;
 	typedef Common::U32String U32String;
 	typedef Common::Array<Common::U32String> U32StringArray;
 protected:


Commit: e22b32abfeda3693580b00336fdad4927292c75d
    https://github.com/scummvm/scummvm/commit/e22b32abfeda3693580b00336fdad4927292c75d
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use Common::U32String::format where necessary and GUIError to u32

- Where necessary as in, where translated messages are used.
- GUIErrorMessage now takes in U32String
- error messages across some engines use U32Strings. they are changed because they show a message dialog.

Changed paths:
    audio/mididrv.cpp
    backends/graphics/openglsdl/openglsdl-graphics.cpp
    backends/networking/sdl_net/handlers/filespagehandler.cpp
    engines/access/access.cpp
    engines/access/resources.cpp
    engines/access/resources.h
    engines/agos/animation.cpp
    engines/agos/saveload.cpp
    engines/dialogs.cpp
    engines/dragons/dragons.cpp
    engines/drascula/drascula.cpp
    engines/engine.cpp
    engines/engine.h
    engines/glk/alan2/alan2.cpp
    engines/glk/alan3/alan3.cpp
    engines/glk/hugo/herun.cpp
    engines/glk/hugo/hugo.cpp
    engines/hugo/hugo.cpp
    engines/kyra/gui/saveload_eob.cpp
    engines/mutationofjb/util.cpp
    engines/parallaction/saveload.cpp
    engines/pegasus/pegasus.cpp
    engines/saga/saga.cpp
    engines/sci/engine/kgraphics32.cpp
    engines/sci/engine/savegame.cpp
    engines/sci/graphics/video32.cpp
    engines/sky/compact.cpp
    engines/supernova/supernova.cpp
    engines/sword1/animation.cpp
    engines/sword1/control.cpp
    engines/sword2/animation.cpp
    engines/sword2/protocol.cpp
    engines/sword2/resman.cpp
    engines/teenagent/resources.cpp
    engines/titanic/support/files_manager.cpp
    engines/tony/tony.cpp
    engines/toon/toon.cpp
    engines/tsage/core.cpp
    engines/ultima/shared/engine/data_archive.cpp
    engines/ultima/shared/engine/data_archive.h
    engines/ultima/shared/engine/ultima.cpp
    engines/ultima/shared/engine/ultima.h
    engines/wage/gui.cpp
    engines/xeen/files.cpp
    gui/downloaddialog.cpp
    gui/massadd.cpp
    gui/options.cpp
    gui/saveload-dialog.cpp


diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp
index e189d78296..85a2b46269 100644
--- a/audio/mididrv.cpp
+++ b/audio/mididrv.cpp
@@ -255,9 +255,9 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 		// If the expressly selected driver or device cannot be found (no longer compiled in, turned off, etc.)
 		// we display a warning and continue.
 		failedDevStr = selDevStr;
-		Common::U32String warningMsg = Common::String::format(
-			_("The selected audio device '%s' was not found (e.g. might be turned off or disconnected).").encode().c_str(),
-			failedDevStr.encode() + " " + _("Attempting to fall back to the next available device...").encode());
+		Common::U32String warningMsg = Common::U32String::format(
+			_("The selected audio device '%s' was not found (e.g. might be turned off or disconnected)."),
+			(failedDevStr + Common::U32String(" ") + _("Attempting to fall back to the next available device...")).encode().c_str());
 		GUI::MessageDialog dialog(warningMsg);
 		dialog.runModal();
 	}
@@ -269,9 +269,9 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 		} else {
 			// If the expressly selected device cannot be used we display a warning and continue.
 			failedDevStr = getDeviceString(hdl, MidiDriver::kDeviceName);
-			Common::U32String warningMsg = Common::String::format(
-				_("The selected audio device '%s' cannot be used. See log file for more information.").encode().c_str(),
-				failedDevStr.encode() + " " + _("Attempting to fall back to the next available device...").encode());
+			Common::U32String warningMsg = Common::U32String::format(
+				_("The selected audio device '%s' cannot be used. See log file for more information."),
+				(failedDevStr + Common::U32String(" ") + _("Attempting to fall back to the next available device...")).encode().c_str());
 			GUI::MessageDialog dialog(warningMsg);
 			dialog.runModal();
 		}
@@ -286,7 +286,7 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 	while (flags != MDT_NONE) {
 		if ((flags & MDT_MIDI) && !skipMidi) {
 			// If a preferred MT32 or GM device has been selected that device gets returned if available.
-			Common::String devStr;
+			Common::U32String devStr;
 			if (flags & MDT_PREFER_MT32)
 				devStr = ConfMan.hasKey("mt32_device") ? ConfMan.get("mt32_device") : Common::String("null");
 			else if (flags & MDT_PREFER_GM)
@@ -307,9 +307,9 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 					// we display a warning and continue. Don't warn about the missing device if we did already (this becomes relevant if the
 					// missing device is selected as preferred device and also as GM or MT-32 device).
 					if (failedDevStr != devStr) {
-						Common::U32String warningMsg = Common::String::format(
-							_("The preferred audio device '%s' was not found (e.g. might be turned off or disconnected).").encode().c_str(),
-							devStr + " " + _("Attempting to fall back to the next available device...").encode());
+						Common::U32String warningMsg = Common::U32String::format(
+							_("The preferred audio device '%s' was not found (e.g. might be turned off or disconnected)."),
+							(devStr + Common::U32String(" ") + _("Attempting to fall back to the next available device...")).encode().c_str());
 						GUI::MessageDialog dialog(warningMsg);
 						dialog.runModal();
 					}
@@ -324,9 +324,9 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 						// Don't warn about the failing device if we did already (this becomes relevant if the failing
 						// device is selected as preferred device and also as GM or MT-32 device).
 						if (failedDevStr != getDeviceString(hdl, MidiDriver::kDeviceName)) {
-							Common::U32String warningMsg = Common::String::format(
-								_("The preferred audio device '%s' cannot be used. See log file for more information.").encode().c_str(),
-								getDeviceString(hdl, MidiDriver::kDeviceName).encode() + " " + _("Attempting to fall back to the next available device...").encode());
+							Common::U32String warningMsg = Common::U32String::format(
+								_("The preferred audio device '%s' cannot be used. See log file for more information."),
+								(getDeviceString(hdl, MidiDriver::kDeviceName) + Common::U32String(" ") + _("Attempting to fall back to the next available device...")).encode().c_str());
 							GUI::MessageDialog dialog(warningMsg);
 							dialog.runModal();
 						}
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 1414fff63f..76796b251f 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -583,7 +583,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 #ifdef USE_OSD
 		int windowWidth = 0, windowHeight = 0;
 		getWindowSizeFromSdl(&windowWidth, &windowHeight);
-		const Common::U32String osdMsg = Common::String::format(_("Resolution: %dx%d").encode().c_str(), windowWidth, windowHeight);
+		const Common::U32String osdMsg = Common::U32String::format(_("Resolution: %dx%d"), windowWidth, windowHeight);
 		displayMessageOnOSD(osdMsg);
 #endif
 
diff --git a/backends/networking/sdl_net/handlers/filespagehandler.cpp b/backends/networking/sdl_net/handlers/filespagehandler.cpp
index b40dd1a53c..b8d8e8a70d 100644
--- a/backends/networking/sdl_net/handlers/filespagehandler.cpp
+++ b/backends/networking/sdl_net/handlers/filespagehandler.cpp
@@ -229,7 +229,7 @@ void FilesPageHandler::handle(Client &client) {
 	replace(response, "{create_directory_desc}", _("Type new directory name:").encode());
 	replace(response, "{upload_file_desc}", _("Select a file to upload:").encode());
 	replace(response, "{or_upload_directory_desc}", _("Or select a directory (works in Chrome only):").encode());
-	replace(response, "{index_of_directory}", Common::String::format("%s %s", _("Index of").encode().c_str(), encodeHtmlEntities(getDisplayPath(client.queryParameter("path")))));
+	replace(response, "{index_of_directory}", Common::String::format("%s %s", _("Index of").encode().c_str(), encodeHtmlEntities(getDisplayPath(client.queryParameter("path"))).c_str()));
 	replace(response, "{content}", content);
 	LocalWebserver::setClientGetHandler(client, response);
 }
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index 1328ffa41c..03e6e9d22f 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -210,7 +210,7 @@ void AccessEngine::initialize() {
 
 Common::Error AccessEngine::run() {
 	_res = Resources::init(this);
-	Common::String errorMessage;
+	Common::U32String errorMessage;
 	if (!_res->load(errorMessage)) {
 		GUIErrorMessage(errorMessage);
 		return Common::kNoError;
diff --git a/engines/access/resources.cpp b/engines/access/resources.cpp
index ac610ec908..5c2656778b 100644
--- a/engines/access/resources.cpp
+++ b/engines/access/resources.cpp
@@ -37,11 +37,11 @@ Resources *Resources::init(AccessEngine *vm) {
 	error("Unknown game");
 }
 
-bool Resources::load(Common::String &errorMessage) {
+bool Resources::load(Common::U32String &errorMessage) {
 	Common::File f;
 	Common::String filename = "access.dat";
 	if (!f.open(filename.c_str())) {
-		errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
+		errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
 		return false;
 	}
 
@@ -49,7 +49,7 @@ bool Resources::load(Common::String &errorMessage) {
 	char buffer[4];
 	f.read(buffer, 4);
 	if (strncmp(buffer, "SVMA", 4)) {
-		errorMessage = Common::String::format(_("The '%s' engine data file is corrupt.").encode().c_str(), filename.c_str());
+		errorMessage = Common::U32String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
 		return false;
 	}
 
@@ -57,8 +57,8 @@ bool Resources::load(Common::String &errorMessage) {
 	uint expectedVersion = 1;
 	uint version = f.readUint16LE();
 	if (version != expectedVersion) {
-		errorMessage = Common::String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.").encode().c_str(),
+		errorMessage = Common::U32String::format(
+			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
 			filename.c_str(), expectedVersion, 0, version, 0);
 		return false;
 	}
diff --git a/engines/access/resources.h b/engines/access/resources.h
index bb5c3f9f61..bf87e99260 100644
--- a/engines/access/resources.h
+++ b/engines/access/resources.h
@@ -95,7 +95,7 @@ public:
 	/**
 	 * Load the access.dat file
 	 */
-	bool load(Common::String &errorMessage);
+	bool load(Common::U32String &errorMessage);
 };
 
 } // End of namespace Access
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index db2e7b3828..a217536081 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -555,7 +555,7 @@ MoviePlayer *makeMoviePlayer(AGOSEngine_Feeble *vm, const char *name) {
 		return new MoviePlayerSMK(vm, baseName);
 	}
 
-	Common::U32String buf = Common::String::format(_("Cutscene file '%s' not found!").encode().c_str(), baseName);
+	Common::U32String buf = Common::U32String::format(_("Cutscene file '%s' not found!"), baseName);
 	GUI::MessageDialog dialog(buf, _("OK"));
 	dialog.runModal();
 
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index de34e02dd1..44208ff782 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -156,7 +156,7 @@ void AGOSEngine::quickLoadOrSave() {
 		Subroutine *sub;
 		success = loadGame(genSaveName(_saveLoadSlot));
 		if (!success) {
-			buf = Common::String::format(_("Failed to load saved game from file:\n\n%s").encode().c_str(), filename.c_str());
+			buf = Common::U32String::format(_("Failed to load saved game from file:\n\n%s"), filename.c_str());
 		} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
 			drawIconArray(2, me(), 0, 0);
 			setBitFlag(97, true);
@@ -191,7 +191,7 @@ void AGOSEngine::quickLoadOrSave() {
 	} else {
 		success = saveGame(_saveLoadSlot, _saveLoadName);
 		if (!success)
-			buf = Common::String::format(_("Failed to save game to file:\n\n%s").encode().c_str(), filename.c_str());
+			buf = Common::U32String::format(_("Failed to save game to file:\n\n%s"), filename.c_str());
 	}
 
 	if (!success) {
@@ -199,7 +199,7 @@ void AGOSEngine::quickLoadOrSave() {
 		dialog.runModal();
 
 	} else if (_saveLoadType == 1) {
-		buf = Common::String::format(_("Successfully saved game in file:\n\n%s").encode().c_str(), filename.c_str());
+		buf = Common::U32String::format(_("Successfully saved game in file:\n\n%s"), filename.c_str());
 		GUI::TimedMessageDialog dialog(buf, 1500);
 		dialog.runModal();
 
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 4399da8678..227449fd88 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -214,7 +214,7 @@ void MainMenuDialog::save() {
 
 		Common::Error status = _engine->saveGameState(slot, Common::convertFromU32String(result));
 		if (status.getCode() != Common::kNoError) {
-			Common::U32String failMessage = Common::String::format(Common::convertFromU32String(_("Failed to save game (%s)! ")).c_str(),
+			Common::U32String failMessage = Common::U32String::format(_("Failed to save game (%s)! "),
 				  "Please consult the README for basic information, and for "
 				  "instructions on how to obtain further assistance.");
 			GUI::MessageDialog dialog(failMessage);
diff --git a/engines/dragons/dragons.cpp b/engines/dragons/dragons.cpp
index 29b2609929..16e608daf0 100644
--- a/engines/dragons/dragons.cpp
+++ b/engines/dragons/dragons.cpp
@@ -1782,7 +1782,7 @@ bool DragonsEngine::validateAVFile(const char *filename) {
 	file.close();
 
 	if(!fileValid) {
-		GUIErrorMessageWithURL(Common::String::format(_("Error: The file '%s' hasn't been extracted properly.\nPlease refer to the wiki page\nhttps://wiki.scummvm.org/index.php?title=HOWTO-PlayStation_Videos for details on how to properly extract the DTSPEECH.XA and *.STR files from your game disc."), filename),
+		GUIErrorMessageWithURL(Common::U32String::format(_("Error: The file '%s' hasn't been extracted properly.\nPlease refer to the wiki page\nhttps://wiki.scummvm.org/index.php?title=HOWTO-PlayStation_Videos for details on how to properly extract the DTSPEECH.XA and *.STR files from your game disc."), filename),
 				"https://wiki.scummvm.org/index.php?title=HOWTO-PlayStation_Videos");
 	}
 	return fileValid;
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index fc21c8b2cc..55e7e8a9cb 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -928,9 +928,9 @@ bool DrasculaEngine::loadDrasculaDat() {
 	in.open(filename.c_str());
 
 	if (!in.isOpen()) {
-		Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
+		Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
 		GUIErrorMessage(errorMessage);
-		warning("%s", errorMessage.c_str());
+		warning("%s", errorMessage.encode().c_str());
 
 		return false;
 	}
@@ -942,9 +942,9 @@ bool DrasculaEngine::loadDrasculaDat() {
 	buf[8] = '\0';
 
 	if (strcmp(buf, "DRASCULA") != 0) {
-		Common::String errorMessage = Common::String::format(_("The '%s' engine data file is corrupt.").encode().c_str(), filename.c_str());
+		Common::U32String errorMessage = Common::U32String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
 		GUIErrorMessage(errorMessage);
-		warning("%s", errorMessage.c_str());
+		warning("%s", errorMessage.encode().c_str());
 
 		return false;
 	}
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 061d079303..70e4ed44bc 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -314,9 +314,9 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
 
 	// Error out on size switch failure
 	if (gfxError & OSystem::kTransactionSizeChangeFailed) {
-		Common::String message;
-		message = Common::String::format(
-			Common::convertFromU32String(_("Could not switch to resolution '%dx%d'.")).c_str(), width, height);
+		Common::U32String message;
+		message = Common::U32String::format(
+			_("Could not switch to resolution '%dx%d'."), width, height);
 
 		GUIErrorMessage(message);
 		error("%s", message.c_str());
@@ -333,18 +333,18 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
 #endif
 
 	if (gfxError & OSystem::kTransactionModeSwitchFailed) {
-		Common::String message;
-		message = Common::String::format(
-			Common::convertFromU32String(_("Could not switch to video mode '%s'.")).c_str(), ConfMan.get("gfx_mode").c_str());
+		Common::U32String message;
+		message = Common::U32String::format(
+			_("Could not switch to video mode '%s'."), ConfMan.get("gfx_mode").c_str());
 
 		GUI::MessageDialog dialog(message);
 		dialog.runModal();
 	}
 
 	if (gfxError & OSystem::kTransactionStretchModeSwitchFailed) {
-		Common::String message;
-		message = Common::String::format(
-			Common::convertFromU32String(_("Could not switch to stretch mode '%s'.")).c_str(), ConfMan.get("stretch_mode").c_str());
+		Common::U32String message;
+		message = Common::U32String::format(
+			_("Could not switch to stretch mode '%s'."), ConfMan.get("stretch_mode").c_str());
 
 		GUI::MessageDialog dialog(message);
 		dialog.runModal();
@@ -397,11 +397,11 @@ void initGraphics(int width, int height) {
 	initGraphics(width, height, &format);
 }
 
-void GUIErrorMessageWithURL(const Common::String &msg, const char *url) {
+void GUIErrorMessageWithURL(const Common::U32String &msg, const char *url) {
 	GUIErrorMessage(msg, url);
 }
 
-void GUIErrorMessage(const Common::String &msg, const char *url) {
+void GUIErrorMessage(const Common::U32String &msg, const char *url) {
 	g_system->setWindowCaption("Error");
 	g_system->beginGFXTransaction();
 		initCommonGFX();
@@ -415,7 +415,7 @@ void GUIErrorMessage(const Common::String &msg, const char *url) {
 			dialog.runModal();
 		}
 	} else {
-		error("%s", msg.c_str());
+		error("%s", msg.encode().c_str());
 	}
 }
 
@@ -600,9 +600,9 @@ void Engine::openMainMenuDialog() {
 	if (_saveSlotToLoad >= 0) {
 		Common::Error status = loadGameState(_saveSlotToLoad);
 		if (status.getCode() != Common::kNoError) {
-			Common::U32String failMessage = Common::String::format(Common::convertFromU32String(_("Failed to load saved game (%s)! "
+			Common::U32String failMessage = Common::U32String::format(_("Failed to load saved game (%s)! "
 				  "Please consult the README for basic information, and for "
-				  "instructions on how to obtain further assistance.")).c_str(), status.getDesc().c_str());
+				  "instructions on how to obtain further assistance."), status.getDesc().c_str());
 			GUI::MessageDialog dialog(failMessage);
 			dialog.runModal();
 		}
diff --git a/engines/engine.h b/engines/engine.h
index babbf69ba8..9031cd48c4 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -53,8 +53,8 @@ class Dialog;
 /**
  * Initializes graphics and shows error message.
  */
-void GUIErrorMessage(const Common::String &msg, const char *url = nullptr);
-void GUIErrorMessageWithURL(const Common::String &msg, const char *url);
+void GUIErrorMessage(const Common::U32String &msg, const char *url = nullptr);
+void GUIErrorMessageWithURL(const Common::U32String &msg, const char *url);
 void GUIErrorMessageFormat(const char *fmt, ...) GCC_PRINTF(1, 2);
 
 class Engine;
diff --git a/engines/glk/alan2/alan2.cpp b/engines/glk/alan2/alan2.cpp
index d875deecb3..8008fd4c4b 100644
--- a/engines/glk/alan2/alan2.cpp
+++ b/engines/glk/alan2/alan2.cpp
@@ -85,7 +85,7 @@ bool Alan2::initialize() {
 	// Open up the text file
 	txtfil = new Common::File();
 	if (!txtfil->open(Common::String::format("%s.dat", _advName.c_str()))) {
-		GUIErrorMessage("Could not open adventure text data file");
+		GUIErrorMessage(Common::convertToU32String("Could not open adventure text data file"));
 		delete txtfil;
 		return false;
 	}
diff --git a/engines/glk/alan3/alan3.cpp b/engines/glk/alan3/alan3.cpp
index d2bce655dc..90baedd9f6 100644
--- a/engines/glk/alan3/alan3.cpp
+++ b/engines/glk/alan3/alan3.cpp
@@ -94,7 +94,7 @@ bool Alan3::initialize() {
 	// In Alan 3, the text data comes from the adventure file itself
 	Common::File *txt = new Common::File();
 	if (!txt->open(getFilename())) {
-	    GUIErrorMessage("Could not open adventure file for text data");
+	    GUIErrorMessage(Common::convertToU32String("Could not open adventure file for text data"));
 	    delete txt;
 	    return false;
 	}
diff --git a/engines/glk/hugo/herun.cpp b/engines/glk/hugo/herun.cpp
index 1d8a79acb4..0e46a4789a 100644
--- a/engines/glk/hugo/herun.cpp
+++ b/engines/glk/hugo/herun.cpp
@@ -184,7 +184,7 @@ Start:
 	// Handle any savegame selected directly from the ScummVM launcher
 	if (_savegameSlot != -1) {
 		if (loadGameState(_savegameSlot).getCode() != Common::kNoError) {
-			GUIErrorMessage("Loading failed");
+			GUIErrorMessage(Common::convertToU32String("Loading failed"));
 			_savegameSlot = -1;
 		}
 	}
diff --git a/engines/glk/hugo/hugo.cpp b/engines/glk/hugo/hugo.cpp
index 4582d61cc4..dea8537c46 100644
--- a/engines/glk/hugo/hugo.cpp
+++ b/engines/glk/hugo/hugo.cpp
@@ -179,14 +179,14 @@ Common::Error Hugo::readSaveData(Common::SeekableReadStream *rs) {
 	if (hugo_ferror(rs)) goto RestoreError;
 
 	if (strcmp(testid, id)) {
-		GUIErrorMessage("Incorrect rs file.");
+		GUIErrorMessage(Common::convertToU32String("Incorrect rs file."));
 		goto RestoreError;
 	}
 
 	/* Check serial number */
 	if (!hugo_fgets(testserial, 9, rs)) goto RestoreError;
 	if (strcmp(testserial, serial)) {
-		GUIErrorMessage("Save file created by different version.");
+		GUIErrorMessage(Common::convertToU32String("Save file created by different version."));
 		goto RestoreError;
 	}
 
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 9919d87c07..c03c0b03a1 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -433,7 +433,7 @@ bool HugoEngine::loadHugoDat() {
 	in.open(filename.c_str());
 
 	if (!in.isOpen()) {
-		Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
+		Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
 		GUIErrorMessage(errorMessage);
 		warning("%s", errorMessage.c_str());
 		return false;
@@ -444,7 +444,7 @@ bool HugoEngine::loadHugoDat() {
 	in.read(buf, 4);
 
 	if (memcmp(buf, "HUGO", 4)) {
-		Common::String errorMessage = Common::String::format(_("The '%s' engine data file is corrupt.").encode().c_str(), filename.c_str());
+		Common::U32String errorMessage = Common::U32String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
 		GUIErrorMessage(errorMessage);
 		return false;
 	}
diff --git a/engines/kyra/gui/saveload_eob.cpp b/engines/kyra/gui/saveload_eob.cpp
index 83bf5987ef..c310b39d08 100644
--- a/engines/kyra/gui/saveload_eob.cpp
+++ b/engines/kyra/gui/saveload_eob.cpp
@@ -594,7 +594,7 @@ bool EoBCoreEngine::importOriginalSaveFile(int destSlot, const char *sourceFile)
 				}
 
 				delete fs;
-				::GUI::MessageDialog dialog(Common::String::format(_("The following original saved game file has been found in your game path:\n\n%s %s\n\nDo you wish to use this saved game file with ScummVM?\n\n").encode().c_str(), temp.c_str(), dsc.c_str()), _("Yes"), _("No"));
+				::GUI::MessageDialog dialog(Common::U32String::format(_("The following original saved game file has been found in your game path:\n\n%s %s\n\nDo you wish to use this saved game file with ScummVM?\n\n"), temp.c_str(), dsc.c_str()), _("Yes"), _("No"));
 				if (dialog.runModal())
 					origFiles.push_back(temp);
 			}
@@ -627,7 +627,7 @@ bool EoBCoreEngine::importOriginalSaveFile(int destSlot, const char *sourceFile)
 
 	if (destSlot != -1) {
 		if (Common::find(_gui->_saveSlots.begin(), _gui->_saveSlots.end(), destSlot) != _gui->_saveSlots.end()) {
-			::GUI::MessageDialog dialog(Common::String::format(_("A saved game file was found in the specified slot %d. Overwrite?\n\n").encode().c_str(), destSlot), _("Yes"), _("No"));
+			::GUI::MessageDialog dialog(Common::U32String::format(_("A saved game file was found in the specified slot %d. Overwrite?\n\n"), destSlot), _("Yes"), _("No"));
 			if (!dialog.runModal())
 				return false;
 		}
@@ -660,7 +660,7 @@ bool EoBCoreEngine::importOriginalSaveFile(int destSlot, const char *sourceFile)
 	_inf->reset();
 
 	if (destSlot == -1 && importedCount) {
-		::GUI::MessageDialog dialog(Common::String::format(_("%d original saved games have been successfully imported into\nScummVM. If you want to manually import original saved game later you will\nneed to open the ScummVM debug console and use the command 'import_savefile'.\n\n").encode().c_str(), importedCount));
+		::GUI::MessageDialog dialog(Common::U32String::format(_("%d original saved games have been successfully imported into\nScummVM. If you want to manually import original saved game later you will\nneed to open the ScummVM debug console and use the command 'import_savefile'.\n\n"), importedCount));
 		dialog.runModal();
 	}
 
diff --git a/engines/mutationofjb/util.cpp b/engines/mutationofjb/util.cpp
index fe4440b7ee..cab8eea6d7 100644
--- a/engines/mutationofjb/util.cpp
+++ b/engines/mutationofjb/util.cpp
@@ -30,9 +30,9 @@
 namespace MutationOfJB {
 
 void reportFileMissingError(const char *fileName) {
-	Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file").encode().c_str(), fileName);
+	Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file"), fileName);
 	GUIErrorMessage(errorMessage);
-	warning("%s", errorMessage.c_str());
+	warning("%s", errorMessage.encode().c_str());
 }
 
 Common::String toUpperCP895(const Common::String &str) {
diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp
index b319385409..284dc9f364 100644
--- a/engines/parallaction/saveload.cpp
+++ b/engines/parallaction/saveload.cpp
@@ -127,7 +127,7 @@ void SaveLoad_ns::doLoadGame(uint16 slot) {
 void SaveLoad_ns::doSaveGame(uint16 slot, const char* name) {
 	Common::OutSaveFile *f = getOutSaveFile(slot);
 	if (f == 0) {
-		Common::String buf = Common::String::format(_("Can't save game in slot %i\n\n").encode().c_str(), slot);
+		Common::U32String buf = Common::U32String::format(_("Can't save game in slot %i\n\n"), slot);
 		GUI::MessageDialog dialog(buf);
 		dialog.runModal();
 		return;
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index e6568aae16..5fa1e0652e 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -382,9 +382,9 @@ Common::Error PegasusEngine::showSaveDialog() {
 }
 
 void PegasusEngine::showSaveFailedDialog(const Common::Error &status) {
-	Common::String failMessage = Common::String::format(_("Failed to save game (%s)! "
+	Common::U32String failMessage = Common::U32String::format(_("Failed to save game (%s)! "
 			"Please consult the README for basic information, and for "
-			"instructions on how to obtain further assistance.").encode().c_str(), status.getDesc().c_str());
+			"instructions on how to obtain further assistance."), status.getDesc().c_str());
 	GUI::MessageDialog dialog(failMessage);
 	dialog.runModal();
 }
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index ff18a3a259..f83c5a983c 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -243,7 +243,7 @@ Common::Error SagaEngine::run() {
 
 	// Detect game and open resource files
 	if (!initGame()) {
-		GUIErrorMessage("Error loading game resources.");
+		GUIErrorMessage(Common::convertToU32String("Error loading game resources."));
 		return Common::kUnknownError;
 	}
 
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index e22be3ee2f..0cd2e3d226 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -355,7 +355,7 @@ reg_t kWinHelp(EngineState *s, int argc, reg_t *argv) {
 	case 1:
 		// Load a help file
 		// Maybe in the future we can implement this, but for now this message should suffice
-		showScummVMDialog(Common::String::format(_("Please use an external viewer to open the game's help file: %s").encode().c_str(), s->_segMan->getString(argv[1]).c_str()));
+		showScummVMDialog(Common::U32String::format(_("Please use an external viewer to open the game's help file: %s"), s->_segMan->getString(argv[1]).c_str()));
 		break;
 	case 2:
 		// Looks like some init function
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 3f048ff0b0..20692e6095 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -1406,7 +1406,7 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
 			if (meta.version < MINIMUM_SAVEGAME_VERSION) {
 				showScummVMDialog(_("The format of this saved game is obsolete, unable to load it"));
 			} else {
-				Common::U32String msg = Common::String::format(_("Savegame version is %d, maximum supported is %0d").encode().c_str(), meta.version, CURRENT_SAVEGAME_VERSION);
+				Common::U32String msg = Common::U32String::format(_("Savegame version is %d, maximum supported is %0d"), meta.version, CURRENT_SAVEGAME_VERSION);
 				showScummVMDialog(msg);
 			}
 
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp
index cc3a3815d7..04289001a8 100644
--- a/engines/sci/graphics/video32.cpp
+++ b/engines/sci/graphics/video32.cpp
@@ -66,7 +66,7 @@ bool VideoPlayer::open(const Common::String &fileName) {
 	// system with no RGB support
 	if (_decoder->getPixelFormat().bytesPerPixel != 1) {
 		void showScummVMDialog(const Common::U32String &message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
-		showScummVMDialog(Common::String::format(_("Cannot play back %dbpp video on a system with maximum color depth of 8bpp").encode().c_str(), _decoder->getPixelFormat().bpp()));
+		showScummVMDialog(Common::U32String::format(_("Cannot play back %dbpp video on a system with maximum color depth of 8bpp"), _decoder->getPixelFormat().bpp()));
 		_decoder->close();
 		return false;
 	}
diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp
index dd9b83e349..802d03025c 100644
--- a/engines/sky/compact.cpp
+++ b/engines/sky/compact.cpp
@@ -128,9 +128,9 @@ SkyCompact::SkyCompact() {
 	_cptFile = new Common::File();
 	Common::String filename = "sky.cpt";
 	if (!_cptFile->open(filename.c_str())) {
-                Common::String msg = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
+                Common::U32String msg = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
                 GUIErrorMessage(msg);
-                error("%s", msg.c_str());
+                error("%s", msg.encode().c_str());
 	}
 
 	uint16 fileVersion = _cptFile->readUint16LE();
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index e95bcb9418..28e1067c8e 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -824,8 +824,8 @@ bool SupernovaEngine::saveGame(int slot, const Common::String &description) {
 
 void SupernovaEngine::errorTempSave(bool saving) {
 	GUIErrorMessage(saving
-		? "Failed to save temporary game state. Make sure your save game directory is set in ScummVM and that you can write to it."
-		: "Failed to load temporary game state.");
+		? Common::convertToU32String("Failed to save temporary game state. Make sure your save game directory is set in ScummVM and that you can write to it.")
+		: Common::convertToU32String("Failed to load temporary game state."));
 	error("Unrecoverable error");
 }
 
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index 777c7264b8..52013e27e8 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -529,7 +529,7 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan *
 			Video::VideoDecoder *psxDecoder = new Video::PSXStreamDecoder(Video::PSXStreamDecoder::kCD2x);
 			return new MoviePlayer(vm, textMan, resMan, system, psxDecoder, kVideoDecoderPSX);
 #else
-			GUI::MessageDialog dialog(Common::String::format(_("PSX stream cutscene '%s' cannot be played in paletted mode"), filename.c_str()), _("OK"));
+			GUI::MessageDialog dialog(Common::U32String::format(_("PSX stream cutscene '%s' cannot be played in paletted mode"), filename.c_str()), _("OK"));
 			dialog.runModal();
 			return 0;
 #endif
@@ -573,7 +573,7 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan *
 	}
 
 	if (!vm->isPsx() || scumm_stricmp(sequenceList[id], "enddemo") != 0) {
-		Common::U32String buf = Common::String::format(_("Cutscene '%s' not found").encode().c_str(), sequenceList[id]);
+		Common::U32String buf = Common::U32String::format(_("Cutscene '%s' not found"), sequenceList[id]);
 		GUI::MessageDialog dialog(buf, _("OK"));
 		dialog.runModal();
 	}
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index 2f94a0ef4d..2b8f533428 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -1258,8 +1258,8 @@ bool Control::convertSaveGame(uint8 slot, char *desc) {
 	if (testSave) {
 		delete testSave;
 
-		Common::U32String msg = Common::String::format(_("Target new saved game already exists!\n"
-		                     "Would you like to keep the old saved game (%s) or the new one (%s)?\n").encode().c_str(),
+		Common::U32String msg = Common::U32String::format(_("Target new saved game already exists!\n"
+		                     "Would you like to keep the old saved game (%s) or the new one (%s)?\n"),
 		                     oldFileName, newFileName);
 		GUI::MessageDialog dialog0(msg, _("Keep the old one"), _("Keep the new one"));
 
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index ee2f22d328..ba83fd0768 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -471,7 +471,7 @@ MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, OSystem *system
 	// The demo tries to play some cutscenes that aren't there, so make those warnings more discreet.
 	// In addition, some of the later re-releases of the game don't have the "eye" Virgin logo movie.
 	if (!vm->_logic->readVar(DEMO) && strcmp(name, "eye") != 0) {
-		Common::U32String buf = Common::String::format(_("Cutscene '%s' not found").encode().c_str(), name);
+		Common::U32String buf = Common::U32String::format(_("Cutscene '%s' not found"), name);
 		GUI::MessageDialog dialog(buf, _("OK"));
 		dialog.runModal();
 	} else
diff --git a/engines/sword2/protocol.cpp b/engines/sword2/protocol.cpp
index caa1a21798..b1d57cb079 100644
--- a/engines/sword2/protocol.cpp
+++ b/engines/sword2/protocol.cpp
@@ -305,7 +305,7 @@ byte *Sword2Engine::fetchPsxBackground(uint32 location) {
 	byte *buffer;
 
 	if (!file.open("screens.clu")) {
-		GUIErrorMessage("Broken Sword II: Cannot open screens.clu");
+		GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot open screens.clu"));
 		return NULL;
 	}
 
@@ -373,7 +373,7 @@ byte *Sword2Engine::fetchPsxParallax(uint32 location, uint8 level) {
 		return NULL;
 
 	if (!file.open("screens.clu")) {
-		GUIErrorMessage("Broken Sword II: Cannot open screens.clu");
+		GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot open screens.clu"));
 		return NULL;
 	}
 
diff --git a/engines/sword2/resman.cpp b/engines/sword2/resman.cpp
index 44027fd281..dd89fe0fdd 100644
--- a/engines/sword2/resman.cpp
+++ b/engines/sword2/resman.cpp
@@ -104,7 +104,7 @@ bool ResourceManager::init() {
 	Common::File file;
 
 	if (!file.open("resource.inf")) {
-		GUIErrorMessage("Broken Sword II: Cannot open resource.inf");
+		GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot open resource.inf"));
 		return false;
 	}
 
@@ -125,7 +125,7 @@ bool ResourceManager::init() {
 		_resFiles[_totalClusters].numEntries = -1;
 		_resFiles[_totalClusters].entryTab = NULL;
 		if (++_totalClusters >= MAX_res_files) {
-			GUIErrorMessage("Broken Sword II: Too many entries in resource.inf");
+			GUIErrorMessage(Common::convertToU32String("Broken Sword II: Too many entries in resource.inf"));
 			return false;
 		}
 	}
@@ -134,7 +134,7 @@ bool ResourceManager::init() {
 
 	// Now load in the binary id to res conversion table
 	if (!file.open("resource.tab")) {
-		GUIErrorMessage("Broken Sword II: Cannot open resource.tab");
+		GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot open resource.tab"));
 		return false;
 	}
 
@@ -151,7 +151,7 @@ bool ResourceManager::init() {
 
 	if (file.eos() || file.err()) {
 		file.close();
-		GUIErrorMessage("Broken Sword II: Cannot read resource.tab");
+		GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot read resource.tab"));
 		return false;
 	}
 
@@ -161,7 +161,7 @@ bool ResourceManager::init() {
 	// version, which has all files on one disc.
 
 	if (!file.open("cd.inf") && !Sword2Engine::isPsx()) {
-		GUIErrorMessage("Broken Sword II: Cannot open cd.inf");
+		GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot open cd.inf"));
 		return false;
 	}
 
@@ -179,7 +179,7 @@ bool ResourceManager::init() {
 			if (file.eos() || file.err()) {
 				delete[] cdInf;
 				file.close();
-				GUIErrorMessage("Broken Sword II: Cannot read cd.inf");
+				GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot read cd.inf"));
 				return false;
 			}
 
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index 4cc602dd35..cac15f5a86 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -94,8 +94,8 @@ bool Resources::loadArchives(const ADGameDescription *gd) {
 	Common::String filename = "teenagent.dat";
 	if (!dat_file->open(filename.c_str())) {
 		delete dat_file;
-		Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
-		warning("%s", errorMessage.c_str());
+		Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
+		warning("%s", errorMessage.encode().c_str());
 		GUIErrorMessage(errorMessage);
 		return false;
 	}
diff --git a/engines/titanic/support/files_manager.cpp b/engines/titanic/support/files_manager.cpp
index 63fde3aaba..6835f2e691 100644
--- a/engines/titanic/support/files_manager.cpp
+++ b/engines/titanic/support/files_manager.cpp
@@ -39,19 +39,19 @@ CFilesManager::~CFilesManager() {
 
 bool CFilesManager::loadResourceIndex() {
 	if (!_datFile.open("titanic.dat")) {
-		GUIErrorMessage("Could not find titanic.dat data file");
+		GUIErrorMessage(Common::convertToU32String("Could not find titanic.dat data file"));
 		return false;
 	}
 
 	uint headerId = _datFile.readUint32BE();
 	_version = _datFile.readUint16LE();
 	if (headerId != MKTAG('S', 'V', 'T', 'N')) {
-		GUIErrorMessage("titanic.dat has invalid contents");
+		GUIErrorMessage(Common::convertToU32String("titanic.dat has invalid contents"));
 		return false;
 	}
 
 	if (_version != 5) {
-		GUIErrorMessage("titanic.dat is out of date");
+		GUIErrorMessage(Common::convertToU32String("titanic.dat is out of date"));
 		return false;
 	}
 
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index 8b3d1a77f9..4e0272541a 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -186,16 +186,16 @@ Common::ErrorCode TonyEngine::init() {
 }
 
 bool TonyEngine::loadTonyDat() {
-	Common::String msg;
+	Common::U32String msg;
 	Common::File in;
 	Common::String filename = "tony.dat";
 
 	in.open(filename.c_str());
 
 	if (!in.isOpen()) {
-		msg = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
+		msg = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
 		GUIErrorMessage(msg);
-		warning("%s", msg.c_str());
+		warning("%s", msg.encode().c_str());
 		return false;
 	}
 
@@ -205,9 +205,9 @@ bool TonyEngine::loadTonyDat() {
 	buf[4] = '\0';
 
 	if (strcmp(buf, "TONY")) {
-		msg = Common::String::format(_("The '%s' engine data file is corrupt.").encode().c_str(), filename.c_str());
+		msg = Common::U32String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
 		GUIErrorMessage(msg);
-		warning("%s", msg.c_str());
+		warning("%s", msg.encode().c_str());
 		return false;
 	}
 
@@ -253,9 +253,9 @@ bool TonyEngine::loadTonyDat() {
 
 	int numVariant = in.readUint16BE();
 	if (expectedLangVariant > numVariant - 1) {
-		msg = Common::String::format(_("Font variant not present in '%s' engine data file.").encode().c_str(), filename.c_str());
+		msg = Common::U32String::format(_("Font variant not present in '%s' engine data file."), filename.c_str());
 		GUIErrorMessage(msg);
-		warning("%s", msg.c_str());
+		warning("%s", msg.encode().c_str());
 
 		return false;
 	}
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 2c7548c1bf..de02f4a6e5 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -222,11 +222,11 @@ void ToonEngine::parseInput() {
 				if (slotNum >= 0 && slotNum <= 9 && canSaveGameStateCurrently()) {
 					if (saveGame(slotNum, "")) {
 						// ok
-						Common::U32String buf = Common::String::format(_("Saved game in slot #%d ").encode().c_str(), slotNum);
+						Common::U32String buf = Common::U32String::format(_("Saved game in slot #%d "), slotNum);
 						GUI::TimedMessageDialog dialog(buf, 1000);
 						dialog.runModal();
 					} else {
-						Common::U32String buf = Common::String::format(_("Could not quick save into slot #%d").encode().c_str(), slotNum);
+						Common::U32String buf = Common::U32String::format(_("Could not quick save into slot #%d"), slotNum);
 						GUI::MessageDialog dialog(buf);
 						dialog.runModal();
 
@@ -239,13 +239,13 @@ void ToonEngine::parseInput() {
 				if (slotNum >= 0 && slotNum <= 9 && canLoadGameStateCurrently()) {
 					if (loadGame(slotNum)) {
 						// ok
-						Common::U32String buf = Common::String::format(_("Saved game #%d quick loaded").encode().c_str(), slotNum);
+						Common::U32String buf = Common::U32String::format(_("Saved game #%d quick loaded"), slotNum);
 						GUI::TimedMessageDialog dialog(buf, 1000);
 						dialog.runModal();
 					} else {
-						Common::U32String buf = Common::String::format(_("Could not quick load the saved game #%d").encode().c_str(), slotNum);
+						Common::U32String buf = Common::U32String::format(_("Could not quick load the saved game #%d"), slotNum);
 						GUI::MessageDialog dialog(buf);
-						warning("%s", buf.c_str());
+						warning("%s", buf.encode().c_str());
 						dialog.runModal();
 					}
 				}
@@ -1524,9 +1524,9 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) {
 
 	// load package
 	if (!resources()->openPackage(createRoomFilename(locationName + ".PAK"))) {
-		Common::String msg = Common::String::format(_("Unable to locate the '%s' data file.").encode().c_str(), createRoomFilename(locationName + ".PAK").c_str());
+		Common::U32String msg = Common::U32String::format(_("Unable to locate the '%s' data file."), createRoomFilename(locationName + ".PAK").c_str());
 		GUIErrorMessage(msg);
-		warning("%s", msg.c_str());
+		warning("%s", msg.encode().c_str());
 		_shouldQuit = true;
 		return;
 	}
@@ -4942,16 +4942,16 @@ void ToonEngine::createShadowLUT() {
 
 bool ToonEngine::loadToonDat() {
 	Common::File in;
-	Common::String msg;
+	Common::U32String msg;
 	Common::String filename = "toon.dat";
 	int majVer, minVer;
 
 	in.open(filename.c_str());
 
 	if (!in.isOpen()) {
-		msg = Common::String::format(_("Unable to locate the '%s' engine data file.").encode().c_str(), filename.c_str());
+		msg = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
 		GUIErrorMessage(msg);
-		warning("%s", msg.c_str());
+		warning("%s", msg.encode().c_str());
 		return false;
 	}
 
@@ -4961,9 +4961,9 @@ bool ToonEngine::loadToonDat() {
 	buf[4] = '\0';
 
 	if (strcmp(buf, "TOON")) {
-		msg = Common::String::format(_("The '%s' engine data file is corrupt.").encode().c_str(), filename.c_str());
+		msg = Common::U32String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
 		GUIErrorMessage(msg);
-		warning("%s", msg.c_str());
+		warning("%s", msg.encode().c_str());
 		return false;
 	}
 
@@ -4971,11 +4971,11 @@ bool ToonEngine::loadToonDat() {
 	minVer = in.readByte();
 
 	if ((majVer != TOON_DAT_VER_MAJ) || (minVer != TOON_DAT_VER_MIN)) {
-		msg = Common::String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.").encode().c_str(),
+		msg = Common::U32String::format(
+			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
 			filename.c_str(), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer);
 		GUIErrorMessage(msg);
-		warning("%s", msg.c_str());
+		warning("%s", msg.encode().c_str());
 
 		return false;
 	}
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 50bc6e7e90..5eac13fd06 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1622,7 +1622,7 @@ void SceneItem::doAction(int action) {
 			break;
 		}
 
-		GUIErrorMessage(msg);
+		GUIErrorMessage(Common::convertToU32String(msg));
 	}
 }
 
@@ -4436,7 +4436,7 @@ void SceneHandler::dispatch() {
 		// FIXME: Make use of the description string in err to enhance
 		// the error reported to the user.
 		if (err.getCode() != Common::kNoError)
-			GUIErrorMessage(SAVE_ERROR_MSG);
+			GUIErrorMessage(Common::convertToU32String(SAVE_ERROR_MSG));
 	}
 	if (_loadGameSlot != -1) {
 		int priorSceneBeforeLoad = GLOBALS._sceneManager._previousScene;
diff --git a/engines/ultima/shared/engine/data_archive.cpp b/engines/ultima/shared/engine/data_archive.cpp
index 457bbfe6ab..c0d4844e6c 100644
--- a/engines/ultima/shared/engine/data_archive.cpp
+++ b/engines/ultima/shared/engine/data_archive.cpp
@@ -58,7 +58,7 @@ public:
 /*-------------------------------------------------------------------*/
 
 bool UltimaDataArchive::load(const Common::String &subfolder,
-		int reqMajorVersion, int reqMinorVersion, Common::String &errorMsg) {
+		int reqMajorVersion, int reqMinorVersion, Common::U32String &errorMsg) {
 	Common::Archive *dataArchive = nullptr;
 	Common::File f;
 
@@ -78,7 +78,7 @@ bool UltimaDataArchive::load(const Common::String &subfolder,
 			(dataArchive = Common::makeZipArchive(DATA_FILENAME)) == 0 ||
 			!f.open(Common::String::format("%s/version.txt", subfolder.c_str()), *dataArchive)) {
 			delete dataArchive;
-			errorMsg = Common::String::format(_("Could not locate engine data %s").encode().c_str(), DATA_FILENAME);
+			errorMsg = Common::U32String::format(_("Could not locate engine data %s"), DATA_FILENAME);
 			return false;
 		}
 	}
@@ -96,7 +96,7 @@ bool UltimaDataArchive::load(const Common::String &subfolder,
 
 	if (major != reqMajorVersion || minor != reqMinorVersion) {
 		delete dataArchive;
-		errorMsg = Common::String::format(_("Out of date engine data. Expected %d.%d, but got version %d.%d").encode().c_str(),
+		errorMsg = Common::U32String::format(_("Out of date engine data. Expected %d.%d, but got version %d.%d"),
 			reqMajorVersion, reqMinorVersion, major, minor);
 		return false;
 	}
diff --git a/engines/ultima/shared/engine/data_archive.h b/engines/ultima/shared/engine/data_archive.h
index 03eeeaf78c..32973ac05b 100644
--- a/engines/ultima/shared/engine/data_archive.h
+++ b/engines/ultima/shared/engine/data_archive.h
@@ -61,7 +61,7 @@ public:
 	 * Otherwise, returns an error message in the errorMsg field
 	 */
     static bool load(const Common::String &subfolder,
-		int reqMajorVersion, int reqMinorVersion, Common::String &errorMsg);
+		int reqMajorVersion, int reqMinorVersion, Common::U32String &errorMsg);
 public:
 	~UltimaDataArchive() override {
 		delete _zip;
diff --git a/engines/ultima/shared/engine/ultima.cpp b/engines/ultima/shared/engine/ultima.cpp
index 571a98be0c..60fdb729b2 100644
--- a/engines/ultima/shared/engine/ultima.cpp
+++ b/engines/ultima/shared/engine/ultima.cpp
@@ -59,7 +59,7 @@ bool UltimaEngine::initialize() {
 		return true;
 
 	// Try and set up the data archive
-	Common::String errorMsg;
+	Common::U32String errorMsg;
 	if (!UltimaDataArchive::load(folder, reqMajorVersion, reqMinorVersion, errorMsg)) {
 		GUIError(errorMsg);
 		return false;
@@ -68,7 +68,7 @@ bool UltimaEngine::initialize() {
 	return true;
 }
 
-void UltimaEngine::GUIError(const Common::String &msg) {
+void UltimaEngine::GUIError(const Common::U32String &msg) {
 	GUIErrorMessage(msg);
 }
 
diff --git a/engines/ultima/shared/engine/ultima.h b/engines/ultima/shared/engine/ultima.h
index 59298c4b9a..7239f4c561 100644
--- a/engines/ultima/shared/engine/ultima.h
+++ b/engines/ultima/shared/engine/ultima.h
@@ -97,9 +97,9 @@ public:
 	}
 
 	/**
-	 * Show a messae in a GUI dialog
+	 * Show a message in a GUI dialog
 	 */
-	void GUIError(const Common::String &msg);
+	void GUIError(const Common::U32String &msg);
 
 	/**
 	 * Get a random number
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 2f527c7214..7ca78a0041 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -402,7 +402,7 @@ void Gui::actionCut() {
 
 	Common::String input = Common::convertFromU32String(_consoleWindow->getInput());
 
-	g_system->setTextInClipboard(Common::convertFromU32String(_consoleWindow->cutSelection()));
+	g_system->setTextInClipboard(_consoleWindow->cutSelection());
 
 	_undobuffer = input;
 
diff --git a/engines/xeen/files.cpp b/engines/xeen/files.cpp
index 080246f3dd..1a5ed968c5 100644
--- a/engines/xeen/files.cpp
+++ b/engines/xeen/files.cpp
@@ -255,14 +255,14 @@ bool FileManager::setup() {
 	// Ensure the custom CC archive is present
 	File f;
 	if (!f.exists("xeen.ccs")) {
-		GUIErrorMessage("Could not find xeen.ccs data file");
+		GUIErrorMessage(Common::convertToU32String("Could not find xeen.ccs data file"));
 		return false;
 	}
 
 	// Verify the version of the CC is correct
 	CCArchive *dataCc = new CCArchive("xeen.ccs", "data", true);
 	if (!f.open("VERSION", *dataCc) || f.readUint32LE() != 3) {
-		GUIErrorMessage("xeen.ccs is out of date");
+		GUIErrorMessage(Common::convertToU32String("xeen.ccs is out of date"));
 		return false;
 	}
 	SearchMan.add("data", dataCc);
diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp
index 0708978719..44b8ab096b 100644
--- a/gui/downloaddialog.cpp
+++ b/gui/downloaddialog.cpp
@@ -149,7 +149,7 @@ bool DownloadDialog::selectDirectories() {
 				return false;
 			}
 			GUI::MessageDialog alert(
-				Common::String::format(_("The \"%s\" already exists in the specified directory.\nDo you really want to download files into that directory?").encode().c_str(), remoteDirectory.name().c_str()),
+				Common::U32String::format(_("The \"%s\" already exists in the specified directory.\nDo you really want to download files into that directory?"), remoteDirectory.name().c_str()),
 				_("Yes"),
 				_("No")
 				);
@@ -212,14 +212,14 @@ Common::U32String DownloadDialog::getSizeLabelText() {
 	Common::String downloaded, downloadedUnits, total, totalUnits;
 	downloaded = getHumanReadableBytes(CloudMan.getDownloadBytesNumber(), downloadedUnits);
 	total = getHumanReadableBytes(CloudMan.getDownloadTotalBytesNumber(), totalUnits);
-	return Common::String::format(_("Downloaded %s %s / %s %s").encode().c_str(), downloaded.c_str(), _(downloadedUnits.c_str()).encode().c_str(), total.c_str(), _(totalUnits.c_str()).encode().c_str());
+	return Common::U32String::format(_("Downloaded %s %s / %s %s"), downloaded.c_str(), _(downloadedUnits.c_str()).encode().c_str(), total.c_str(), _(totalUnits.c_str()).encode().c_str());
 }
 
 Common::U32String DownloadDialog::getSpeedLabelText() {
 	Common::String speed, speedUnits;
 	speed = getHumanReadableBytes(CloudMan.getDownloadSpeed(), speedUnits);
 	speedUnits += "/s";
-	return Common::String::format(_("Download speed: %s %s").encode().c_str(), speed.c_str(), _(speedUnits).encode().c_str());
+	return Common::U32String::format(_("Download speed: %s %s"), speed.c_str(), _(speedUnits).encode().c_str());
 }
 
 void DownloadDialog::refreshWidgets() {
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 345db60cf9..91a7f69845 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -266,14 +266,14 @@ void MassAddDialog::handleTickle() {
 		buf = _("Scan complete!");
 		_dirProgressText->setLabel(buf);
 
-		buf = Common::String::format(Common::convertFromU32String(_("Discovered %d new games, ignored %d previously added games.")).c_str(), _games.size(), _oldGamesCount);
+		buf = Common::U32String::format(_("Discovered %d new games, ignored %d previously added games."), _games.size(), _oldGamesCount);
 		_gameProgressText->setLabel(buf);
 
 	} else {
-		buf = Common::String::format(Common::convertFromU32String(_("Scanned %d directories ...")).c_str(), _dirsScanned);
+		buf = Common::U32String::format(_("Scanned %d directories ..."), _dirsScanned);
 		_dirProgressText->setLabel(buf);
 
-		buf = Common::String::format(Common::convertFromU32String(_("Discovered %d new games, ignored %d previously added games ...")).c_str(), _games.size(), _oldGamesCount);
+		buf = Common::U32String::format(_("Discovered %d new games, ignored %d previously added games ..."), _games.size(), _oldGamesCount);
 		_gameProgressText->setLabel(buf);
 	}
 
diff --git a/gui/options.cpp b/gui/options.cpp
index ff206192ca..26d91040ee 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1170,12 +1170,12 @@ void OptionsDialog::addAchievementsControls(GuiObject *boss, const Common::Strin
 	}
 
 	if (nHidden) {
-		Common::U32String hiddenStr = Common::String::format(Common::convertFromU32String(_("%d hidden achievements remaining")).c_str(), nHidden);
+		Common::U32String hiddenStr = Common::U32String::format(_("%d hidden achievements remaining"), nHidden);
 		new StaticTextWidget(scrollContainer, lineHeight, yPos, width, yStep, hiddenStr, Graphics::kTextAlignStart);
 	}
 
 	if (nMax) {
-		Common::U32String totalStr = Common::String::format(Common::convertFromU32String(_("Achievements unlocked: %d/%d")).c_str(), nAchieved, nMax);
+		Common::U32String totalStr = Common::U32String::format(_("Achievements unlocked: %d/%d"), nAchieved, nMax);
 		new StaticTextWidget(scrollContainer, lineHeight, lineHeight, width, yStep, totalStr, Graphics::kTextAlignStart);
 
 		SliderWidget *progressBar;
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 2676b50590..c25c214f11 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -1182,7 +1182,7 @@ void SavenameDialog::open() {
 	Dialog::open();
 	setResult(-1);
 
-	_title->setLabel(Common::String::format(Common::convertFromU32String(_("Enter a description for slot %d:")).c_str(), _targetSlot));
+	_title->setLabel(Common::U32String::format(_("Enter a description for slot %d:"), _targetSlot));
 }
 
 void SavenameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {


Commit: ba0d57f3509230d86fd669e329b7a44c84478102
    https://github.com/scummvm/scummvm/commit/ba0d57f3509230d86fd669e329b7a44c84478102
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: Compare iterator condition properly for about dialog

Changed paths:
    gui/about.cpp


diff --git a/gui/about.cpp b/gui/about.cpp
index c9eb5ac8bc..7d715a409c 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -212,7 +212,7 @@ void AboutDialog::drawDialog(DrawLayer layerToDraw) {
 
 		Graphics::TextAlign align = Graphics::kTextAlignCenter;
 		ThemeEngine::WidgetStateInfo state = ThemeEngine::kStateEnabled;
-		if (*strLineItrBegin) {
+		if (strLineItrBegin != strLineItrEnd) {
 			switch (*strLineItrBegin) {
 			case 'C':
 				align = Graphics::kTextAlignCenter;


Commit: 6987d1a674e6d0d2fdc0f7a5d8b3b62789464fcc
    https://github.com/scummvm/scummvm/commit/6987d1a674e6d0d2fdc0f7a5d8b3b62789464fcc
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use u32 for KeysDialog.

- Turn titles into u32
- change tooltip "0" -> U32String("")
- Use u32::format where necessary

Changed paths:
    gui/KeysDialog.cpp
    gui/KeysDialog.h


diff --git a/gui/KeysDialog.cpp b/gui/KeysDialog.cpp
index d11b94ae43..965cb7c4a3 100644
--- a/gui/KeysDialog.cpp
+++ b/gui/KeysDialog.cpp
@@ -36,12 +36,12 @@ enum {
 	kMapCmd	= 'map '
 };
 
-KeysDialog::KeysDialog(const Common::String &title)
+KeysDialog::KeysDialog(const Common::U32String &title)
 	: GUI::Dialog("KeysDialog") {
 
-	new ButtonWidget(this, "KeysDialog.Map", _("Map"), 0, kMapCmd);
-	new ButtonWidget(this, "KeysDialog.Ok", _("OK"), 0, kOKCmd);
-	new ButtonWidget(this, "KeysDialog.Cancel", _("Cancel"), 0, kCloseCmd);
+	new ButtonWidget(this, "KeysDialog.Map", _("Map"), Common::U32String(""), kMapCmd);
+	new ButtonWidget(this, "KeysDialog.Ok", _("OK"), Common::U32String(""), kOKCmd);
+	new ButtonWidget(this, "KeysDialog.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
 
 	_actionsList = new ListWidget(this, "KeysDialog.List");
 	_actionsList->setNumberingMode(kListNumberingZero);
@@ -69,7 +69,7 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 
 	case kListSelectionChangedCmd:
 		if (_actionsList->getSelected() >= 0) {
-			Common::String selection;
+			Common::U32String selection;
 
 			uint16 key = Actions::Instance()->getMapping(_actionsList->getSelected());
 #ifdef __SYMBIAN32__
@@ -78,9 +78,9 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 				key = key - Common::ASCII_F1 + SDLK_F1;
 #endif
 			if (key != 0)
-				selection = Common::String::format(_("Associated key : %s"), SDL_GetKeyName((SDLKey)key));
+				selection = Common::U32String::format(_("Associated key : %s"), SDL_GetKeyName((SDLKey)key));
 			else
-				selection = Common::String::format(_("Associated key : none"));
+				selection = Common::U32String::format(_("Associated key : none"));
 
 			_keyMapping->setLabel(selection);
 			_keyMapping->markAsDirty();
@@ -90,7 +90,7 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 		if (_actionsList->getSelected() < 0) {
 			_actionTitle->setLabel(_("Please select an action"));
 		} else {
-			Common::String selection;
+			Common::U32String selection;
 
 			_actionSelected = _actionsList->getSelected();
 			uint16 key = Actions::Instance()->getMapping(_actionSelected);
@@ -100,9 +100,9 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 				key = key - Common::ASCII_F1 + SDLK_F1;
 #endif
 			if (key != 0)
-				selection = Common::String::format(_("Associated key : %s"), SDL_GetKeyName((SDLKey)key));
+				selection = Common::U32String::format(_("Associated key : %s"), SDL_GetKeyName((SDLKey)key));
 			else
-				selection = Common::String::format(_("Associated key : none"));
+				selection = Common::U32String::format(_("Associated key : none"));
 
 			_actionTitle->setLabel(_("Press the key to associate"));
 			_keyMapping->setLabel(selection);
@@ -130,14 +130,14 @@ void KeysDialog::handleKeyDown(Common::KeyState state){
 
 void KeysDialog::handleKeyUp(Common::KeyState state) {
 	if (Actions::Instance()->mappingActive()) {
-		Common::String selection;
+		Common::U32String selection;
 
 		Actions::Instance()->setMapping((ActionType)_actionSelected, state.ascii);
 
 		if (state.ascii != 0)
-			selection = Common::String::format(_("Associated key : %s"), SDL_GetKeyName((SDLKey) state.keycode));
+			selection = Common::U32String::format(_("Associated key : %s"), SDL_GetKeyName((SDLKey) state.keycode));
 		else
-			selection = Common::String::format(_("Associated key : none"));
+			selection = Common::U32String::format(_("Associated key : none"));
 
 		_actionTitle->setLabel(_("Choose an action to map"));
 		_keyMapping->setLabel(selection);
diff --git a/gui/KeysDialog.h b/gui/KeysDialog.h
index f9b8063242..4f4487d1c8 100644
--- a/gui/KeysDialog.h
+++ b/gui/KeysDialog.h
@@ -31,13 +31,14 @@
 #include "gui/dialog.h"
 #include "gui/widgets/list.h"
 #include "common/str.h"
+#include "common/ustr.h"
 #include "common/translation.h"
 
 namespace GUI {
 
 class KeysDialog : public GUI::Dialog {
 public:
-	KeysDialog(const Common::String &title = _("Choose an action to map"));
+	KeysDialog(const Common::U32String &title = _("Choose an action to map"));
 
 	void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
 	void handleKeyUp(Common::KeyState state) override;


Commit: b9e1ac102da32cb1aafbe8cf08d3f8113780fcae
    https://github.com/scummvm/scummvm/commit/b9e1ac102da32cb1aafbe8cf08d3f8113780fcae
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: properly cleanupHotkey with u32 const iterators

Changed paths:
    gui/widget.cpp


diff --git a/gui/widget.cpp b/gui/widget.cpp
index 9499676ba9..40c9befb91 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -268,13 +268,15 @@ uint8 Widget::parseHotkey(const Common::U32String &label) {
 }
 
 Common::U32String Widget::cleanupHotkey(const Common::U32String &label) {
-	Common::String res;
+	Common::U32String res = "";
 
-	for (uint i = 0; i < label.size(); i++)
-		if (label[i] != '~') 
-			res = res + label[i];
+	for (Common::U32String::const_iterator itr = label.begin(); itr != label.end(); itr++) {
+		if (*itr != '~') {
+			res += *itr;
+		}
+	}
 
-	return Common::U32String(res);
+	return res;
 }
 
 void Widget::read(const Common::U32String &str) {


Commit: 4506bcd9f3478460ab1db78e4ac514cce3cd189e
    https://github.com/scummvm/scummvm/commit/4506bcd9f3478460ab1db78e4ac514cce3cd189e
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Fix compilation errors

After rebasing to get even with master, some compilation errors occured. This commit fixes that.

Changed paths:
    backends/platform/sdl/sdl.cpp
    engines/glk/comprehend/game.cpp
    gui/predictivedialog.cpp
    gui/widgets/editable.cpp


diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index e640a698a3..8f317aa59b 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -496,7 +496,7 @@ bool OSystem_SDL::hasTextInClipboard() {
 }
 
 Common::U32String OSystem_SDL::getTextFromClipboard() {
-	if (!hasTextInClipboard()) return "";
+	if (!hasTextInClipboard()) return Common::U32String("");
 
 	char *text = SDL_GetClipboardText();
 	// The string returned by SDL is in UTF-8. Convert to the
@@ -510,7 +510,7 @@ Common::U32String OSystem_SDL::getTextFromClipboard() {
 		SDL_free(text);
 		text = conv_text;
 	}
-	Common::U32String strText = text;
+	Common::U32String strText(text);
 	SDL_free(text);
 
 	return strText;
diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index bb3843063e..8a795cf47c 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -1330,7 +1330,7 @@ void ComprehendGame::read_input() {
 
 		// Empty line, so toggle picture window visibility
 		g_comprehend->toggleGraphics();
-		g_comprehend->print(_("Picture window toggled\n"));
+		g_comprehend->print(Common::convertFromU32String(_("Picture window toggled\n")).c_str());
 
 		_updateFlags |= UPDATE_GRAPHICS;
 		update_graphics();
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index 1ad6619f46..ab1d4a2d0a 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -70,8 +70,8 @@ enum {
 PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 	new StaticTextWidget(this, "Predictive.Headline", Common::U32String("Enter Text"));
 
-	_button[kCancelAct] =  new ButtonWidget(this, "Predictive.Cancel",  Common::U32String(_("Cancel"))   , Common::U32String(""), kCancelCmd);
-	_button[kOkAct] =      new ButtonWidget(this, "Predictive.OK",      Common::U32String(_("Ok"))       , Common::U32String(""), kOkCmd);
+	_button[kCancelAct] =  new ButtonWidget(this, "Predictive.Cancel",  (_("Cancel"))   , Common::U32String(""), kCancelCmd);
+	_button[kOkAct] =      new ButtonWidget(this, "Predictive.OK",      (_("Ok"))       , Common::U32String(""), kOkCmd);
 
 	if (g_gui.useRTL()) {
 		/** If using RTL, swap the internal name of odd columns, to be flipped again when drawing.
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index 51ac4b4c9f..adfdd92cf1 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -274,7 +274,7 @@ void EditableWidget::defaultKeyDownHandler(Common::KeyState &state, bool &dirty,
 }
 
 int EditableWidget::getCaretOffset() const {
-	Common::String substr(_editString.c_str(), _caretPos);
+	Common::U32String substr(_editString.begin(), _editString.begin() + _caretPos);
 	return g_gui.getStringWidth(substr, _font) - _editScrollOffset;
 }
 


Commit: 521acaf459acae6ae8b4bfa5049d3c44ead86178
    https://github.com/scummvm/scummvm/commit/521acaf459acae6ae8b4bfa5049d3c44ead86178
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: RTL: Fix 1-off issue for drawing u32 strings

When RTL mode is on, previously it was fixed in a commit. This commit just reapplies that, for u32 string drawing.

Changed paths:
    graphics/VectorRendererSpec.cpp


diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index d7eb9bf34c..814150bdc4 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -1114,8 +1114,17 @@ drawString(const Graphics::Font *font, const Common::U32String &text, const Comm
 	drawArea = drawArea.findIntersectingRect(Common::Rect(0, 0, _activeSurface->w, _activeSurface->h));
 
 	if (!drawArea.isEmpty()) {
+		Common::Rect textArea(area);
+		textArea.right -= deltax;
+
 		Surface textAreaSurface = _activeSurface->getSubArea(drawArea);
-		font->drawString(&textAreaSurface, text, area.left - drawArea.left, offset - drawArea.top, area.width() - deltax, _fgColor, alignH, deltax, ellipsis);
+
+		if (deltax >= 0) {
+			textArea.left += deltax;
+			deltax = 0;
+		}
+
+		font->drawString(&textAreaSurface, text, textArea.left - drawArea.left, offset - drawArea.top, textArea.width(), _fgColor, alignH, deltax, ellipsis);
 	}
 }
 


Commit: da380a900209765688d68095275fb1d7f0ac1497
    https://github.com/scummvm/scummvm/commit/da380a900209765688d68095275fb1d7f0ac1497
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Fix issues with ustr formatting

- Fix one off error with 'pos'
- Fix last line not being inserted in osdMessage when display

Changed paths:
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    common/ustr.cpp
    common/ustr.h


diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index ae7e427840..acd46d8340 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2239,6 +2239,7 @@ void SurfaceSdlGraphicsManager::displayMessageOnOSD(const Common::U32String &msg
 	Common::Array<Common::U32String> lines;
 	Common::U32String singleMessage;
 
+	// GUI U32 TODO: This can be better optimized perhaps?
 	for (Common::U32String::const_iterator itr = msg.begin(); itr != msg.end(); itr++) {
 		if (*itr == '\n') {
 			lines.push_back(singleMessage);
@@ -2247,6 +2248,7 @@ void SurfaceSdlGraphicsManager::displayMessageOnOSD(const Common::U32String &msg
 		}
 		singleMessage += (*itr);
 	}
+	lines.push_back(singleMessage);
 
 	// Determine a rect which would contain the message string (clipped to the
 	// screen dimensions).
@@ -2465,7 +2467,7 @@ void SurfaceSdlGraphicsManager::handleScalerHotkeys(int scalefactor, int scalerT
 		}
 		if (newScalerName) {
 			const Common::U32String message = Common::U32String::format(
-				_("Active graphics filter: ") + Common::U32String("%s\n%d x %d -> %d x %d"),
+				_("Active graphics filter:") + Common::U32String("%s\n%d x %d -> %d x %d"),
 				newScalerName,
 				_videoMode.screenWidth, _videoMode.screenHeight,
 				_hwScreen->w, _hwScreen->h);
diff --git a/common/ustr.cpp b/common/ustr.cpp
index 965225fb92..4cdad85d93 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -559,23 +559,26 @@ int U32String::vformat(U32String &output, U32String::iterator fmt, va_list args)
 				string_temp = va_arg(args, char *);
 				len = strlen(string_temp);
 				length += len;
-				fmt -= 2;
+
 				output.deleteChar(pos); // remove %
 				output.deleteChar(pos); // remove s
 				output.insertString(string_temp, pos);
-				fmt += len;
-				pos += len;
+
+				fmt += len - 2;
+				pos += len - 1;
 				break;
 			case 'd':
 				int_temp = va_arg(args, int);
-				fmt -= 2;
-				output.deleteChar(pos); // remove %
-				output.deleteChar(pos); // remove d
 				itoa(int_temp, buffer, 10);
-				output.insertString(buffer, pos);
 				len = strlen(buffer);
 				length += len;
-				fmt += len;
+
+				output.deleteChar(pos); // remove %
+				output.deleteChar(pos); // remove d
+				output.insertString(buffer, pos);
+
+				fmt += len - 2;
+				pos += len - 1;
 				break;
 			default:
 				break;
@@ -583,7 +586,6 @@ int U32String::vformat(U32String &output, U32String::iterator fmt, va_list args)
 		}
 		pos++;
 	}
-
 	return length;
 }
 
diff --git a/common/ustr.h b/common/ustr.h
index 35489925ed..85cc4c189a 100644
--- a/common/ustr.h
+++ b/common/ustr.h
@@ -237,16 +237,13 @@ public:
 	void trim();
 
 	/**
-	 * Print formatted data into a String object. Similar to sprintf,
-	 * except that it stores the result in (variably sized) String
-	 * instead of a fixed size buffer.
+	 * Print formatted data into a U32String object.
 	 */
-	static U32String format(U32String fmt, ...) GCC_PRINTF(1, 2);
+	static U32String format(U32String fmt, ...);
 
 	/**
-	 * Print formatted data into a String object. Similar to vsprintf,
-	 * except that it stores the result in (variably sized) String
-	 * instead of a fixed size buffer.
+	 * Print formatted data into a U32String object. It takes in the
+	 * output by reference and works with iterators.
 	 */
 	static int vformat(U32String &output, U32String::iterator fmt, va_list args);
 


Commit: a9bfe352165809de85ca7e64858cc5b828b69976
    https://github.com/scummvm/scummvm/commit/a9bfe352165809de85ca7e64858cc5b828b69976
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: More issue fixes and general improvements

- Use the fake constructor for message dialog less often
- solve errors regarding comparision between string and u32string in midi
- solve errors in testbed/speech related to ttsMan->say
- fix unsigned comparision warning in tab.cpp
- fix issue with static strings and translations in sdl-graphics

Changed paths:
    audio/mididrv.cpp
    backends/graphics/sdl/sdl-graphics.cpp
    common/str.cpp
    common/translation.cpp
    common/ustr.cpp
    engines/agos/midi.cpp
    engines/engine.cpp
    engines/groovie/script.cpp
    engines/hugo/hugo.cpp
    engines/lab/engine.cpp
    engines/lab/processroom.cpp
    engines/lab/speciallocks.cpp
    engines/mohawk/myst_stacks/preview.cpp
    engines/testbed/speech.cpp
    engines/tony/tony.cpp
    engines/zvision/zvision.cpp
    gui/message.cpp
    gui/options.cpp
    gui/saveload-dialog.cpp
    gui/widget.cpp


diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp
index 85a2b46269..0b9cfc167f 100644
--- a/audio/mididrv.cpp
+++ b/audio/mididrv.cpp
@@ -177,7 +177,7 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 	if ((flags & MDT_PREFER_FLUID) && selDevStr == "auto") {
 		selDevStr = "fluidsynth";
 	}
-	DeviceHandle hdl = getDeviceHandle(selDevStr.empty() ? Common::String("auto") : selDevStr);
+	DeviceHandle hdl = getDeviceHandle(selDevStr.empty() ? Common::U32String("auto") : selDevStr);
 	DeviceHandle reslt = 0;
 
 	_forceTypeMT32 = false;
@@ -296,7 +296,7 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 
 			// Default to Null device here, since we also register a default null setting for
 			// the MT32 or GM device in the config manager.
-			hdl = getDeviceHandle(devStr.empty() ? Common::String("null") : devStr);
+			hdl = getDeviceHandle(devStr.empty() ? Common::U32String("null") : devStr);
 			const MusicType type = getMusicType(hdl);
 
 			// If we have a "Don't use GM/MT-32" setting we skip this part and jump
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index b56a768cdc..1c8e8b4cf6 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -419,7 +419,7 @@ Common::Keymap *SdlGraphicsManager::getKeymap() {
 #ifdef USE_SCALERS
 	struct ActionEntry {
 		const char *id;
-		U32String description;
+		const char *description;
 	};
 	static const ActionEntry filters[] = {
 			{ "FLT1", _s("Switch to nearest neighbour scaling") },
@@ -435,7 +435,7 @@ Common::Keymap *SdlGraphicsManager::getKeymap() {
 	};
 
 	for (uint i = 0; i < ARRAYSIZE(filters); i++) {
-		act = new Action(filters[i].id, filters[i].description);
+		act = new Action(filters[i].id, _(filters[i].description));
 		act->addDefaultInputMapping(String::format("C+A+%d", i + 1));
 		act->addDefaultInputMapping(String::format("C+A+KP%d", i + 1));
 		act->setCustomBackendActionEvent(kActionSetScaleFilter1 + i);
diff --git a/common/str.cpp b/common/str.cpp
index 6189433bf3..8dff96763f 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -126,8 +126,7 @@ String::String(char c)
 }
 
 String::String(const U32String &str) {
-	String internString = str.encode();
-	String::String(internString);
+	*this = String(str.encode());
 }
 
 String::~String() {
diff --git a/common/translation.cpp b/common/translation.cpp
index 46d333e8c1..d24cf12cbf 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -115,7 +115,7 @@ U32String TranslationManager::getTranslation(const char *message) const {
 U32String TranslationManager::getTranslation(const char *message, const char *context) const {
 	// If no language is set or message is empty, return msgid as is
 	if (_currentTranslationMessages.empty() || *message == '\0')
-		return message;
+		return U32String(message);
 
 	// Binary-search for the msgid
 	int leftIndex = 0;
diff --git a/common/ustr.cpp b/common/ustr.cpp
index 4cdad85d93..54d8fb17aa 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "common/ustr.h"
+#include "common/str.h"
 #include "common/memorypool.h"
 #include "common/util.h"
 #include "unicode-bidi.h"
@@ -550,7 +551,7 @@ int U32String::vformat(U32String &output, U32String::iterator fmt, va_list args)
 
 	char buffer[512];
 
-	while (fmt != output.end() && pos < output.size()) {
+	while (fmt != output.end() && pos < (int)output.size()) {
 		ch = *fmt++;
 		if (ch == '%') {
 			switch (ch = *fmt++)
diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp
index 5977b4009e..1811b8e3fa 100644
--- a/engines/agos/midi.cpp
+++ b/engines/agos/midi.cpp
@@ -139,11 +139,12 @@ int MidiPlayer::open(int gameType, bool isDemo) {
 		case MT_GM:
 			if (!ConfMan.getBool("native_mt32")) {
 				// Not a real MT32 / no MUNT
-				::GUI::MessageDialog dialog(("You appear to be using a General MIDI device,\n"
+				::GUI::MessageDialog dialog(Common::convertToU32String((
+											"You appear to be using a General MIDI device,\n"
 											"but your game only supports Roland MT32 MIDI.\n"
 											"We try to map the Roland MT32 instruments to\n"
 											"General MIDI ones. It is still possible that\n"
-											"some tracks sound incorrect."));
+											"some tracks sound incorrect.")));
 				dialog.runModal();
 			}
 			// Switch to MT32 driver in any case
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 70e4ed44bc..0f50871425 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -319,7 +319,7 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
 			_("Could not switch to resolution '%dx%d'."), width, height);
 
 		GUIErrorMessage(message);
-		error("%s", message.c_str());
+		error("%s", message.encode().c_str());
 	}
 
 	// Just show warnings then these occur:
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 9a5d837233..ede1951990 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -1494,7 +1494,7 @@ void Script::o_checkvalidsaves() {
 	while (it != list.end()) {
 		int8 slot = it->getSaveSlot();
 		if (SaveLoad::isSlotValid(slot)) {
-			debugC(2, kDebugScript, "  Found valid savegame: %s", it->getDescription().c_str());
+			debugC(2, kDebugScript, "  Found valid savegame: %s", it->getDescription().encode().c_str());
 
 			// Mark this slot as used
 			setVariable(slot, 1);
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index c03c0b03a1..82350ab1d5 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -435,7 +435,7 @@ bool HugoEngine::loadHugoDat() {
 	if (!in.isOpen()) {
 		Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
 		GUIErrorMessage(errorMessage);
-		warning("%s", errorMessage.c_str());
+		warning("%s", errorMessage.encode().c_str());
 		return false;
 	}
 
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index f2913b229e..0703edb64c 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -122,7 +122,7 @@ void LabEngine::handleTrialWarning() {
 			// Wyrmkeep trial version
 			_extraGameFeatures = GF_WINDOWS_TRIAL;
 
-			GUI::MessageDialog trialMessage(_("This is a trial Windows version of the game. To play the full version, you will need to use the original interpreter and purchase a key from Wyrmkeep"));
+			GUI::MessageDialog trialMessage(Common::convertToU32String("This is a trial Windows version of the game. To play the full version, you will need to use the original interpreter and purchase a key from Wyrmkeep"));
 			trialMessage.runModal();
 		}
 		else {
diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp
index c703802174..3860bd6448 100644
--- a/engines/lab/processroom.cpp
+++ b/engines/lab/processroom.cpp
@@ -327,7 +327,7 @@ void LabEngine::doActions(const ActionList &actionList) {
 				// This is a Wyrmkeep Windows trial version, thus stop at this
 				// point, since we can't check for game payment status
 				_graphics->readPict(getPictName(true));
-				GUI::MessageDialog trialMessage(_("This is the end of the trial version. You can play the full game using the original interpreter from Wyrmkeep"));
+				GUI::MessageDialog trialMessage(Common::convertToU32String("This is the end of the trial version. You can play the full game using the original interpreter from Wyrmkeep"));
 				trialMessage.runModal();
 				break;
 			}
diff --git a/engines/lab/speciallocks.cpp b/engines/lab/speciallocks.cpp
index 361e069843..ef7f588bbd 100644
--- a/engines/lab/speciallocks.cpp
+++ b/engines/lab/speciallocks.cpp
@@ -146,7 +146,7 @@ void SpecialLocks::changeTile(uint16 col, uint16 row) {
 
 	if (scrolltype != -1) {
 		if (_vm->getFeatures() & GF_WINDOWS_TRIAL) {
-			GUI::MessageDialog trialMessage(_("This puzzle is not available in the trial version of the game"));
+			GUI::MessageDialog trialMessage(Common::convertToU32String("This puzzle is not available in the trial version of the game"));
 			trialMessage.runModal();
 			return;
 		}
diff --git a/engines/mohawk/myst_stacks/preview.cpp b/engines/mohawk/myst_stacks/preview.cpp
index eaa311b75b..5152674604 100644
--- a/engines/mohawk/myst_stacks/preview.cpp
+++ b/engines/mohawk/myst_stacks/preview.cpp
@@ -86,7 +86,7 @@ void Preview::o_fadeFromBlack(uint16 var, const ArgumentsArray &args) {
 
 void Preview::o_stayHere(uint16 var, const ArgumentsArray &args) {
 	// Nuh-uh! No leaving the library in the demo!
-	GUI::MessageDialog dialog("You can't leave the library in the demo.");
+	GUI::MessageDialog dialog(Common::convertToU32String("You can't leave the library in the demo."));
 	dialog.runModal();
 }
 
diff --git a/engines/testbed/speech.cpp b/engines/testbed/speech.cpp
index 056207efc6..034e327630 100644
--- a/engines/testbed/speech.cpp
+++ b/engines/testbed/speech.cpp
@@ -164,11 +164,11 @@ TestExitStatus Speechtests::testStopAndSpeak() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say("Testing text to speech, the speech should stop after approximately a second after it started, so it shouldn't have the time to read this.");
+	ttsMan->say(Common::convertToU32String("Testing text to speech, the speech should stop after approximately a second after it started, so it shouldn't have the time to read this."));
 	g_system->delayMillis(1000);
 	ttsMan->stop();
-	ttsMan->say("Now starting the second sentence.", Common::TextToSpeechManager::QUEUE);
-	ttsMan->say("You should hear that one in totality.", Common::TextToSpeechManager::QUEUE);
+	ttsMan->say(Common::convertToU32String("Now starting the second sentence."), Common::TextToSpeechManager::QUEUE);
+	ttsMan->say(Common::convertToU32String("You should hear that one in totality."), Common::TextToSpeechManager::QUEUE);
 	if (!ttsMan->isSpeaking()) {
 		Testsuite::logDetailedPrintf("Male TTS failed\n");
 		return kTestFailed;
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index 4e0272541a..99fd5d359e 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -215,11 +215,11 @@ bool TonyEngine::loadTonyDat() {
 	int minVer = in.readByte();
 
 	if ((majVer != TONY_DAT_VER_MAJ) || (minVer != TONY_DAT_VER_MIN)) {
-		msg = Common::String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.").encode().c_str(),
+		msg = Common::U32String::format(
+			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
 			filename.c_str(), TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer);
 		GUIErrorMessage(msg);
-		warning("%s", msg.c_str());
+		warning("%s", msg.encode().c_str());
 
 		return false;
 	}
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index 842529ba48..f630325b60 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -308,7 +308,7 @@ Common::Error ZVision::run() {
 	}
 
 	if (!foundAllFonts) {
-		GUI::MessageDialog dialog(
+		GUI::MessageDialog dialog(Common::convertToU32String(
 				"Before playing this game, you'll need to copy the required "
 				"fonts into ScummVM's extras directory, or into the game directory. "
 				"On Windows, you'll need the following font files from the Windows "
@@ -318,7 +318,7 @@ Common::Error ZVision::run() {
 				"fonts from the font package you choose, i.e., LiberationMono, "
 				"LiberationSans and LiberationSerif, or FreeMono, FreeSans and "
 				"FreeSerif respectively."
-		);
+		));
 		dialog.runModal();
 		quitGame();
 		return Common::kUnknownError;
diff --git a/gui/message.cpp b/gui/message.cpp
index 9c23120d3a..401cb30ce0 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -103,7 +103,7 @@ MessageDialog::MessageDialog(const Common::U32String &message, Common::U32String
 MessageDialog::MessageDialog(const char *message, const char *defaultButton, const char *altButton, Graphics::TextAlign alignment)
 	: Dialog(30, 20, 260, 124) {
 
-	MessageDialog::MessageDialog(Common::U32String(message), Common::U32String(defaultButton), Common::U32String(altButton), alignment);
+	MessageDialog(Common::U32String(message), Common::U32String(defaultButton), Common::U32String(altButton), alignment);
 }
 
 void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/options.cpp b/gui/options.cpp
index 26d91040ee..20caef9f3d 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2572,7 +2572,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		break;
 	}
 	case kConnectStorageCmd: {
-		Common::U32String code = "";
+		Common::U32String code("");
 		if (_storageWizardCodeBox)
 			code = _storageWizardCodeBox->getEditString();
 		if (code.size() == 0)
@@ -2976,7 +2976,7 @@ void GlobalOptionsDialog::reflowNetworkTabLayout() {
 
 #ifdef USE_LIBCURL
 void GlobalOptionsDialog::storageConnectionCallback(Networking::ErrorResponse response) {
-	Common::U32String message = "...";
+	Common::U32String message("...");
 	if (!response.failed && !response.interrupted) {
 		// success
 		g_system->displayMessageOnOSD(_("Storage connected."));
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index c25c214f11..be02d86bd0 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -1102,7 +1102,7 @@ void SaveLoadChooserGrid::updateSaves() {
 		} else {
 			curButton.button->setGfx(kThumbnailWidth, kThumbnailHeight2, 0, 0, 0);
 		}
-		curButton.description->setLabel(Common::String::format("%d. %s", saveSlot, desc.getDescription().c_str()));
+		curButton.description->setLabel(Common::String::format("%d. %s", saveSlot, desc.getDescription().encode().c_str()));
 
 		Common::U32String tooltip(_("Name: "));
 		tooltip += desc.getDescription();
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 40c9befb91..871b1ad753 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -268,7 +268,7 @@ uint8 Widget::parseHotkey(const Common::U32String &label) {
 }
 
 Common::U32String Widget::cleanupHotkey(const Common::U32String &label) {
-	Common::U32String res = "";
+	Common::U32String res("");
 
 	for (Common::U32String::const_iterator itr = label.begin(); itr != label.end(); itr++) {
 		if (*itr != '~') {


Commit: c142360bf4dc9fc442f1a2d591c3eb929a7859ba
    https://github.com/scummvm/scummvm/commit/c142360bf4dc9fc442f1a2d591c3eb929a7859ba
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Add minimal implementation for itoa (base 10)

Changed paths:
    common/ustr.cpp
    common/ustr.h


diff --git a/common/ustr.cpp b/common/ustr.cpp
index 54d8fb17aa..56171812db 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -554,8 +554,7 @@ int U32String::vformat(U32String &output, U32String::iterator fmt, va_list args)
 	while (fmt != output.end() && pos < (int)output.size()) {
 		ch = *fmt++;
 		if (ch == '%') {
-			switch (ch = *fmt++)
-			{
+			switch (ch = *fmt++) {
 			case 's':
 				string_temp = va_arg(args, char *);
 				len = strlen(string_temp);
@@ -590,4 +589,31 @@ int U32String::vformat(U32String &output, U32String::iterator fmt, va_list args)
 	return length;
 }
 
+char* U32String::itoa(int num, char* str, int base) {
+	int i = 0;
+
+	// go digit by digit
+	while (num != 0) {
+		int rem = num % base;
+		str[i++] = rem + '0';
+		num /= base;
+	}
+
+	// append string terminator
+	str[i] = '\0';
+	int k = 0;
+	int j = i - 1;
+
+	// reverse the string
+	while (k < j) {
+		char temp = str[k];
+		str[k] = str[j];
+		str[j] = temp;
+		k++;
+		j--;
+	}
+
+	return str;
+}
+
 } // End of namespace Common
diff --git a/common/ustr.h b/common/ustr.h
index 85cc4c189a..9488e08cf4 100644
--- a/common/ustr.h
+++ b/common/ustr.h
@@ -247,6 +247,12 @@ public:
 	 */
 	static int vformat(U32String &output, U32String::iterator fmt, va_list args);
 
+	/**
+	 * Helper function for vformat, convert an int to string
+	 * minimal implementation, only for base 10
+	*/
+	static char* itoa(int num, char* str, int base);
+
 private:
 	void makeUnique();
 	void ensureCapacity(uint32 new_size, bool keep_old);


Commit: a9a816e7fecf46dd2936878e5d1421aa8534791f
    https://github.com/scummvm/scummvm/commit/a9a816e7fecf46dd2936878e5d1421aa8534791f
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Improve U32String::format

- Keep adding chars and strings to output instead of deleting and inserting at specific pos
- Use const_iterators for input

Changed paths:
    common/ustr.cpp
    common/ustr.h


diff --git a/common/ustr.cpp b/common/ustr.cpp
index 56171812db..98f2ce6d30 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -528,20 +528,19 @@ void U32String::trim() {
 }
 
 U32String U32String::format(U32String fmt, ...) {
-	U32String output = fmt;
+	U32String output;
 	int len;
 
 	va_list va;
 	va_start(va, fmt);
-	len = U32String::vformat(output, output.begin(), va);
+	len = U32String::vformat(fmt.begin(), fmt.end(), output, va);
 	va_end(va);
 
 	return output;
 }
 
-int U32String::vformat(U32String &output, U32String::iterator fmt, va_list args) {
+int U32String::vformat(U32String::const_iterator fmt, const U32String::const_iterator inputItrEnd, U32String &output, va_list args) {
 	int int_temp;
-	char char_temp;
 	char *string_temp;
 
 	char ch;
@@ -551,7 +550,7 @@ int U32String::vformat(U32String &output, U32String::iterator fmt, va_list args)
 
 	char buffer[512];
 
-	while (fmt != output.end() && pos < (int)output.size()) {
+	while (fmt != inputItrEnd) {
 		ch = *fmt++;
 		if (ch == '%') {
 			switch (ch = *fmt++) {
@@ -560,11 +559,7 @@ int U32String::vformat(U32String &output, U32String::iterator fmt, va_list args)
 				len = strlen(string_temp);
 				length += len;
 
-				output.deleteChar(pos); // remove %
-				output.deleteChar(pos); // remove s
 				output.insertString(string_temp, pos);
-
-				fmt += len - 2;
 				pos += len - 1;
 				break;
 			case 'd':
@@ -573,16 +568,15 @@ int U32String::vformat(U32String &output, U32String::iterator fmt, va_list args)
 				len = strlen(buffer);
 				length += len;
 
-				output.deleteChar(pos); // remove %
-				output.deleteChar(pos); // remove d
 				output.insertString(buffer, pos);
-
-				fmt += len - 2;
 				pos += len - 1;
 				break;
 			default:
+				warning("Unexpected formatting type for U32String::Format.");
 				break;
 			}
+		} else {
+			output += *(fmt - 1);
 		}
 		pos++;
 	}
diff --git a/common/ustr.h b/common/ustr.h
index 9488e08cf4..7efbca5c11 100644
--- a/common/ustr.h
+++ b/common/ustr.h
@@ -245,7 +245,7 @@ public:
 	 * Print formatted data into a U32String object. It takes in the
 	 * output by reference and works with iterators.
 	 */
-	static int vformat(U32String &output, U32String::iterator fmt, va_list args);
+	static int vformat(U32String::const_iterator fmt, const U32String::const_iterator inputItrEnd, U32String &output, va_list args);
 
 	/**
 	 * Helper function for vformat, convert an int to string


Commit: 4bcac1df171ae51e2360f8b43c83f09daa5e0906
    https://github.com/scummvm/scummvm/commit/4bcac1df171ae51e2360f8b43c83f09daa5e0906
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use u32 in clipboards for MacOS

Changed paths:
    backends/platform/sdl/macosx/macosx.cpp
    backends/platform/sdl/macosx/macosx.h
    backends/platform/sdl/macosx/macosx_wrapper.h
    backends/platform/sdl/macosx/macosx_wrapper.mm


diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp
index 595d650d4f..a87990df2c 100644
--- a/backends/platform/sdl/macosx/macosx.cpp
+++ b/backends/platform/sdl/macosx/macosx.cpp
@@ -138,11 +138,11 @@ bool OSystem_MacOSX::hasTextInClipboard() {
 	return hasTextInClipboardMacOSX();
 }
 
-Common::String OSystem_MacOSX::getTextFromClipboard() {
+Common::U32String OSystem_MacOSX::getTextFromClipboard() {
 	return getTextFromClipboardMacOSX();
 }
 
-bool OSystem_MacOSX::setTextInClipboard(const Common::String &text) {
+bool OSystem_MacOSX::setTextInClipboard(const Common::U32String &text) {
 	return setTextInClipboardMacOSX(text);
 }
 
diff --git a/backends/platform/sdl/macosx/macosx.h b/backends/platform/sdl/macosx/macosx.h
index e4b5b2a631..7a9de4b12b 100644
--- a/backends/platform/sdl/macosx/macosx.h
+++ b/backends/platform/sdl/macosx/macosx.h
@@ -34,8 +34,8 @@ public:
 	virtual bool displayLogFile();
 
 	virtual bool hasTextInClipboard();
-	virtual Common::String getTextFromClipboard();
-	virtual bool setTextInClipboard(const Common::String &text);
+	virtual Common::U32String getTextFromClipboard();
+	virtual bool setTextInClipboard(const Common::U32String &text);
 
 	virtual bool openUrl(const Common::String &url);
 
diff --git a/backends/platform/sdl/macosx/macosx_wrapper.h b/backends/platform/sdl/macosx/macosx_wrapper.h
index ca4e433890..506dfd2922 100644
--- a/backends/platform/sdl/macosx/macosx_wrapper.h
+++ b/backends/platform/sdl/macosx/macosx_wrapper.h
@@ -24,10 +24,11 @@
 #define PLATFORM_SDL_MACOSX_WRAPPER_H
 
 #include <common/str.h>
+#include <common/ustr.h>
 
 bool hasTextInClipboardMacOSX();
-Common::String getTextFromClipboardMacOSX();
-bool setTextInClipboardMacOSX(const Common::String &text);
+Common::U32String getTextFromClipboardMacOSX();
+bool setTextInClipboardMacOSX(const Common::U32String &text);
 Common::String getDesktopPathMacOSX();
 
 #endif
diff --git a/backends/platform/sdl/macosx/macosx_wrapper.mm b/backends/platform/sdl/macosx/macosx_wrapper.mm
index 32dfa040cc..7de2089c5d 100644
--- a/backends/platform/sdl/macosx/macosx_wrapper.mm
+++ b/backends/platform/sdl/macosx/macosx_wrapper.mm
@@ -36,39 +36,46 @@ bool hasTextInClipboardMacOSX() {
 	return [[NSPasteboard generalPasteboard] availableTypeFromArray:[NSArray arrayWithObject:NSStringPboardType]] != nil;
 }
 
-Common::String getTextFromClipboardMacOSX() {
+Common::U32String getTextFromClipboardMacOSX() {
 	if (!hasTextInClipboardMacOSX())
-		return Common::String();
+		return Common::U32String();
 	// Note: on OS X 10.6 and above it is recommanded to use NSPasteboardTypeString rather than NSStringPboardType.
 	// But since we still target older version use NSStringPboardType.
 	NSPasteboard *pb = [NSPasteboard generalPasteboard];
 	NSString *str = [pb  stringForType:NSStringPboardType];
 	if (str == nil)
-		return Common::String();
+		return Common::U32String();
 
 	// If translations are supported, use the current TranslationManager charset and otherwise
 	// use ASCII. If the string cannot be represented using the requested encoding we get a null
 	// pointer below, which is fine as ScummVM would not know what to do with the string anyway.
-#ifdef USE_TRANSLATION
-	NSString* encStr = [NSString stringWithCString:TransMan.getCurrentCharset().c_str() encoding:NSASCIIStringEncoding];
-	NSStringEncoding encoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)encStr));
+#ifdef SCUMM_LITTLE_ENDIAN
+	NSStringEncoding stringEncoding = NSUTF32LittleEndianStringEncoding;
 #else
-	NSStringEncoding encoding = NSISOLatin1StringEncoding;
+	NSStringEncoding stringEncoding = NSUTF32BigEndianStringEncoding;
 #endif
-	return Common::String([str cStringUsingEncoding:encoding]);
+	NSUInteger textLength = [str length];
+	uint32 *text = new uint32[textLength];
+	if (![str getBytes:text maxLength:4*textLength usedLength:NULL encoding: stringEncoding options:0 range:NSMakeRange(0, textLength-1) remainingRange:NULL]) {
+		delete[] text;
+		return Common::U32String();
+	}
+	Common::U32String u32String(text, textLength);
+	delete[] text;
+
+	return u32String;
 }
 
-bool setTextInClipboardMacOSX(const Common::String &text) {
+bool setTextInClipboardMacOSX(const Common::U32String &text) {
 	NSPasteboard *pb = [NSPasteboard generalPasteboard];
 	[pb declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:nil];
 
-#ifdef USE_TRANSLATION
-	NSString* encStr = [NSString stringWithCString:TransMan.getCurrentCharset().c_str() encoding:NSASCIIStringEncoding];
-	NSStringEncoding encoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)encStr));
+#ifdef SCUMM_LITTLE_ENDIAN
+	NSStringEncoding stringEncoding = NSUTF32LittleEndianStringEncoding;
 #else
-	NSStringEncoding encoding = NSISOLatin1StringEncoding;
+	NSStringEncoding stringEncoding = NSUTF32BigEndianStringEncoding;
 #endif
-	return [pb setString:[NSString stringWithCString:text.c_str() encoding:encoding] forType:NSStringPboardType];
+	return [pb setString:[[NSString alloc] initWithBytes:text.c_str() length:4*text.size() encoding: stringEncoding] forType:NSStringPboardType];
 }
 
 Common::String getDesktopPathMacOSX() {


Commit: 8cfa8a55890f6a0145e6f0b7d49f5c01988d4ca8
    https://github.com/scummvm/scummvm/commit/8cfa8a55890f6a0145e6f0b7d49f5c01988d4ca8
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use u32 for menu items in mac

Changed paths:
    backends/platform/sdl/macosx/appmenu_osx.mm


diff --git a/backends/platform/sdl/macosx/appmenu_osx.mm b/backends/platform/sdl/macosx/appmenu_osx.mm
index 0263b95fe2..74d5d003f5 100644
--- a/backends/platform/sdl/macosx/appmenu_osx.mm
+++ b/backends/platform/sdl/macosx/appmenu_osx.mm
@@ -25,6 +25,7 @@
 
 #include "backends/platform/sdl/macosx/appmenu_osx.h"
 #include "common/translation.h"
+#include "common/ustr.h"
 
 #include "backends/platform/sdl/macosx/macosx-compat.h"
 #include <Cocoa/Cocoa.h>
@@ -132,16 +133,21 @@ static void openFromBundle(NSString *file) {
 }
 @end
 
-NSString *constructNSStringFromCString(const char *rawCString, CFStringEncoding stringEncoding) {
-	return (NSString *)CFStringCreateWithCString(NULL, rawCString, stringEncoding);
+NSString *constructNSStringFromU32String(const Common::U32String &rawU32String) {
+#ifdef SCUMM_LITTLE_ENDIAN
+	NSStringEncoding stringEncoding = NSUTF32LittleEndianStringEncoding;
+#else
+	NSStringEncoding stringEncoding = NSUTF32BigEndianStringEncoding;
+#endif
+	return [[NSString alloc] initWithBytes:rawU32String.c_str() length:4*rawU32String.size() encoding: stringEncoding];
 }
 
-static NSMenu *addMenu(const char *title, CFStringEncoding encoding, NSString *key, SEL setAs) {
+static NSMenu *addMenu(const Common::U32String &title, NSString *key, SEL setAs) {
 	if (setAs && ![NSApp respondsToSelector:setAs]) {
 		return nil;
 	}
 
-	NSString *str = constructNSStringFromCString(title, encoding);
+	NSString *str = constructNSStringFromU32String(title);
 	NSMenu *menu = [[NSMenu alloc] initWithTitle:str];
 
 	NSMenuItem *menuItem = [[NSMenuItem alloc] initWithTitle:str action:nil keyEquivalent:key];
@@ -158,8 +164,8 @@ static NSMenu *addMenu(const char *title, CFStringEncoding encoding, NSString *k
 	return menu;
 }
 
-static void addMenuItem(const char *title, CFStringEncoding encoding, id target, SEL selector, NSString *key, NSMenu *parent, NSEventModifierFlags flags = 0) {
-	NSString *nsString = constructNSStringFromCString(title, encoding);
+static void addMenuItem(const Common::U32String &title, id target, SEL selector, NSString *key, NSMenu *parent, NSEventModifierFlags flags = 0) {
+	NSString *nsString = constructNSStringFromU32String(title);
 	NSMenuItem *menuItem = [[NSMenuItem alloc]
 							initWithTitle:nsString
 							action:selector
@@ -189,48 +195,38 @@ void replaceApplicationMenuItems() {
 	}
 
 	NSString *nsString = NULL;
-
-	// Get current encoding
-#ifdef USE_TRANSLATION
-	nsString = constructNSStringFromCString(TransMan.getCurrentCharset().c_str(), NSASCIIStringEncoding);
-	CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)nsString);
-	[nsString release];
-#else
-	CFStringEncoding stringEncoding = kCFStringEncodingASCII;
-#endif
-
-	NSMenu *appleMenu = addMenu("ScummVM", kCFStringEncodingASCII, @"", @selector(setAppleMenu:));
+	NSMenu *appleMenu = addMenu(Common::U32String("ScummVM"), @"", @selector(setAppleMenu:));
 	if (appleMenu) {
-		addMenuItem(_("About ScummVM"), stringEncoding, nil, @selector(orderFrontStandardAboutPanel:), @"", appleMenu);
+		addMenuItem(_("About ScummVM"), nil, @selector(orderFrontStandardAboutPanel:), @"", appleMenu);
 		[appleMenu addItem:[NSMenuItem separatorItem]];
-		addMenuItem(_("Hide ScummVM"), stringEncoding, nil, @selector(hide:), @"h", appleMenu);
-		addMenuItem(_("Hide Others"), stringEncoding, nil, @selector(hideOtherApplications:), @"h", appleMenu, (NSEventModifierFlagOption|NSEventModifierFlagCommand));
-		addMenuItem(_("Show All"), stringEncoding, nil, @selector(unhideAllApplications:), @"", appleMenu);
+		addMenuItem(_("Hide ScummVM"), nil, @selector(hide:), @"h", appleMenu);
+		addMenuItem(_("Hide Others"), nil, @selector(hideOtherApplications:), @"h", appleMenu, (NSEventModifierFlagOption|NSEventModifierFlagCommand));
+		addMenuItem(_("Show All"), nil, @selector(unhideAllApplications:), @"", appleMenu);
 		[appleMenu addItem:[NSMenuItem separatorItem]];
-		addMenuItem(_("Quit ScummVM"), stringEncoding, nil, @selector(terminate:), @"q", appleMenu);
+		addMenuItem(_("Quit ScummVM"), nil, @selector(terminate:), @"q", appleMenu);
 	}
 
-	NSMenu *windowMenu = addMenu(_("Window"), stringEncoding, @"", @selector(setWindowsMenu:));
+	NSMenu *windowMenu = addMenu(_("Window"), @"", @selector(setWindowsMenu:));
 	if (windowMenu) {
-		addMenuItem(_("Minimize"), stringEncoding, nil, @selector(performMiniaturize:), @"m", windowMenu);
+		addMenuItem(_("Minimize"), nil, @selector(performMiniaturize:), @"m", windowMenu);
 	}
 
-	NSMenu *helpMenu = addMenu(_("Help"), stringEncoding, @"", @selector(setHelpMenu:));
+	NSMenu *helpMenu = addMenu(_("Help"), @"", @selector(setHelpMenu:));
 	if (helpMenu) {
 		if (!delegate) {
 			delegate = [[ScummVMMenuHandler alloc] init];
 		}
-		addMenuItem(_("User Manual"), stringEncoding, delegate, @selector(openUserManual), @"", helpMenu);
+		addMenuItem(_("User Manual"), delegate, @selector(openUserManual), @"", helpMenu);
 		[helpMenu addItem:[NSMenuItem separatorItem]];
-		addMenuItem(_("General Information"), stringEncoding, delegate, @selector(openReadme), @"", helpMenu);
-		addMenuItem(_("What's New in ScummVM"), stringEncoding, delegate, @selector(openNews), @"", helpMenu);
+		addMenuItem(_("General Information"), delegate, @selector(openReadme), @"", helpMenu);
+		addMenuItem(_("What's New in ScummVM"), delegate, @selector(openNews), @"", helpMenu);
 		[helpMenu addItem:[NSMenuItem separatorItem]];
-		addMenuItem(_("Credits"), stringEncoding, delegate, @selector(openCredits), @"", helpMenu);
-		addMenuItem(_("GPL License"), stringEncoding, delegate, @selector(openLicenseGPL), @"", helpMenu);
-		addMenuItem(_("LGPL License"), stringEncoding, delegate, @selector(openLicenseLGPL), @"", helpMenu);
-		addMenuItem(_("Freefont License"), stringEncoding, delegate, @selector(openLicenseFreefont), @"", helpMenu);
-		addMenuItem(_("OFL License"), stringEncoding, delegate, @selector(openLicenseOFL), @"", helpMenu);
-		addMenuItem(_("BSD License"), stringEncoding, delegate, @selector(openLicenseBSD), @"", helpMenu);
+		addMenuItem(_("Credits"), delegate, @selector(openCredits), @"", helpMenu);
+		addMenuItem(_("GPL License"), delegate, @selector(openLicenseGPL), @"", helpMenu);
+		addMenuItem(_("LGPL License"), delegate, @selector(openLicenseLGPL), @"", helpMenu);
+		addMenuItem(_("Freefont License"), delegate, @selector(openLicenseFreefont), @"", helpMenu);
+		addMenuItem(_("OFL License"), delegate, @selector(openLicenseOFL), @"", helpMenu);
+		addMenuItem(_("BSD License"), delegate, @selector(openLicenseBSD), @"", helpMenu);
 	}
 
 	[appleMenu release];


Commit: e91f968992f35a9f7edfea78871b99ce43994a5e
    https://github.com/scummvm/scummvm/commit/e91f968992f35a9f7edfea78871b99ce43994a5e
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: encode and use c strings for translations in macos dialogs

Changed paths:
    backends/dialogs/macosx/macosx-dialogs.mm


diff --git a/backends/dialogs/macosx/macosx-dialogs.mm b/backends/dialogs/macosx/macosx-dialogs.mm
index 4927b2875b..2edc609146 100644
--- a/backends/dialogs/macosx/macosx-dialogs.mm
+++ b/backends/dialogs/macosx/macosx-dialogs.mm
@@ -82,7 +82,7 @@
 #else
 		CFStringEncoding stringEncoding = kCFStringEncodingASCII;
 #endif
-		CFStringRef hiddenFilesString = CFStringCreateWithCString(0, _("Show hidden files"), stringEncoding);
+		CFStringRef hiddenFilesString = CFStringCreateWithCString(0, _("Show hidden files").encode().c_str(), stringEncoding);
 		[showHiddenFilesButton setTitle:(NSString*)hiddenFilesString];
 		CFRelease(hiddenFilesString);
 
@@ -143,7 +143,7 @@ Common::DialogManager::DialogResult MacOSXDialogManager::showFileBrowser(const c
 
 	// Convert labels to NSString
 	CFStringRef titleRef = CFStringCreateWithCString(0, title, stringEncoding);
-	CFStringRef chooseRef = CFStringCreateWithCString(0, _("Choose"), stringEncoding);
+	CFStringRef chooseRef = CFStringCreateWithCString(0, _("Choose").encode().c_str(), stringEncoding);
 
 	beginDialog();
 


Commit: 79c518e9c1c164316914e0174606c8afa93b3cc7
    https://github.com/scummvm/scummvm/commit/79c518e9c1c164316914e0174606c8afa93b3cc7
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: I18N: Remove codepages from create_translations tool

- Removed because all .po files will use UTF-8

Changed paths:
    devtools/create_translations/create_translations.cpp


diff --git a/devtools/create_translations/create_translations.cpp b/devtools/create_translations/create_translations.cpp
index 01e6446cb8..31857de166 100644
--- a/devtools/create_translations/create_translations.cpp
+++ b/devtools/create_translations/create_translations.cpp
@@ -107,12 +107,7 @@ void writeString(FILE *fp, const char *string) {
 
 // Main
 int main(int argc, char *argv[]) {
-	std::vector<Codepage *> codepages;
-	// Add default codepages, we won't store them in the output later on
-	codepages.push_back(new Codepage("ascii", 0));
-	codepages.push_back(new Codepage("iso-8859-1", 0));
-
-	// Build the translation and codepage list
+	// Build the translation
 	PoMessageList messageIds;
 	std::vector<PoMessageEntryList *> translations;
 	int numLangs = 0;
@@ -125,32 +120,6 @@ int main(int argc, char *argv[]) {
 				translations.push_back(po);
 				++numLangs;
 			}
-		} else if (scumm_stricmp(argv[i] + len - 2, "cp") == 0) {
-			// Else try to parse an codepage
-			Codepage *co = parseCodepageMapping(argv[i]);
-			if (co)
-				codepages.push_back(co);
-		}
-	}
-
-	// Parse all charset mappings
-	for (int i = 0; i < numLangs; ++i) {
-		bool found = false;
-		for (size_t j = 0; j < codepages.size(); ++j) {
-			if (scumm_stricmp(codepages[j]->getName().c_str(), translations[i]->charset()) == 0) {
-				found = true;
-				break;
-			}
-		}
-
-		// In case the codepage was not found error out
-		if (!found) {
-			fprintf(stderr, "ERROR: No codepage mapping for codepage \"%s\" present!\n", translations[i]->charset());
-			for (size_t j = 0; j < translations.size(); ++j)
-				delete translations[j];
-			for (size_t j = 0; j < codepages.size(); ++j)
-				delete codepages[j];
-			return -1;
 		}
 	}
 
@@ -172,8 +141,6 @@ int main(int argc, char *argv[]) {
 
 	// Write number of translations
 	writeUint16BE(outFile, numLangs);
-	// Write number of codepages, we don't save ascii and iso-8859-1
-	writeUint16BE(outFile, codepages.size() - 2);
 
 	// Write the length of each data block here.
 	// We could write it at the start of each block but that would mean that
@@ -183,14 +150,9 @@ int main(int argc, char *argv[]) {
 	// file and can then skip to the block we want.
 	// Blocks are:
 	//   1. List of languages with the language name
-	//   2. List of codepages
-	//   3. Original messages (i.e. english)
-	//   4. First translation
-	//   5. Second translation
-	//   ...
-	//   n. First codepage (These don't have any data size, since they are all
-	//                      256 * 4 bytes long)
-	//   n+1. Second codepage
+	//   2. Original messages (i.e. english)
+	//   3. First translation
+	//   4. Second translation
 	//   ...
 
 	// Write length for translation description
@@ -201,12 +163,6 @@ int main(int argc, char *argv[]) {
 	}
 	writeUint16BE(outFile, len);
 
-	// Write length for the codepage names
-	len = 0;
-	for (size_t j = 2; j < codepages.size(); ++j)
-		len += stringSize(codepages[j]->getName().c_str());
-	writeUint16BE(outFile, len);
-
 	// Write size for the original language (english) block
 	// It starts with the number of strings coded on 2 bytes followed by each
 	// string (two bytes for the number of chars and the string itself).
@@ -234,11 +190,6 @@ int main(int argc, char *argv[]) {
 		writeString(outFile, translations[lang]->languageName());
 	}
 
-	// Write list of codepages
-	for (size_t j = 2; j < codepages.size(); ++j) {
-		writeString(outFile, codepages[j]->getName().c_str());
-	}
-
 	// Write original messages
 	writeUint16BE(outFile, messageIds.size());
 	for (i = 0; i < messageIds.size(); ++i) {
@@ -256,13 +207,6 @@ int main(int argc, char *argv[]) {
 		}
 	}
 
-	// Write codepages
-	for (size_t j = 2; j < codepages.size(); ++j) {
-		const Codepage *cp = codepages[j];
-		for (i = 0; i < 256; ++i)
-			writeUint32BE(outFile, cp->getMapping(i));
-	}
-
 	fclose(outFile);
 
 	// Clean the memory


Commit: 085f375c98b926353e61522e3dd3d8f082b0bc46
    https://github.com/scummvm/scummvm/commit/085f375c98b926353e61522e3dd3d8f082b0bc46
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Store messages as U32Strings and remove codepages reading from .dat

- The previous commit removes all codepage additions to the create_translations tool.
- Following that, this commit removes all the reading from .dat file related to codepages

Changed paths:
    common/translation.cpp
    common/translation.h


diff --git a/common/translation.cpp b/common/translation.cpp
index d24cf12cbf..f8c8dbf14b 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -291,15 +291,6 @@ void TranslationManager::loadTranslationsInfoDat() {
 	// Get number of translations
 	int nbTranslations = in.readUint16BE();
 
-	// Get number of codepages
-	int nbCodepages = in.readUint16BE();
-
-	// Determine where the codepages start
-	_charmapStart = 0;
-	for (int i = 0; i < nbTranslations + 3; ++i)
-		_charmapStart += in.readUint16BE();
-	_charmapStart += in.pos();
-
 	// Read list of languages
 	_langs.resize(nbTranslations);
 	_langNames.resize(nbTranslations);
@@ -312,14 +303,6 @@ void TranslationManager::loadTranslationsInfoDat() {
 		_langNames[i] = String(buf, len - 1);
 	}
 
-	// Read list of codepages
-	_charmaps.resize(nbCodepages);
-	for (int i = 0; i < nbCodepages; ++i) {
-		len = in.readUint16BE();
-		in.read(buf, len);
-		_charmaps[i] = String(buf, len - 1);
-	}
-
 	// Read messages
 	int numMessages = in.readUint16BE();
 	_messageIds.resize(numMessages);
@@ -359,13 +342,6 @@ void TranslationManager::loadLanguageDat(int index) {
 		return;
 	}
 
-	// Get the number of codepages
-	int nbCodepages = in.readUint16BE();
-	if (nbCodepages != (int)_charmaps.size()) {
-		warning("The 'translations.dat' file has changed since starting ScummVM. GUI translation will not be available");
-		return;
-	}
-
 	// Get size of blocks to skip.
 	int skipSize = 0;
 	for (int i = 0; i < index + 3; ++i)
@@ -380,10 +356,7 @@ void TranslationManager::loadLanguageDat(int index) {
 	int nbMessages = in.readUint16BE();
 	_currentTranslationMessages.resize(nbMessages);
 
-	// Read charset
-	len = in.readUint16BE();
-	in.read(buf, len);
-	_currentCharset = String(buf, len - 1);
+	_currentCharset = "UTF-32";
 
 	// Read messages
 	for (int i = 0; i < nbMessages; ++i) {
@@ -395,36 +368,13 @@ void TranslationManager::loadLanguageDat(int index) {
 			msg += String(buf, len > 256 ? 256 : len - 1);
 			len -= 256;
 		}
-		_currentTranslationMessages[i].msgstr = msg;
+		_currentTranslationMessages[i].msgstr = msg.decode();
 		len = in.readUint16BE();
 		if (len > 0) {
 			in.read(buf, len);
 			_currentTranslationMessages[i].msgctxt = String(buf, len - 1);
 		}
 	}
-
-	// Find the charset
-	int charmapNum = -1;
-	for (uint i = 0; i < _charmaps.size(); ++i) {
-		if (_charmaps[i].equalsIgnoreCase(_currentCharset)) {
-			charmapNum = i;
-			break;
-		}
-	}
-
-	// Setup the new charset mapping
-	if (charmapNum == -1) {
-		delete[] _charmap;
-		_charmap = nullptr;
-	} else {
-		if (!_charmap)
-			_charmap = new uint32[256];
-
-		in.seek(_charmapStart + charmapNum * 256 * 4, SEEK_SET);
-		for (int i = 0; i < 256; ++i)
-			_charmap[i] = in.readUint32BE();
-	}
-
 }
 
 bool TranslationManager::checkHeader(File &in) {
diff --git a/common/translation.h b/common/translation.h
index 303bea7943..b152fd7a81 100644
--- a/common/translation.h
+++ b/common/translation.h
@@ -56,7 +56,7 @@ typedef Array<TLanguage> TLangArray;
 struct PoMessageEntry {
 	int msgid;
 	String msgctxt;
-	String msgstr;
+	U32String msgstr;
 };
 
 /**


Commit: dc1c82b74ec385a239be3688bb620738419488bf
    https://github.com/scummvm/scummvm/commit/dc1c82b74ec385a239be3688bb620738419488bf
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Define new translation version "4"

Changed paths:
    common/translation.cpp
    devtools/create_translations/create_translations.cpp


diff --git a/common/translation.cpp b/common/translation.cpp
index f8c8dbf14b..f160c99f32 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -25,7 +25,7 @@
 #include <windows.h>
 #endif
 
-#define TRANSLATIONS_DAT_VER 3
+#define TRANSLATIONS_DAT_VER 4
 
 #include "common/translation.h"
 #include "common/config-manager.h"
diff --git a/devtools/create_translations/create_translations.cpp b/devtools/create_translations/create_translations.cpp
index 31857de166..49ea43977c 100644
--- a/devtools/create_translations/create_translations.cpp
+++ b/devtools/create_translations/create_translations.cpp
@@ -39,7 +39,7 @@
 #include "po_parser.h"
 #include "cp_parser.h"
 
-#define TRANSLATIONS_DAT_VER 3	// 1 byte
+#define TRANSLATIONS_DAT_VER 4	// 1 byte
 
 // Portable implementation of stricmp / strcasecmp / strcmpi.
 int scumm_stricmp(const char *s1, const char *s2) {


Commit: 6747e354b841613cd2eef5a0daf909c78cc81cb5
    https://github.com/scummvm/scummvm/commit/6747e354b841613cd2eef5a0daf909c78cc81cb5
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Load translation info correctly

Changed paths:
    common/translation.cpp


diff --git a/common/translation.cpp b/common/translation.cpp
index f160c99f32..a4091a9138 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -291,6 +291,10 @@ void TranslationManager::loadTranslationsInfoDat() {
 	// Get number of translations
 	int nbTranslations = in.readUint16BE();
 
+	for (int i = 0; i < nbTranslations + 2; i++) {
+		in.readUint16BE(); // skip
+	}
+
 	// Read list of languages
 	_langs.resize(nbTranslations);
 	_langNames.resize(nbTranslations);


Commit: fc91436ea6afb87638f83bcdbf8ce528df4847e3
    https://github.com/scummvm/scummvm/commit/fc91436ea6afb87638f83bcdbf8ce528df4847e3
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Remove charsets being written to .dat

Changed paths:
    common/translation.cpp
    devtools/create_translations/create_translations.cpp


diff --git a/common/translation.cpp b/common/translation.cpp
index a4091a9138..3a8e16aef2 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -348,7 +348,7 @@ void TranslationManager::loadLanguageDat(int index) {
 
 	// Get size of blocks to skip.
 	int skipSize = 0;
-	for (int i = 0; i < index + 3; ++i)
+	for (int i = 0; i < index + 2; ++i)
 		skipSize += in.readUint16BE();
 	// We also need to skip the remaining block sizes
 	skipSize += 2 * (nbTranslations - index);
diff --git a/devtools/create_translations/create_translations.cpp b/devtools/create_translations/create_translations.cpp
index 49ea43977c..9a7cbfb17a 100644
--- a/devtools/create_translations/create_translations.cpp
+++ b/devtools/create_translations/create_translations.cpp
@@ -172,11 +172,11 @@ int main(int argc, char *argv[]) {
 	writeUint16BE(outFile, len);
 
 	// Then comes the size of each translation block.
-	// It starts with the number of strings coded on 2 bytes, the charset and then the strings.
+	// It starts with the number of strings coded on 2 bytes, and then the strings.
 	// For each string we have the string id (on two bytes) followed by
 	// the string size (two bytes for the number of chars and the string itself).
 	for (lang = 0; lang < numLangs; lang++) {
-		len = 2 + stringSize(translations[lang]->charset());
+		len = 2;
 		for (i = 0; i < translations[lang]->size(); ++i) {
 			len += 2 + stringSize(translations[lang]->entry(i)->msgstr);
 			len += stringSize(translations[lang]->entry(i)->msgctxt);
@@ -199,7 +199,6 @@ int main(int argc, char *argv[]) {
 	// Write translations
 	for (lang = 0; lang < numLangs; lang++) {
 		writeUint16BE(outFile, translations[lang]->size());
-		writeString(outFile, translations[lang]->charset());
 		for (i = 0; i < translations[lang]->size(); ++i) {
 			writeUint16BE(outFile, messageIds.findIndex(translations[lang]->entry(i)->msgid));
 			writeString(outFile, translations[lang]->entry(i)->msgstr);


Commit: 546fe374dfa337fd2582a51a9c707a621e6f65b4
    https://github.com/scummvm/scummvm/commit/546fe374dfa337fd2582a51a9c707a621e6f65b4
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GRAPHICS: Properly assign chars in handleEllipsis according to stringtype

Changed paths:
    graphics/font.cpp


diff --git a/graphics/font.cpp b/graphics/font.cpp
index 939e2b91e5..8b8e7d0407 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -348,11 +348,11 @@ StringType handleEllipsis(const Font &font, const StringType &input, int w) {
 		// for now.
 		const int halfWidth = (w - ellipsisWidth) / 2;
 		int w2 = 0;
-		Common::String::unsigned_type last = 0;
+		typename StringType::unsigned_type last = 0;
 		uint i = 0;
 
 		for (; i < s.size(); ++i) {
-			const Common::String::unsigned_type cur = s[i];
+			const typename StringType::unsigned_type cur = s[i];
 			int charWidth = font.getCharWidth(cur) + font.getKerningOffset(last, cur);
 			if (w2 + charWidth > halfWidth)
 				break;
@@ -374,7 +374,7 @@ StringType handleEllipsis(const Font &font, const StringType &input, int w) {
 		// (width + ellipsisWidth - w)
 		int skip = width + ellipsisWidth - w;
 		for (; i < s.size() && skip > 0; ++i) {
-			const Common::String::unsigned_type cur = s[i];
+			const typename StringType::unsigned_type cur = s[i];
 			skip -= font.getCharWidth(cur) + font.getKerningOffset(last, cur);
 			last = cur;
 		}


Commit: 810b7cfccccdc0e7f3cee0677c71741a0b616e97
    https://github.com/scummvm/scummvm/commit/810b7cfccccdc0e7f3cee0677c71741a0b616e97
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Write block sizes as Uint32BE

- Changes made in create_translations tool and translations.cpp
- After converting po files to UTF-8, length of block did not fit in 16 bits. This commit addresses that.

Changed paths:
    common/translation.cpp
    devtools/create_translations/create_translations.cpp


diff --git a/common/translation.cpp b/common/translation.cpp
index 3a8e16aef2..607dc822ab 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -291,8 +291,14 @@ void TranslationManager::loadTranslationsInfoDat() {
 	// Get number of translations
 	int nbTranslations = in.readUint16BE();
 
-	for (int i = 0; i < nbTranslations + 2; i++) {
-		in.readUint16BE(); // skip
+	// Skip translation description & size for the original language (english) block
+	for (int i = 0; i < 2; i++) {
+		in.readUint16BE();
+	}
+
+	// Skip size of each translation block. Each is written in Uint32BE.
+	for (int i = 0; i < nbTranslations; i++) {
+		in.readUint32BE();
 	}
 
 	// Read list of languages
@@ -348,10 +354,17 @@ void TranslationManager::loadLanguageDat(int index) {
 
 	// Get size of blocks to skip.
 	int skipSize = 0;
-	for (int i = 0; i < index + 2; ++i)
+
+	// Skip translation description & size for the original language (english) block
+	for (int i = 0; i < 2; ++i)
 		skipSize += in.readUint16BE();
+
+	// Skip size of each translation block. Each is written in Uint32BE.
+	for (int i = 0; i < index; ++i)
+		skipSize += in.readUint32BE();
+
 	// We also need to skip the remaining block sizes
-	skipSize += 2 * (nbTranslations - index);
+	skipSize += 4 * (nbTranslations - index);	// 4 because block sizes are written in Uint32BE in the .dat file.
 
 	// Seek to start of block we want to read
 	in.seek(skipSize, SEEK_CUR);
diff --git a/devtools/create_translations/create_translations.cpp b/devtools/create_translations/create_translations.cpp
index 9a7cbfb17a..d74ea0199a 100644
--- a/devtools/create_translations/create_translations.cpp
+++ b/devtools/create_translations/create_translations.cpp
@@ -181,7 +181,7 @@ int main(int argc, char *argv[]) {
 			len += 2 + stringSize(translations[lang]->entry(i)->msgstr);
 			len += stringSize(translations[lang]->entry(i)->msgctxt);
 		}
-		writeUint16BE(outFile, len);
+		writeUint32BE(outFile, len);
 	}
 
 	// Write list of languages


Commit: 3d97be25594d425ec837a4a88d5b992903941ae0
    https://github.com/scummvm/scummvm/commit/3d97be25594d425ec837a4a88d5b992903941ae0
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Remove redundant code

Because po files now (should) use UTF-8, a bunch of code in ScummVM is redundant. This commit addresses that.

- Remove charsetMapping and related variables.
- Remove the code that used these functions.
- Remove cp_parser.cpp. This is removed because the use of codepages is no longer needed.
- Remove iso-8859-x codepages (see above message)
- Always set mapping as 0 in ThemeEngine::loadScalableFont
- Check if ascii or not by getting charset in about dialog.

Changed paths:
  R devtools/create_translations/cp_parser.cpp
  R devtools/create_translations/cp_parser.h
  R po/iso-8859-2.cp
  R po/iso-8859-5.cp
  R po/iso-8859-7.cp
  R po/iso-8859-8.cp
    common/encoding.cpp
    common/encoding.h
    common/translation.cpp
    common/translation.h
    devtools/create_translations/create_translations.cpp
    devtools/create_translations/module.mk
    gui/ThemeEngine.cpp
    gui/about.cpp


diff --git a/common/encoding.cpp b/common/encoding.cpp
index 80fe8230e0..6bd8ad9da9 100644
--- a/common/encoding.cpp
+++ b/common/encoding.cpp
@@ -180,10 +180,6 @@ char *Encoding::conversion(const String &to, const String &from, const char *str
 		result = g_system->convertEncoding(addUtfEndianness(to).c_str(),
 				addUtfEndianness(from).c_str(), string, length);
 
-	if (result == nullptr) {
-		result = convertTransManMapping(addUtfEndianness(to).c_str(), addUtfEndianness(from).c_str(), string, length);
-	}
-
 	if (result == nullptr) {
 		result = convertConversionTable(addUtfEndianness(to).c_str(), addUtfEndianness(from).c_str(), string, length);
 	}
@@ -277,81 +273,6 @@ char *Encoding::convertIconv(const char *to, const char *from, const char *strin
 #endif //USE_ICONV
 }
 
-// This algorithm is able to convert only between the current TransMan charset
-// and UTF-32, but if it fails, it tries to at least convert from the current
-// TransMan encoding to UTF-32 and then it calls convert() again with that.
-char *Encoding::convertTransManMapping(const char *to, const char *from, const char *string, size_t length) {
-#ifdef USE_TRANSLATION
-	String currentCharset = TransMan.getCurrentCharset();
-	if (currentCharset.equalsIgnoreCase(from)) {
-		// We can use the transMan mapping directly
-		uint32 *partialResult = (uint32 *)calloc(sizeof(uint32), (length + 1));
-		if (!partialResult) {
-			warning("Couldn't allocate memory for encoding conversion");
-			return nullptr;
-		}
-		const uint32 *mapping = TransMan.getCharsetMapping();
-		if (mapping == 0) {
-			for(unsigned i = 0; i < length; i++) {
-				partialResult[i] = string[i];
-			}
-		} else {
-			for(unsigned i = 0; i < length; i++) {
-				partialResult[i] = mapping[(unsigned char)string[i]] & 0x7FFFFFFF;
-			}
-		}
-		char *finalResult = convert(to, "UTF-32", (char *)partialResult, length * 4);
-		free(partialResult);
-		return finalResult;
-	} else if (currentCharset.equalsIgnoreCase(to) && String(from).hasPrefixIgnoreCase("utf-32")) {
-		bool swapEndian = false;
-		char *newString = nullptr;
-
-#ifdef SCUMM_BIG_ENDIAN
-		if (String(from).hasSuffixIgnoreCase("LE"))
-			swapEndian = true;
-#else
-		if (String(from).hasSuffixIgnoreCase("BE"))
-			swapEndian = true;
-#endif
-		if (swapEndian) {
-			if (String(from).hasPrefixIgnoreCase("utf-16"))
-				newString = switchEndian(string, length, 16);
-			if (String(from).hasPrefixIgnoreCase("utf-32"))
-				newString = switchEndian(string, length, 32);
-			if (newString != nullptr)
-				string = newString;
-			else
-				return nullptr;
-		}
-		// We can do reverse mapping
-		const uint32 *mapping = TransMan.getCharsetMapping();
-		const uint32 *src = (const uint32 *)string;
-		char *result = (char *)calloc(sizeof(char), (length + 4));
-		if (!result) {
-			warning("Couldn't allocate memory for encoding conversion");
-			if (newString != nullptr)
-				free(newString);
-			return nullptr;
-		}
-		for (unsigned i = 0; i < length; i++) {
-			for (int j = 0; j < 256; j++) {
-				if ((mapping[j] & 0x7FFFFFFF) == src[i]) {
-					result[i] = j;
-					break;
-				}
-			}
-		}
-		if (newString != nullptr)
-			free(newString);
-		return result;
-	} else
-		return nullptr;
-#else
-	return nullptr;
-#endif // USE_TRANSLATION
-}
-
 static uint32 g_cp850ConversionTable[] = {
 	0x0000, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022,
 	0x25d8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C,
diff --git a/common/encoding.h b/common/encoding.h
index adb61191d1..7a41b2980f 100644
--- a/common/encoding.h
+++ b/common/encoding.h
@@ -172,22 +172,6 @@ class Encoding {
 		 */
 		static char *convertIconv(const char *to, const char *from, const char *string, size_t length);
 
-		/**
-		 * Tries to use the TransMan to convert the string. It can convert only
-		 * between UTF-32 and the current GUI charset. It also tries to convert
-		 * from the current GUI charset to UTF-32 and then it calls convert() again.
-		 *
-		 * The result has to be freed after use.
-		 *
-		 * @param to Name of the encoding the strings will be converted to
-		 * @param from Name of the encoding the strings will be converted from
-		 * @param string String that should be converted.
-		 * @param length Length of the string to convert in bytes.
-		 *
-		 * @return Converted string (must be freed) or nullptr if the conversion failed
-		 */
-		static char *convertTransManMapping(const char *to, const char *from, const char *string, size_t length);
-
 		/**
 		 * Uses conversion table to convert the string to unicode and from that
 		 * to the final encoding. Important encodings, that aren't supported by
diff --git a/common/translation.cpp b/common/translation.cpp
index 607dc822ab..ceeb33ea1f 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -45,7 +45,7 @@ bool operator<(const TLanguage &l, const TLanguage &r) {
 	return strcmp(l.name, r.name) < 0;
 }
 
-TranslationManager::TranslationManager() : _currentLang(-1), _charmap(nullptr) {
+TranslationManager::TranslationManager() : _currentLang(-1) {
 	loadTranslationsInfoDat();
 
 	// Set the default language
@@ -53,7 +53,7 @@ TranslationManager::TranslationManager() : _currentLang(-1), _charmap(nullptr) {
 }
 
 TranslationManager::~TranslationManager() {
-	delete[] _charmap;
+
 }
 
 int32 TranslationManager::findMatchingLanguage(const String &lang) {
diff --git a/common/translation.h b/common/translation.h
index b152fd7a81..0ab682ad18 100644
--- a/common/translation.h
+++ b/common/translation.h
@@ -155,21 +155,6 @@ public:
 	 */
 	String getCurrentCharset() const;
 
-	/**
-	 * Returns a pointer to the current charset mapping. This mapping is a
-	 * codepage encoding -> unicode mapping and always 256 entries long.
-	 *
-	 * The MSB of the individual mapped (i.e. unicode) character states
-	 * whether the character is required for this charset. If it is set, the
-	 * character needs to be present in order to have the text displayed.
-	 * This is used in the font loading code to detect whether the font is
-	 * able of supporting this language.
-	 *
-	 * The return value might be 0 in case it's a default ASCII/ISO-8859-1
-	 * map.
-	 */
-	const uint32 *getCharsetMapping() const { return _charmap; }
-
 	/**
 	 * Returns currently selected translation language
 	 */
@@ -225,15 +210,11 @@ private:
 
 	StringArray _langs;
 	StringArray _langNames;
-	StringArray _charmaps;
 
 	StringArray _messageIds;
 	Array<PoMessageEntry> _currentTranslationMessages;
 	String _currentCharset;
 	int _currentLang;
-
-	uint32 _charmapStart;
-	uint32 *_charmap;
 };
 
 } // End of namespace Common
diff --git a/devtools/create_translations/cp_parser.cpp b/devtools/create_translations/cp_parser.cpp
deleted file mode 100644
index c7c7597837..0000000000
--- a/devtools/create_translations/cp_parser.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * This is a utility for create the translations.dat file from all the po files.
- * The generated files is used by ScummVM to propose translation of its GUI.
- */
-
-#include "cp_parser.h"
-
-#include <fstream>
-#include <stdio.h>
-
-Codepage::Codepage(const std::string &name, const uint32 *mapping) : _name(name) {
-	if (!mapping) {
-		// Default to a ISO-8859-1 mapping
-		for (unsigned int i = 0; i < 256; ++i)
-			_mapping[i] = i;
-	} else {
-		for (unsigned int i = 0; i < 256; ++i)
-			_mapping[i] = *mapping++;
-	}
-}
-
-Codepage *parseCodepageMapping(const std::string &filename) {
-	size_t start = filename.find_last_of("/\\");
-	if (start == std::string::npos)
-		start = 0;
-	else
-		++start;
-	// Strip off the filename extension
-	const size_t pos = filename.find_last_of('.');
-	const std::string charset(filename.substr(start, pos != std::string::npos ? (pos - start) : std::string::npos));
-
-	std::ifstream in(filename.c_str());
-	if (!in) {
-		fprintf(stderr, "ERROR: Could not open file \"%s\"!\n", filename.c_str());
-		return 0;
-	}
-
-	uint32 mapping[256];
-
-	int processedMappings = 0;
-	std::string line;
-	while (processedMappings < 256) {
-		std::getline(in, line);
-		if (in.eof())
-			break;
-		if (in.fail()) {
-			fprintf(stderr, "ERROR: Reading from file \"%s\" failed!\n", filename.c_str());
-			return 0;
-		}
-
-		// In case the line starts with a "#" it is a comment. We also ignore
-		// empty lines.
-		if (line.empty() || line[0] == '#')
-			continue;
-
-		// Read the unicode number, we thereby ignore everything else on the line
-		int unicode, required;
-		const int parsed = sscanf(line.c_str(), "%d %d", &unicode, &required);
-		if (parsed < 1 || parsed > 2) {
-			fprintf(stderr, "ERROR: Line \"%s\" is malformed!\n", filename.c_str());
-			return 0;
-		}
-		// In case no required integer was given, we assume the character is
-		// required
-		if (parsed == 1)
-			required = 1;
-
-		// -1 means default mapping
-		if (unicode == -1)
-			unicode = processedMappings;
-
-		uint32 unicodeValue = unicode;
-		if (required)
-			unicodeValue |= 0x80000000;
-
-		mapping[processedMappings++] = (uint32)unicodeValue;
-	}
-
-	// Check whether all character encodings are mapped, if not error out
-	if (processedMappings != 256) {
-		fprintf(stderr, "ERROR: File \"%s\" does not contain mappings for exactly 256 characters!\n", filename.c_str());
-		return 0;
-	}
-
-	// Return the codepage
-	return new Codepage(charset, mapping);
-}
diff --git a/devtools/create_translations/cp_parser.h b/devtools/create_translations/cp_parser.h
deleted file mode 100644
index b748430ca0..0000000000
--- a/devtools/create_translations/cp_parser.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * This is a utility for create the translations.dat file from all the po files.
- * The generated files is used by ScummVM to propose translation of its GUI.
- */
-
-#ifndef CP_PARSER_H
-#define CP_PARSER_H
-
-#include "create_translations.h"
-
-#include <string>
-
-/**
- * Codepage description.
- *
- * This includes a name, and the codepage -> unicode mapping.
- */
-class Codepage {
-public:
-	Codepage(const std::string &name, const uint32 *mapping);
-
-	const std::string &getName() const { return _name; }
-
-	uint32 getMapping(unsigned char src) const { return _mapping[src]; }
-private:
-	std::string _name;
-	uint32 _mapping[256];
-};
-
-/**
- * Parse the codepage file and create a codepage.
- */
-Codepage *parseCodepageMapping(const std::string &filename);
-
-#endif
diff --git a/devtools/create_translations/create_translations.cpp b/devtools/create_translations/create_translations.cpp
index d74ea0199a..24df646fad 100644
--- a/devtools/create_translations/create_translations.cpp
+++ b/devtools/create_translations/create_translations.cpp
@@ -37,7 +37,6 @@
 #endif // main
 
 #include "po_parser.h"
-#include "cp_parser.h"
 
 #define TRANSLATIONS_DAT_VER 4	// 1 byte
 
diff --git a/devtools/create_translations/module.mk b/devtools/create_translations/module.mk
index 9a2b302aef..430cf91976 100644
--- a/devtools/create_translations/module.mk
+++ b/devtools/create_translations/module.mk
@@ -1,7 +1,6 @@
 MODULE := devtools/create_translations
 
 MODULE_OBJS := \
-	cp_parser.o \
 	po_parser.o \
 	create_translations.o
 
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index defcc365fe..a2202dd790 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -1614,11 +1614,7 @@ DrawData ThemeEngine::parseDrawDataId(const Common::String &name) const {
 
 const Graphics::Font *ThemeEngine::loadScalableFont(const Common::String &filename, const Common::String &charset, const int pointsize, Common::String &name) {
 #ifdef USE_FREETYPE2
-#ifdef USE_TRANSLATION
-	const uint32 *mapping = TransMan.getCharsetMapping();
-#else
 	const uint32 *mapping = 0;
-#endif
 	name = Common::String::format("%s-%s@%d", filename.c_str(), charset.c_str(), pointsize);
 
 	// Try already loaded fonts.
diff --git a/gui/about.cpp b/gui/about.cpp
index 7d715a409c..6972dde272 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -156,10 +156,7 @@ void AboutDialog::addLine(const U32String &str) {
 		if (format[0] == 'A') {
 			bool useAscii = false;
 #ifdef USE_TRANSLATION
-			// We could use TransMan.getCurrentCharset() but rather than compare strings
-			// it is easier to use TransMan.getCharsetMapping() (non null in case of non
-			// ISO-8859-1 mapping)
-			useAscii = (TransMan.getCharsetMapping() != nullptr);
+			useAscii = TransMan.getCurrentCharset().equals("ASCII");
 #endif
 			if (useAscii)
 				asciiStr = renderStr;
diff --git a/po/iso-8859-2.cp b/po/iso-8859-2.cp
deleted file mode 100644
index f8e673bf70..0000000000
--- a/po/iso-8859-2.cp
+++ /dev/null
@@ -1,320 +0,0 @@
-# 0x00 (  0)
-0 0    # Not required
-1 0    # Not required
-2 0    # Not required
-3 0    # Not required
-# 0x04 (  4)
-4 0    # Not required
-5 0    # Not required
-6 0    # Not required
-7 0    # Not required
-# 0x08 (  8)
-8 0    # Not required
-9 0    # Not required
-10 0    # Not required
-11 0    # Not required
-# 0x0C ( 12)
-12 0    # Not required
-13 0    # Not required
-14 0    # Not required
-15 0    # Not required
-# 0x10 ( 16)
-16 0    # Not required
-17 0    # Not required
-18 0    # Not required
-19 0    # Not required
-# 0x14 ( 20)
-20 0    # Not required
-21 0    # Not required
-22 0    # Not required
-23 0    # Not required
-# 0x18 ( 24)
-24 0    # Not required
-25 0    # Not required
-26 0    # Not required
-27 0    # Not required
-# 0x1C ( 28)
-28 0    # Not required
-29 0    # Not required
-30 0    # Not required
-31 0    # Not required
-# 0x20 ( 32)
-32
-33
-34
-35
-# 0x24 ( 36)
-36
-37
-38
-39
-# 0x28 ( 40)
-40
-41
-42
-43
-# 0x2C ( 44)
-44
-45
-46
-47
-# 0x30 ( 48)
-48
-49
-50
-51
-# 0x34 ( 52)
-52
-53
-54
-55
-# 0x38 ( 56)
-56
-57
-58
-59
-# 0x3C ( 60)
-60
-61
-62
-63
-# 0x40 ( 64)
-64
-65
-66
-67
-# 0x44 ( 68)
-68
-69
-70
-71
-# 0x48 ( 72)
-72
-73
-74
-75
-# 0x4C ( 76)
-76
-77
-78
-79
-# 0x50 ( 80)
-80
-81
-82
-83
-# 0x54 ( 84)
-84
-85
-86
-87
-# 0x58 ( 88)
-88
-89
-90
-91
-# 0x5C ( 92)
-92
-93
-94
-95
-# 0x60 ( 96)
-96
-97
-98
-99
-# 0x64 (100)
-100
-101
-102
-103
-# 0x68 (104)
-104
-105
-106
-107
-# 0x6C (108)
-108
-109
-110
-111
-# 0x70 (112)
-112
-113
-114
-115
-# 0x74 (116)
-116
-117
-118
-119
-# 0x78 (120)
-120
-121
-122
-123
-# 0x7C (124)
-124
-125
-126
-127 0    # Not required
-# 0x80 (128)
-128 0    # Not required
-129 0    # Not required
-130 0    # Not required
-131 0    # Not required
-# 0x84 (132)
-132 0    # Not required
-133 0    # Not required
-134 0    # Not required
-135 0    # Not required
-# 0x88 (136)
-136 0    # Not required
-137 0    # Not required
-138 0    # Not required
-139 0    # Not required
-# 0x8C (140)
-140 0    # Not required
-141 0    # Not required
-142 0    # Not required
-143 0    # Not required
-# 0x90 (144)
-144 0    # Not required
-145 0    # Not required
-146 0    # Not required
-147 0    # Not required
-# 0x94 (148)
-148 0    # Not required
-149 0    # Not required
-150 0    # Not required
-151 0    # Not required
-# 0x98 (152)
-152 0    # Not required
-153 0    # Not required
-154 0    # Not required
-155 0    # Not required
-# 0x9C (156)
-156 0    # Not required
-157 0    # Not required
-158 0    # Not required
-159 0    # Not required
-# 0xA0 (160)
-160
-260
-728
-321
-# 0xA4 (164)
-164
-317
-346
-167
-# 0xA8 (168)
-168
-352
-350
-356
-# 0xAC (172)
-377
-173
-381
-379
-# 0xB0 (176)
-176
-261
-731
-322
-# 0xB4 (180)
-180
-318
-347
-711
-# 0xB8 (184)
-184
-353
-351
-357
-# 0xBC (188)
-378
-733
-382
-380
-# 0xC0 (192)
-340
-193
-194
-258
-# 0xC4 (196)
-196
-313
-262
-199
-# 0xC8 (200)
-268
-201
-280
-203
-# 0xCC (204)
-282
-205
-206
-270
-# 0xD0 (208)
-272
-323
-327
-211
-# 0xD4 (212)
-212
-336
-214
-215
-# 0xD8 (216)
-344
-366
-218
-368
-# 0xDC (220)
-220
-221
-354
-223
-# 0xE0 (224)
-341
-225
-226
-259
-# 0xE4 (228)
-228
-314
-263
-231
-# 0xE8 (232)
-269
-233
-281
-235
-# 0xEC (236)
-283
-237
-238
-271
-# 0xF0 (240)
-273
-324
-328
-243
-# 0xF4 (244)
-244
-337
-246
-247
-# 0xF8 (248)
-345
-367
-250
-369
-# 0xFC (252)
-252
-253
-355
-729
diff --git a/po/iso-8859-5.cp b/po/iso-8859-5.cp
deleted file mode 100644
index 47350101b2..0000000000
--- a/po/iso-8859-5.cp
+++ /dev/null
@@ -1,320 +0,0 @@
-# 0x00 (  0)
-0 0    # Not required
-1 0    # Not required
-2 0    # Not required
-3 0    # Not required
-# 0x04 (  4)
-4 0    # Not required
-5 0    # Not required
-6 0    # Not required
-7 0    # Not required
-# 0x08 (  8)
-8 0    # Not required
-9 0    # Not required
-10 0    # Not required
-11 0    # Not required
-# 0x0C ( 12)
-12 0    # Not required
-13 0    # Not required
-14 0    # Not required
-15 0    # Not required
-# 0x10 ( 16)
-16 0    # Not required
-17 0    # Not required
-18 0    # Not required
-19 0    # Not required
-# 0x14 ( 20)
-20 0    # Not required
-21 0    # Not required
-22 0    # Not required
-23 0    # Not required
-# 0x18 ( 24)
-24 0    # Not required
-25 0    # Not required
-26 0    # Not required
-27 0    # Not required
-# 0x1C ( 28)
-28 0    # Not required
-29 0    # Not required
-30 0    # Not required
-31 0    # Not required
-# 0x20 ( 32)
-32
-33
-34
-35
-# 0x24 ( 36)
-36
-37
-38
-39
-# 0x28 ( 40)
-40
-41
-42
-43
-# 0x2C ( 44)
-44
-45
-46
-47
-# 0x30 ( 48)
-48
-49
-50
-51
-# 0x34 ( 52)
-52
-53
-54
-55
-# 0x38 ( 56)
-56
-57
-58
-59
-# 0x3C ( 60)
-60
-61
-62
-63
-# 0x40 ( 64)
-64
-65
-66
-67
-# 0x44 ( 68)
-68
-69
-70
-71
-# 0x48 ( 72)
-72
-73
-74
-75
-# 0x4C ( 76)
-76
-77
-78
-79
-# 0x50 ( 80)
-80
-81
-82
-83
-# 0x54 ( 84)
-84
-85
-86
-87
-# 0x58 ( 88)
-88
-89
-90
-91
-# 0x5C ( 92)
-92
-93
-94
-95
-# 0x60 ( 96)
-96
-97
-98
-99
-# 0x64 (100)
-100
-101
-102
-103
-# 0x68 (104)
-104
-105
-106
-107
-# 0x6C (108)
-108
-109
-110
-111
-# 0x70 (112)
-112
-113
-114
-115
-# 0x74 (116)
-116
-117
-118
-119
-# 0x78 (120)
-120
-121
-122
-123
-# 0x7C (124)
-124
-125
-126
-127 0    # Not required
-# 0x80 (128)
-128 0    # Not required
-129 0    # Not required
-130 0    # Not required
-131 0    # Not required
-# 0x84 (132)
-132 0    # Not required
-133 0    # Not required
-134 0    # Not required
-135 0    # Not required
-# 0x88 (136)
-136 0    # Not required
-137 0    # Not required
-138 0    # Not required
-139 0    # Not required
-# 0x8C (140)
-140 0    # Not required
-141 0    # Not required
-142 0    # Not required
-143 0    # Not required
-# 0x90 (144)
-144 0    # Not required
-145 0    # Not required
-146 0    # Not required
-147 0    # Not required
-# 0x94 (148)
-148 0    # Not required
-149 0    # Not required
-150 0    # Not required
-151 0    # Not required
-# 0x98 (152)
-152 0    # Not required
-153 0    # Not required
-154 0    # Not required
-155 0    # Not required
-# 0x9C (156)
-156 0    # Not required
-157 0    # Not required
-158 0    # Not required
-159 0    # Not required
-# 0xA0 (160)
-160
-1025
-1026
-1027
-# 0xA4 (164)
-1028
-1029
-1030
-1031
-# 0xA8 (168)
-1032
-1033
-1034
-1035
-# 0xAC (172)
-1036
-173
-1038
-1039
-# 0xB0 (176)
-1040
-1041
-1042
-1043
-# 0xB4 (180)
-1044
-1045
-1046
-1047
-# 0xB8 (184)
-1048
-1049
-1050
-1051
-# 0xBC (188)
-1052
-1053
-1054
-1055
-# 0xC0 (192)
-1056
-1057
-1058
-1059
-# 0xC4 (196)
-1060
-1061
-1062
-1063
-# 0xC8 (200)
-1064
-1065
-1066
-1067
-# 0xCC (204)
-1068
-1069
-1070
-1071
-# 0xD0 (208)
-1072
-1073
-1074
-1075
-# 0xD4 (212)
-1076
-1077
-1078
-1079
-# 0xD8 (216)
-1080
-1081
-1082
-1083
-# 0xDC (220)
-1084
-1085
-1086
-1087
-# 0xE0 (224)
-1088
-1089
-1090
-1091
-# 0xE4 (228)
-1092
-1093
-1094
-1095
-# 0xE8 (232)
-1096
-1097
-1098
-1099
-# 0xEC (236)
-1100
-1101
-1102
-1103
-# 0xF0 (240)
-8470
-1105
-1106
-1107
-# 0xF4 (244)
-1108
-1109
-1110
-1111
-# 0xF8 (248)
-1112
-1113
-1114
-1115
-# 0xFC (252)
-1116
-167
-1118
-1119
diff --git a/po/iso-8859-7.cp b/po/iso-8859-7.cp
deleted file mode 100644
index 6a33a45435..0000000000
--- a/po/iso-8859-7.cp
+++ /dev/null
@@ -1,320 +0,0 @@
-# 0x00 (  0)
-0 0    # Not required
-1 0    # Not required
-2 0    # Not required
-3 0    # Not required
-# 0x04 (  4)
-4 0    # Not required
-5 0    # Not required
-6 0    # Not required
-7 0    # Not required
-# 0x08 (  8)
-8 0    # Not required
-9 0    # Not required
-10 0    # Not required
-11 0    # Not required
-# 0x0C ( 12)
-12 0    # Not required
-13 0    # Not required
-14 0    # Not required
-15 0    # Not required
-# 0x10 ( 16)
-16 0    # Not required
-17 0    # Not required
-18 0    # Not required
-19 0    # Not required
-# 0x14 ( 20)
-20 0    # Not required
-21 0    # Not required
-22 0    # Not required
-23 0    # Not required
-# 0x18 ( 24)
-24 0    # Not required
-25 0    # Not required
-26 0    # Not required
-27 0    # Not required
-# 0x1C ( 28)
-28 0    # Not required
-29 0    # Not required
-30 0    # Not required
-31 0    # Not required
-# 0x20 ( 32)
-32
-33
-34
-35
-# 0x24 ( 36)
-36
-37
-38
-39
-# 0x28 ( 40)
-40
-41
-42
-43
-# 0x2C ( 44)
-44
-45
-46
-47
-# 0x30 ( 48)
-48
-49
-50
-51
-# 0x34 ( 52)
-52
-53
-54
-55
-# 0x38 ( 56)
-56
-57
-58
-59
-# 0x3C ( 60)
-60
-61
-62
-63
-# 0x40 ( 64)
-64
-65
-66
-67
-# 0x44 ( 68)
-68
-69
-70
-71
-# 0x48 ( 72)
-72
-73
-74
-75
-# 0x4C ( 76)
-76
-77
-78
-79
-# 0x50 ( 80)
-80
-81
-82
-83
-# 0x54 ( 84)
-84
-85
-86
-87
-# 0x58 ( 88)
-88
-89
-90
-91
-# 0x5C ( 92)
-92
-93
-94
-95
-# 0x60 ( 96)
-96
-97
-98
-99
-# 0x64 (100)
-100
-101
-102
-103
-# 0x68 (104)
-104
-105
-106
-107
-# 0x6C (108)
-108
-109
-110
-111
-# 0x70 (112)
-112
-113
-114
-115
-# 0x74 (116)
-116
-117
-118
-119
-# 0x78 (120)
-120
-121
-122
-123
-# 0x7C (124)
-124
-125
-126
-127 0    # Not required
-# 0x80 (128)
-128 0    # Not required
-129 0    # Not required
-130 0    # Not required
-131 0    # Not required
-# 0x84 (132)
-132 0    # Not required
-133 0    # Not required
-134 0    # Not required
-135 0    # Not required
-# 0x88 (136)
-136 0    # Not required
-137 0    # Not required
-138 0    # Not required
-139 0    # Not required
-# 0x8C (140)
-140 0    # Not required
-141 0    # Not required
-142 0    # Not required
-143 0    # Not required
-# 0x90 (144)
-144 0    # Not required
-145 0    # Not required
-146 0    # Not required
-147 0    # Not required
-# 0x94 (148)
-148 0    # Not required
-149 0    # Not required
-150 0    # Not required
-151 0    # Not required
-# 0x98 (152)
-152 0    # Not required
-153 0    # Not required
-154 0    # Not required
-155 0    # Not required
-# 0x9C (156)
-156 0    # Not required
-157 0    # Not required
-158 0    # Not required
-159 0    # Not required
-# 0xA0 (160)
-160
-8216
-8217
-163
-# 0xA4 (164)
-8364
-165 0   # was: 8367. Not required and it is missing from our TTF fonts ( "DRACHMA SIGN" (U+20AF))
-166
-167
-# 0xA8 (168)
-168
-169
-890
-171
-# 0xAC (172)
-172
-173
--1 0    # Not required
-8213
-# 0xB0 (176)
-176
-177
-178
-179
-# 0xB4 (180)
-900
-901
-902
-183
-# 0xB8 (184)
-904
-905
-906
-187
-# 0xBC (188)
-908
-189
-910
-911
-# 0xC0 (192)
-912
-913
-914
-915
-# 0xC4 (196)
-916
-917
-918
-919
-# 0xC8 (200)
-920
-921
-922
-923
-# 0xCC (204)
-924
-925
-926
-927
-# 0xD0 (208)
-928
-929
--1 0    # Not required
-931
-# 0xD4 (212)
-932
-933
-934
-935
-# 0xD8 (216)
-936
-937
-938
-939
-# 0xDC (220)
-940
-941
-942
-943
-# 0xE0 (224)
-944
-945
-946
-947
-# 0xE4 (228)
-948
-949
-950
-951
-# 0xE8 (232)
-952
-953
-954
-955
-# 0xEC (236)
-956
-957
-958
-959
-# 0xF0 (240)
-960
-961
-962
-963
-# 0xF4 (244)
-964
-965
-966
-967
-# 0xF8 (248)
-968
-969
-970
-971
-# 0xFC (252)
-972
-973
-974
--1 0    # Not required
diff --git a/po/iso-8859-8.cp b/po/iso-8859-8.cp
deleted file mode 100644
index d6f6467624..0000000000
--- a/po/iso-8859-8.cp
+++ /dev/null
@@ -1,320 +0,0 @@
-# 0x00 (  0)
-0 0    # Not required
-1 0    # Not required
-2 0    # Not required
-3 0    # Not required
-# 0x04 (  4)
-4 0    # Not required
-5 0    # Not required
-6 0    # Not required
-7 0    # Not required
-# 0x08 (  8)
-8 0    # Not required
-9 0    # Not required
-10 0    # Not required
-11 0    # Not required
-# 0x0C ( 12)
-12 0    # Not required
-13 0    # Not required
-14 0    # Not required
-15 0    # Not required
-# 0x10 ( 16)
-16 0    # Not required
-17 0    # Not required
-18 0    # Not required
-19 0    # Not required
-# 0x14 ( 20)
-20 0    # Not required
-21 0    # Not required
-22 0    # Not required
-23 0    # Not required
-# 0x18 ( 24)
-24 0    # Not required
-25 0    # Not required
-26 0    # Not required
-27 0    # Not required
-# 0x1C ( 28)
-28 0    # Not required
-29 0    # Not required
-30 0    # Not required
-31 0    # Not required
-# 0x20 ( 32)
-32
-33
-34
-35
-# 0x24 ( 36)
-36
-37
-38
-39
-# 0x28 ( 40)
-40
-41
-42
-43
-# 0x2C ( 44)
-44
-45
-46
-47
-# 0x30 ( 48)
-48
-49
-50
-51
-# 0x34 ( 52)
-52
-53
-54
-55
-# 0x38 ( 56)
-56
-57
-58
-59
-# 0x3C ( 60)
-60
-61
-62
-63
-# 0x40 ( 64)
-64
-65
-66
-67
-# 0x44 ( 68)
-68
-69
-70
-71
-# 0x48 ( 72)
-72
-73
-74
-75
-# 0x4C ( 76)
-76
-77
-78
-79
-# 0x50 ( 80)
-80
-81
-82
-83
-# 0x54 ( 84)
-84
-85
-86
-87
-# 0x58 ( 88)
-88
-89
-90
-91
-# 0x5C ( 92)
-92
-93
-94
-95
-# 0x60 ( 96)
-96
-97
-98
-99
-# 0x64 (100)
-100
-101
-102
-103
-# 0x68 (104)
-104
-105
-106
-107
-# 0x6C (108)
-108
-109
-110
-111
-# 0x70 (112)
-112
-113
-114
-115
-# 0x74 (116)
-116
-117
-118
-119
-# 0x78 (120)
-120
-121
-122
-123
-# 0x7C (124)
-124
-125
-126
-127 0    # Not required
-# 0x80 (128)
-128 0    # Not required
-129 0    # Not required
-130 0    # Not required
-131 0    # Not required
-# 0x84 (132)
-132 0    # Not required
-133 0    # Not required
-134 0    # Not required
-135 0    # Not required
-# 0x88 (136)
-136 0    # Not required
-137 0    # Not required
-138 0    # Not required
-139 0    # Not required
-# 0x8C (140)
-140 0    # Not required
-141 0    # Not required
-142 0    # Not required
-143 0    # Not required
-# 0x90 (144)
-144 0    # Not required
-145 0    # Not required
-146 0    # Not required
-147 0    # Not required
-# 0x94 (148)
-148 0    # Not required
-149 0    # Not required
-150 0    # Not required
-151 0    # Not required
-# 0x98 (152)
-152 0    # Not required
-153 0    # Not required
-154 0    # Not required
-155 0    # Not required
-# 0x9C (156)
-156 0    # Not required
-157 0    # Not required
-158 0    # Not required
-159 0    # Not required
-# 0xA0 (160)
-160
--1 0    # unused
-162
-163
-# 0xA4 (164)
-164
-165
-166
-167
-# 0xA8 (168)
-168
-169
-215
-171
-# 0xAC (172)
-172
-173
-174
-175
-# 0xB0 (176)
-176
-177
-178
-179
-# 0xB4 (180)
-180
-181
-182
-183
-# 0xB8 (184)
-184
-185
-247
-187
-# 0xBC (188)
-188
-189
-190
--1 0    # unused
-# 0xC0 (192)
--1 0    # unused
--1 0    # unused
--1 0    # unused
--1 0    # unused
-# 0xC4 (196)
--1 0    # unused
--1 0    # unused
--1 0    # unused
--1 0    # unused
-# 0xC8 (200)
--1 0    # unused
--1 0    # unused
--1 0    # unused
--1 0    # unused
-# 0xCC (204)
--1 0    # unused
--1 0    # unused
--1 0    # unused
--1 0    # unused
-# 0xD0 (208)
--1 0    # unused
--1 0    # unused
--1 0    # unused
--1 0    # unused
-# 0xD4 (212)
--1 0    # unused
--1 0    # unused
--1 0    # unused
--1 0    # unused
-# 0xD8 (216)
--1 0    # unused
--1 0    # unused
--1 0    # unused
--1 0    # unused
-# 0xDC (220)
--1 0    # unused
--1 0    # unused
--1 0    # unused
-8215
-# 0xE0 (224)
-1488
-1489
-1490
-1491
-# 0xE4 (228)
-1492
-1493
-1494
-1495
-# 0xE8 (232)
-1496
-1497
-1498
-1499
-# 0xEC (236)
-1500
-1501
-1502
-1503
-# 0xF0 (240)
-1504
-1505
-1506
-1507
-# 0xF4 (244)
-1508
-1509
-1510
-1511
-# 0xF8 (248)
-1512
-1513
-1514
--1 0    # unused
-# 0xFC (252)
--1 0    # unused
-8206
-8207
--1 0    # unused


Commit: 77937f3e2b9b0e5140b2b06b0780b224e0dfce3b
    https://github.com/scummvm/scummvm/commit/77937f3e2b9b0e5140b2b06b0780b224e0dfce3b
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Remove more redundant code, and add UTF-8 check

Modifies the CREATE_TRANSLATIONS tool.

- Remove _charset for PoMessageEntryList
- Add useUTF8 bool variable and helper function
- Add UTF-8 checking for each po file. Error out if file is not coded in UTF-8.

Changed paths:
    devtools/create_translations/create_translations.cpp
    devtools/create_translations/po_parser.cpp
    devtools/create_translations/po_parser.h


diff --git a/devtools/create_translations/create_translations.cpp b/devtools/create_translations/create_translations.cpp
index 24df646fad..0ddfab9172 100644
--- a/devtools/create_translations/create_translations.cpp
+++ b/devtools/create_translations/create_translations.cpp
@@ -122,6 +122,16 @@ int main(int argc, char *argv[]) {
 		}
 	}
 
+	for (int i = 0; i < numLangs; i++) {
+		if (!translations[i]->useUTF8()) {
+			fprintf(stderr, "ERROR: Po Language file for: \"%s\", named as \"%s\" is not encoded in UTF-8", translations[i]->languageName(), translations[i]->language());
+			for (size_t j = 0; j < translations.size(); ++j)
+				delete translations[j];
+
+			return -1;
+		}
+	}
+
 	FILE *outFile;
 	int i, lang;
 	int len;
diff --git a/devtools/create_translations/po_parser.cpp b/devtools/create_translations/po_parser.cpp
index f1ad833932..ba23f2c5d5 100644
--- a/devtools/create_translations/po_parser.cpp
+++ b/devtools/create_translations/po_parser.cpp
@@ -108,14 +108,11 @@ const char *PoMessageList::operator[](int index) const {
 }
 
 PoMessageEntryList::PoMessageEntryList(const char *lang) :
-	_lang(NULL), _charset(NULL), _langName(NULL), _langNameAlt(NULL),
+	_lang(NULL), _langName(NULL), _langNameAlt(NULL), _useUTF8(true),
 	_list(NULL), _size(0), _allocated(0)
 {
 	_lang = new char[1 + strlen(lang)];
 	strcpy(_lang, lang);
-	// Set default charset to empty string
-	_charset = new char[1];
-	_charset[0] = '\0';
 	// Set default langName to lang
 	_langNameAlt = new char[1 + strlen(lang)];
 	strcpy(_langNameAlt, lang);
@@ -123,7 +120,6 @@ PoMessageEntryList::PoMessageEntryList(const char *lang) :
 
 PoMessageEntryList::~PoMessageEntryList() {
 	delete[] _lang;
-	delete[] _charset;
 	delete[] _langName;
 	delete[] _langNameAlt;
 	for (int i = 0; i < _size; ++i)
@@ -146,9 +142,8 @@ void PoMessageEntryList::addMessageEntry(const char *translation, const char *me
 			_langNameAlt = str;
 		}
 		str = parseLine(translation, "charset=");
-		if (str != NULL) {
-			delete[] _charset;
-			_charset = str;
+		if (str[0] != 'U' || str[1] != 'T' || str[2] != 'F' || str[3] != '-' || str[4] != '8') {
+			_useUTF8 = false;
 		}
 		return;
 	}
@@ -245,8 +240,8 @@ const char *PoMessageEntryList::languageName() const {
 	return _langName ? _langName : _langNameAlt;
 }
 
-const char *PoMessageEntryList::charset() const {
-	return _charset;
+const bool PoMessageEntryList::useUTF8() const {
+	return _useUTF8;
 }
 
 int PoMessageEntryList::size() const {
diff --git a/devtools/create_translations/po_parser.h b/devtools/create_translations/po_parser.h
index 0c30517017..13b4a103d4 100644
--- a/devtools/create_translations/po_parser.h
+++ b/devtools/create_translations/po_parser.h
@@ -87,17 +87,18 @@ public:
 
 	const char *language() const;
 	const char *languageName() const;
-	const char *charset() const;
+	const bool useUTF8() const;
 
 	int size() const;
 	const PoMessageEntry *entry(int) const;
 
 private:
 	char *_lang;
-	char *_charset;
 	char *_langName;
 	char *_langNameAlt;
 
+	bool _useUTF8;
+
 	PoMessageEntry **_list;
 	int _size;
 	int _allocated;


Commit: 9573f1e5152479f82c2ceda809a78d5a90e6dda5
    https://github.com/scummvm/scummvm/commit/9573f1e5152479f82c2ceda809a78d5a90e6dda5
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Remove useless check when converting bidiString

Changed paths:
    common/translation.cpp


diff --git a/common/translation.cpp b/common/translation.cpp
index ceeb33ea1f..cb99e64a4f 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -422,11 +422,6 @@ String TranslationManager::convertBiDiString(const String &input) {
 	if (getCurrentLanguage() != "he")		//TODO: modify when we'll support other RTL languages, such as Arabic and Farsi
 		return input;
 
-	if (getCurrentCharset() != "iso-8859-8") {
-		warning("convertBiDiString: Unexpected charset is used with %s language: %s", getCurrentLanguage().c_str(), getCurrentCharset().c_str());
-		return input;
-	};
-
 	return Common::convertBiDiString(input, HE_ISR);
 }
 
@@ -434,11 +429,6 @@ U32String TranslationManager::convertBiDiString(const U32String &input) {
 	if (getCurrentLanguage() != "he")		//TODO: modify when we'll support other RTL languages, such as Arabic and Farsi
 		return input;
 
-	if (getCurrentCharset() != "iso-8859-8") {
-		warning("convertBiDiString: Unexpected charset is used with %s language: %s", getCurrentLanguage().c_str(), getCurrentCharset().c_str());
-		return input;
-	};
-
 	return Common::convertBiDiU32String(input);
 }
 


Commit: b6278f3400b00f0f62608e99dd576db56f1ca82f
    https://github.com/scummvm/scummvm/commit/b6278f3400b00f0f62608e99dd576db56f1ca82f
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Write translation description and size for english language also as uint32BE.

All blocks of sizes are now written in uint32BE.

Changed paths:
    common/translation.cpp
    devtools/create_translations/create_translations.cpp


diff --git a/common/translation.cpp b/common/translation.cpp
index cb99e64a4f..f1d726890b 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -292,12 +292,8 @@ void TranslationManager::loadTranslationsInfoDat() {
 	int nbTranslations = in.readUint16BE();
 
 	// Skip translation description & size for the original language (english) block
-	for (int i = 0; i < 2; i++) {
-		in.readUint16BE();
-	}
-
-	// Skip size of each translation block. Each is written in Uint32BE.
-	for (int i = 0; i < nbTranslations; i++) {
+	// Also skip size of each translation block. Each block is written in Uint32BE.
+	for (int i = 0; i < nbTranslations + 2; i++) {
 		in.readUint32BE();
 	}
 
@@ -356,11 +352,8 @@ void TranslationManager::loadLanguageDat(int index) {
 	int skipSize = 0;
 
 	// Skip translation description & size for the original language (english) block
-	for (int i = 0; i < 2; ++i)
-		skipSize += in.readUint16BE();
-
-	// Skip size of each translation block. Each is written in Uint32BE.
-	for (int i = 0; i < index; ++i)
+	// Also skip size of each translation block. All block sizes are written in Uint32BE.
+	for (int i = 0; i < index + 2; ++i)
 		skipSize += in.readUint32BE();
 
 	// We also need to skip the remaining block sizes
diff --git a/devtools/create_translations/create_translations.cpp b/devtools/create_translations/create_translations.cpp
index 0ddfab9172..c0e87553a3 100644
--- a/devtools/create_translations/create_translations.cpp
+++ b/devtools/create_translations/create_translations.cpp
@@ -170,7 +170,7 @@ int main(int argc, char *argv[]) {
 		len += stringSize(translations[lang]->language());
 		len += stringSize(translations[lang]->languageName());
 	}
-	writeUint16BE(outFile, len);
+	writeUint32BE(outFile, len);
 
 	// Write size for the original language (english) block
 	// It starts with the number of strings coded on 2 bytes followed by each
@@ -178,7 +178,7 @@ int main(int argc, char *argv[]) {
 	len = 2;
 	for (i = 0; i < messageIds.size(); ++i)
 		len += stringSize(messageIds[i]);
-	writeUint16BE(outFile, len);
+	writeUint32BE(outFile, len);
 
 	// Then comes the size of each translation block.
 	// It starts with the number of strings coded on 2 bytes, and then the strings.


Commit: cec0985d5a6964f40bf01ac962a55406d35d44ae
    https://github.com/scummvm/scummvm/commit/cec0985d5a6964f40bf01ac962a55406d35d44ae
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Update credits.pl script to not write ascii string

- Also generate new credits file to reflect above changes
- Remove ascii checks from about dialog

Changed paths:
    devtools/credits.pl
    gui/about.cpp
    gui/credits.h


diff --git a/devtools/credits.pl b/devtools/credits.pl
index ec2b89f253..7dc595a87a 100755
--- a/devtools/credits.pl
+++ b/devtools/credits.pl
@@ -329,19 +329,11 @@ sub begin_section {
 		if ($section_level eq 0) {
 			# TODO: Would be nice to have a 'fat' or 'large' mode for
 			# headlines...
-			my $ascii_title = html_entities_to_ascii($title);
 			$title = html_entities_to_cpp($title);
-			if ($ascii_title ne $title) {
-				print '"A1""'.$ascii_title.'",' . "\n";
-			}
 			print '"C1""'.$title.'",' . "\n";
 			print '"",' . "\n";
 		} else {
-			my $ascii_title = html_entities_to_ascii($title);
 			$title = html_entities_to_cpp($title);
-			if ($ascii_title ne $title) {
-				print '"A1""'.$ascii_title.'",' . "\n";
-			}
 			print '"C1""'.$title.'",' . "\n";
 		}
 	} elsif ($mode eq "XML-DOC") {
@@ -504,12 +496,7 @@ sub add_person {
 		}
 	} elsif ($mode eq "CPP") {
 		$name = $nick if $name eq "";
-		my $ascii_name = html_entities_to_ascii($name);
 		$name = html_entities_to_cpp($name);
-
-		if ($ascii_name ne $name) {
-			print '"A0""'.$ascii_name.'",' . "\n";
-		}
 		print '"C0""'.$name.'",' . "\n";
 
 		# Print desc wrapped
diff --git a/gui/about.cpp b/gui/about.cpp
index 6972dde272..d6c7670350 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -152,22 +152,8 @@ void AboutDialog::addLine(const U32String &str) {
 		strBeginItr += 2;
 		U32String renderStr(strBeginItr, str.end());
 
-		static Common::U32String asciiStr;
-		if (format[0] == 'A') {
-			bool useAscii = false;
-#ifdef USE_TRANSLATION
-			useAscii = TransMan.getCurrentCharset().equals("ASCII");
-#endif
-			if (useAscii)
-				asciiStr = renderStr;
-			return;
-		}
 		U32StringArray wrappedLines;
-		if (!asciiStr.empty()) {
-			g_gui.getFont().wordWrapText(asciiStr, _w - 2 * _xOff, wrappedLines);
-			asciiStr.clear();
-		} else
-			g_gui.getFont().wordWrapText(renderStr, _w - 2 * _xOff, wrappedLines);
+		g_gui.getFont().wordWrapText(renderStr, _w - 2 * _xOff, wrappedLines);
 
 		for (U32StringArray::const_iterator i = wrappedLines.begin(); i != wrappedLines.end(); ++i) {
 			_lines.push_back(format + *i);
diff --git a/gui/credits.h b/gui/credits.h
index 1b9a27caa0..f687575f15 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -6,7 +6,6 @@ static const char *credits[] = {
 "C0""Eugene Sandulenko",
 "",
 "C1""PR Office",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C2""Public Relations Officer, Project Administrator",
 "C0""Eugene Sandulenko",
@@ -22,7 +21,6 @@ static const char *credits[] = {
 "",
 "C1""Engine Teams",
 "C1""SCUMM",
-"A0""Torbjorn Andersson",
 "C0""Torbj\366rn Andersson",
 "C0""James Brown",
 "C2""(retired)",
@@ -51,7 +49,6 @@ static const char *credits[] = {
 "C0""Eugene Sandulenko",
 "",
 "C1""Access",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Paul Gilbert",
 "",
@@ -72,7 +69,6 @@ static const char *credits[] = {
 "C2""(retired)",
 "",
 "C1""AGOS",
-"A0""Torbjorn Andersson",
 "C0""Torbj\366rn Andersson",
 "C0""Paul Gilbert",
 "C0""Travis Howell",
@@ -82,9 +78,7 @@ static const char *credits[] = {
 "C2""(retired)",
 "",
 "C1""Avalanche",
-"A0""Peter Bozso",
 "C0""Peter Bozs\363",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "",
 "C1""BBVS",
@@ -97,14 +91,11 @@ static const char *credits[] = {
 "C0""Eugene Sandulenko",
 "",
 "C1""CGE",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Paul Gilbert",
 "",
 "C1""CGE2",
-"A0""Peter Bozso",
 "C0""Peter Bozs\363",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Paul Gilbert",
 "",
@@ -142,9 +133,7 @@ static const char *credits[] = {
 "C0""Tobia Tesan",
 "",
 "C1""DM",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
-"A0""Bendeguz Nagy",
 "C0""Bendeg\372z Nagy",
 "",
 "C1""Draci",
@@ -165,7 +154,6 @@ static const char *credits[] = {
 "C0""Thierry Crozat",
 "",
 "C1""DreamWeb",
-"A0""Torbjorn Andersson",
 "C0""Torbj\366rn Andersson",
 "C0""Bertrand Augereau",
 "C0""Filippos Karapetis",
@@ -189,14 +177,11 @@ static const char *credits[] = {
 "C2""TADS interpreter",
 "",
 "C1""Gnap",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Benjamin Haisch",
 "",
 "C1""Gob",
-"A0""Torbjorn Andersson",
 "C0""Torbj\366rn Andersson",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Sven Hesse",
 "C0""Eugene Sandulenko",
@@ -215,12 +200,10 @@ static const char *credits[] = {
 "C2""GSoC student",
 "",
 "C1""Hopkins",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Paul Gilbert",
 "",
 "C1""Hugo",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Oystein Eftevaag",
 "C0""Eugene Sandulenko",
@@ -230,13 +213,11 @@ static const char *credits[] = {
 "C0""Eric Fry",
 "",
 "C1""Kingdom",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Thomas Fach-Pedersen",
 "C0""Hein-Pieter van Braam-Stewart",
 "",
 "C1""Kyra",
-"A0""Torbjorn Andersson",
 "C0""Torbj\366rn Andersson",
 "C2""VQA Player",
 "C0""Oystein Eftevaag",
@@ -247,7 +228,6 @@ static const char *credits[] = {
 "C2""(retired)",
 "",
 "C1""Lab",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Filippos Karapetis",
 "C0""Willem Jan Palenstijn",
@@ -260,7 +240,6 @@ static const char *credits[] = {
 "C0""Julien Templier",
 "",
 "C1""Lilliput",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "",
 "C1""Lure",
@@ -275,7 +254,6 @@ static const char *credits[] = {
 "C0""Filippos Karapetis",
 "",
 "C1""MADS",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Paul Gilbert",
 "C0""Filippos Karapetis",
@@ -291,14 +269,11 @@ static const char *credits[] = {
 "C0""David Fioramonti",
 "",
 "C1""Mortevielle",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Paul Gilbert",
 "",
 "C1""MutationOfJB",
-"A0""Lubomir Remak",
 "C0""Lubom\355r Rem\341k",
-"A0""Miroslav Remak",
 "C0""Miroslav Rem\341k",
 "",
 "C1""Neverhood",
@@ -326,7 +301,6 @@ static const char *credits[] = {
 "C1""Prince",
 "C0""Eugene Sandulenko",
 "C0""Lukasz Watka",
-"A0""Kamil Zbrog",
 "C0""Kamil Zbr\363g",
 "",
 "C1""Queen",
@@ -337,7 +311,6 @@ static const char *credits[] = {
 "C0""Joost Peters",
 "",
 "C1""SAGA",
-"A0""Torbjorn Andersson",
 "C0""Torbj\366rn Andersson",
 "C0""Daniel Balsom",
 "C2""Original engine reimplementation author (retired)",
@@ -364,7 +337,6 @@ static const char *credits[] = {
 "C0""Martin Kiewitz",
 "",
 "C1""Sky",
-"A0""Robert Goeffringmann",
 "C0""Robert G\366ffringmann",
 "C2""(retired)",
 "C0""Oliver Kiehl",
@@ -373,7 +345,6 @@ static const char *credits[] = {
 "",
 "C1""Supernova",
 "C0""Joseph-Eugene Winzer",
-"A0""Jaromir Wysoglad",
 "C0""Jarom\355r Wysoglad",
 "C0""Thierry Crozat",
 "",
@@ -382,12 +353,10 @@ static const char *credits[] = {
 "C2""PSX version support",
 "C0""Thierry Crozat",
 "C2""Mac version support",
-"A0""Robert Goeffringmann",
 "C0""Robert G\366ffringmann",
 "C2""(retired)",
 "",
 "C1""Sword2",
-"A0""Torbjorn Andersson",
 "C0""Torbj\366rn Andersson",
 "C0""Fabio Battaglia",
 "C2""PSX version support",
@@ -395,7 +364,6 @@ static const char *credits[] = {
 "C2""(retired)",
 "",
 "C1""Sword2.5",
-"A0""Torbjorn Andersson",
 "C0""Torbj\366rn Andersson",
 "C0""Paul Gilbert",
 "C0""Max Horn",
@@ -409,7 +377,6 @@ static const char *credits[] = {
 "C0""Vladimir Menshakov",
 "",
 "C1""Tinsel",
-"A0""Torbjorn Andersson",
 "C0""Torbj\366rn Andersson",
 "C0""Fabio Battaglia",
 "C2""PSX version support",
@@ -430,7 +397,6 @@ static const char *credits[] = {
 "C0""Filippos Karapetis",
 "",
 "C1""Tony",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Paul Gilbert",
 "C0""Alyssa Milburn",
@@ -438,13 +404,11 @@ static const char *credits[] = {
 "C1""Toon",
 "C0""Sylvain Dupont",
 "",
-"A1""Touche",
 "C1""Touch\351",
 "C0""Gregory Montoir",
 "C2""(retired)",
 "",
 "C1""TsAGE",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Paul Gilbert",
 "",
@@ -456,7 +420,6 @@ static const char *credits[] = {
 "C0""Paul Gilbert",
 "C0""Matthew Duggan",
 "C0""Matthew Jimenez",
-"A0""Daniel c. Wuerl",
 "C0""Daniel c. W\374rl",
 "C2""(Nuvie)",
 "C0""Eric Fry",
@@ -469,7 +432,6 @@ static const char *credits[] = {
 "C2""(Nuvie)",
 "C0""Malignant Manor",
 "C2""(Nuvie)",
-"A0""Markus Niemistoe",
 "C0""Markus Niemist\366",
 "C2""(Nuvie)",
 "C0""Michael Fink",
@@ -496,7 +458,6 @@ static const char *credits[] = {
 "C2""(Pentagram)",
 "",
 "C1""Voyeur",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C0""Paul Gilbert",
 "",
@@ -504,7 +465,6 @@ static const char *credits[] = {
 "C0""Eugene Sandulenko",
 "",
 "C1""Wintermute",
-"A0""Einar Johan T. Somaaen",
 "C0""Einar Johan T. S\370m\345en",
 "C0""Tobia Tesan",
 "",
@@ -538,7 +498,6 @@ static const char *credits[] = {
 "",
 "C1""iPhone / iPad",
 "C0""Oystein Eftevaag",
-"A0""Vincent Benony",
 "C0""Vincent B\351nony",
 "C0""Thierry Crozat",
 "",
@@ -577,7 +536,6 @@ static const char *credits[] = {
 "C2""(retired)",
 "",
 "C1""PlayStation 2",
-"A0""Robert Goeffringmann",
 "C0""Robert G\366ffringmann",
 "C2""(retired)",
 "C0""Max Lingua",
@@ -639,7 +597,6 @@ static const char *credits[] = {
 "C2""Heavily improved de-/encoder for DXA videos",
 "C0""Jochen Hoenicke",
 "C2""Speaker & PCjr sound support, AdLib work (retired)",
-"A0""Daniel ter Laan",
 "C0""Dani\353l ter Laan",
 "C2""Restoring original Drascula tracks, and writing convert_dxa.bat",
 "C0""Chris Page",
@@ -706,11 +663,9 @@ static const char *credits[] = {
 "",
 "C1""Packages",
 "C1""AmigaOS 4",
-"A0""Hans-Joerg Frieden",
 "C0""Hans-J\366rg Frieden",
 "C2""(retired)",
 "C0""Hubert Maier",
-"A0""Juha Niemimaki",
 "C0""Juha Niemim\344ki",
 "C2""(retired)",
 "",
@@ -745,7 +700,6 @@ static const char *credits[] = {
 "",
 "C1""MorphOS",
 "C0""Fabien Coeurjoly",
-"A0""Ruediger Hanke",
 "C0""R\374diger Hanke",
 "C2""(retired)",
 "",
@@ -787,7 +741,6 @@ static const char *credits[] = {
 "C0""Jordi Vilalta Prat",
 "",
 "C1""Czech",
-"A0""Zbynik Schwarz",
 "C0""Zbyn\354k Schwarz",
 "",
 "C1""Danish",
@@ -816,13 +769,10 @@ static const char *credits[] = {
 "C1""Italian",
 "C0""Matteo Angelino",
 "",
-"A1""Norwegian (Bokmaal)",
 "C1""Norwegian (Bokm\345l)",
-"A0""Einar Johan Somaaen",
 "C0""Einar Johan S\370m\345en",
 "",
 "C1""Norwegian (Nynorsk)",
-"A0""Einar Johan Somaaen",
 "C0""Einar Johan S\370m\345en",
 "",
 "C1""Polish",
@@ -835,7 +785,6 @@ static const char *credits[] = {
 "C0""Eugene Sandulenko",
 "",
 "C1""Spanish",
-"A0""Tomas Maidagan",
 "C0""Tom\341s Maidagan",
 "C0""Jordi Vilalta Prat",
 "",
@@ -850,20 +799,16 @@ static const char *credits[] = {
 "C1""CGE",
 "C0""Dan Serban",
 "C2""Soltys English translation",
-"A0""Victor Gonzalez",
 "C0""V\355ctor Gonz\341lez",
 "C2""Soltys Spanish translation",
-"A0""Alejandro Gomez de la Munoza",
 "C0""Alejandro G\363mez de la Mu\361oza",
 "C2""Soltys Spanish translation",
 "",
 "C1""CGE2",
-"A0""Arnaud Boutonne",
 "C0""Arnaud Boutonn\351",
 "C2""Sfinx English translation",
 "C0""Thierry Crozat",
 "C2""Sfinx English translation",
-"A0""Peter Bozso",
 "C0""Peter Bozs\363",
 "C2""Sfinx English translation editor",
 "C0""Ryan Clark",
@@ -887,7 +832,6 @@ static const char *credits[] = {
 "",
 "",
 "C1""Websites (design)",
-"A0""Dobo Balazs",
 "C0""Dob\363 Bal\341zs",
 "C2""Website design",
 "C0""William Claydon",
@@ -916,7 +860,6 @@ static const char *credits[] = {
 "C2""Sound support for C64 version of MM/Zak, Loom PCE support",
 "C0""Janne Huttunen",
 "C2""V3 actor mask support, Dig/FT SMUSH audio",
-"A0""Kovacs Endre Janos",
 "C0""Kov\341cs Endre J\341nos",
 "C2""Several fixes for Simon1",
 "C0""Jeroen Janssen",
@@ -945,14 +888,12 @@ static const char *credits[] = {
 "C2""Sound support for Amiga SCUMM V2/V3 games, MM NES support",
 "C0""Robert Crossfield",
 "C2""Improved support for Apple II/C64 versions of MM",
-"A0""Andreas Roever",
 "C0""Andreas R\366ver",
 "C2""Broken Sword I & II MPEG2 cutscene support",
 "C0""Edward Rudd",
 "C2""Fixes for playing MP3 versions of MI1/Loom audio",
 "C0""Daniel Schepler",
 "C2""Final MI1 CD music support, initial Ogg Vorbis support",
-"A0""Andre Souza",
 "C0""Andr\351 Souza",
 "C2""SDL-based OpenGL renderer",
 "C0""Tom Frost",
@@ -1069,7 +1010,6 @@ static const char *credits[] = {
 "C2""For deep tech details about C64 Zak & MM",
 "C0""Sarien Team",
 "C2""Original AGI engine code",
-"A0""Jimmi Thogersen",
 "C0""Jimmi Th\370gersen",
 "C2""For ScummRev, and much obscure code/documentation",
 "C0""Tristan Matthews",


Commit: 22ef76638c37b85ec2da691f30883f9a49832556
    https://github.com/scummvm/scummvm/commit/22ef76638c37b85ec2da691f30883f9a49832556
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Return visual from convertBiDiU32String

Changed paths:
    common/translation.cpp


diff --git a/common/translation.cpp b/common/translation.cpp
index f1d726890b..43692c9ab0 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -422,7 +422,7 @@ U32String TranslationManager::convertBiDiString(const U32String &input) {
 	if (getCurrentLanguage() != "he")		//TODO: modify when we'll support other RTL languages, such as Arabic and Farsi
 		return input;
 
-	return Common::convertBiDiU32String(input);
+	return Common::convertBiDiU32String(input).visual;
 }
 
 } // End of namespace Common


Commit: 185fb727832e48de3b90970c31464cea84e05db5
    https://github.com/scummvm/scummvm/commit/185fb727832e48de3b90970c31464cea84e05db5
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Improve U32 code

- Revert accidentally put translations in mt32.cpp
- Use U32::format in some places earlier missed
- Add %u and %i for u32::format
- Add support for GUIErrorMsgFormat to use u32::format internally
- Use the above whereever needed
- Improve linux tts by removing redundant code
- Some places I had changed nullptr -> "". Revert this

Changed paths:
    audio/softsynth/mt32.cpp
    backends/cloud/storage.cpp
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    backends/text-to-speech/linux/linux-text-to-speech.cpp
    common/achievements.cpp
    common/translation.h
    common/ustr.cpp
    engines/agi/saveload.cpp
    engines/cge/cge.cpp
    engines/drascula/drascula.cpp
    engines/engine.cpp
    engines/engine.h
    engines/glk/advsys/vm.cpp
    engines/lure/lure.cpp
    engines/mads/dialogs.cpp
    engines/mohawk/riven.cpp
    engines/mortevielle/mortevielle.cpp
    engines/scumm/dialogs.cpp
    engines/scumm/dialogs.h
    engines/scumm/scumm.cpp
    engines/supernova/supernova.cpp
    engines/zvision/file/save_manager.cpp
    gui/about.cpp
    gui/chooser.cpp
    gui/chooser.h
    gui/downloaddialog.cpp
    gui/downloaddialog.h
    gui/options.cpp
    gui/predictivedialog.cpp
    gui/widget.cpp


diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index 1079c4de78..11183058bd 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -67,12 +67,12 @@ public:
 
 	// Callbacks for reporting various errors and information
 	void onErrorControlROM() {
-		GUI::MessageDialog dialog(_("MT32Emu: Init Error - Missing or invalid Control ROM image"), _("OK"));
+		GUI::MessageDialog dialog("MT32Emu: Init Error - Missing or invalid Control ROM image");
 		dialog.runModal();
 		error("MT32emu: Init Error - Missing or invalid Control ROM image");
 	}
 	void onErrorPCMROM() {
-		GUI::MessageDialog dialog(_("MT32Emu: Init Error - Missing PCM ROM image"), _("OK"));
+		GUI::MessageDialog dialog("MT32Emu: Init Error - Missing PCM ROM image");
 		dialog.runModal();
 		error("MT32emu: Init Error - Missing PCM ROM image");
 	}
diff --git a/backends/cloud/storage.cpp b/backends/cloud/storage.cpp
index 2569b38bf5..25c623e416 100644
--- a/backends/cloud/storage.cpp
+++ b/backends/cloud/storage.cpp
@@ -345,8 +345,8 @@ void Storage::directoryDownloadedCallback(FileArrayResponse response) {
 
 	Common::U32String message;
 	if (response.value.size()) {
-		message = Common::String::format(
-			_("Download complete.\nFailed to download %u files.").encode().c_str(),
+		message = Common::U32String::format(
+			_("Download complete.\nFailed to download %u files."),
 			response.value.size());
 	} else {
 		message = _("Download complete.");
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index acd46d8340..843547ef15 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2500,14 +2500,12 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 #ifdef USE_OSD
 		Common::U32String message;
 		if (_videoMode.aspectRatioCorrection)
-			message = Common::String::format("%s\n%d x %d -> %d x %d",
-			                                 _("Enabled aspect ratio correction").encode().c_str(),
+			message = Common::U32String::format(_("Enabled aspect ratio correction") + Common::U32String("\n%d x %d -> %d x %d"),
 			                                 _videoMode.screenWidth, _videoMode.screenHeight,
 			                                 _hwScreen->w, _hwScreen->h
 			);
 		else
-			message = Common::String::format("%s\n%d x %d -> %d x %d",
-			                                 _("Disabled aspect ratio correction").encode().c_str(),
+			message = Common::U32String::format(_("Disabled aspect ratio correction") + Common::U32String("%s\n%d x %d -> %d x %d"),
 			                                 _videoMode.screenWidth, _videoMode.screenHeight,
 			                                 _hwScreen->w, _hwScreen->h
 			);
diff --git a/backends/text-to-speech/linux/linux-text-to-speech.cpp b/backends/text-to-speech/linux/linux-text-to-speech.cpp
index b2215f1754..8ff0004752 100644
--- a/backends/text-to-speech/linux/linux-text-to-speech.cpp
+++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp
@@ -194,24 +194,7 @@ bool SpeechDispatcherManager::say(const Common::U32String &str, Action action, C
 		return true;
 	}
 
-	if (charset.empty()) {
-#ifdef USE_TRANSLATION
-		charset = TransMan.getCurrentCharset();
-#else
-		charset = "ASCII";
-#endif
-	}
-
-	Common::String strToSpeak = str.encode();
-
-	char *tmpStr = Common::Encoding::convert("UTF-8", charset, strToSpeak.c_str(), strToSpeak.size());
-	if (tmpStr == nullptr) {
-		warning("Cannot convert from %s encoding for text to speech", charset.c_str());
-		pthread_mutex_unlock(&_speechMutex);
-		return true;
-	}
-	Common::String strUtf8 = tmpStr;
-	free(tmpStr);
+	Common::String strUtf8 = str.encode();;
 
 	if (!_speechQueue.empty() && action == INTERRUPT_NO_REPEAT &&
 			_speechQueue.front() == strUtf8 && isSpeaking()) {
diff --git a/common/achievements.cpp b/common/achievements.cpp
index 7a7292522e..20663a3f6f 100644
--- a/common/achievements.cpp
+++ b/common/achievements.cpp
@@ -89,7 +89,7 @@ bool AchievementsManager::setAchievement(const String &id, const String &display
 
 	if (!displayedMessage.empty() && g_system) {
 		U32String msg;
-		msg = Common::String::format("%s\n%s", _("Achievement unlocked!").encode().c_str(), displayedMessage.c_str());
+		msg = _("Achievement unlocked!") + Common::U32String("\n") + Common::U32String(displayedMessage);
 		g_system->displayMessageOnOSD(msg);
 	}
 
diff --git a/common/translation.h b/common/translation.h
index 0ab682ad18..9363c50a8c 100644
--- a/common/translation.h
+++ b/common/translation.h
@@ -110,21 +110,21 @@ public:
 	/**
 	 * Returns the translation into the current language of the parameter
 	 * message. In case the message isn't found in the translation catalog,
-	 * it returns the original untranslated message.
+	 * it returns the original untranslated message, as a U32String.
 	 */
 	U32String getTranslation(const char *message) const;
 
 	/**
 	 * Returns the translation into the current language of the parameter
 	 * message. In case the message isn't found in the translation catalog,
-	 * it returns the original untranslated message.
+	 * it returns the original untranslated message, as a U32String.
 	 */
 	U32String getTranslation(const String &message) const;
 
 	/**
 	 * Returns the translation into the current language of the parameter
 	 * message. In case the message isn't found in the translation catalog,
-	 * it returns the original untranslated message.
+	 * it returns the original untranslated message, as a U32String.
 	 *
 	 * If a translation is found for the given context it will return that
 	 * translation, otherwise it will look for a translation for the same
@@ -135,7 +135,7 @@ public:
 	/**
 	 * Returns the translation into the current language of the parameter
 	 * message. In case the message isn't found in the translation catalog,
-	 * it returns the original untranslated message.
+	 * it returns the original untranslated message, as a U32String.
 	 *
 	 * If a translation is found for the given context it will return that
 	 * translation, otherwise it will look for a translation for the same
diff --git a/common/ustr.cpp b/common/ustr.cpp
index 98f2ce6d30..ceaa1ca52b 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -571,6 +571,22 @@ int U32String::vformat(U32String::const_iterator fmt, const U32String::const_ite
 				output.insertString(buffer, pos);
 				pos += len - 1;
 				break;
+			case 'u':
+				int_temp = va_arg(args, uint);
+				itoa(int_temp, buffer, 10);
+				len = strlen(buffer);
+				length += len;
+
+				output.insertString(buffer, pos);
+				pos += len - 1;
+			case 'i':
+				int_temp = va_arg(args, uint16);
+				itoa(int_temp, buffer, 10);
+				len = strlen(buffer);
+				length += len;
+
+				output.insertString(buffer, pos);
+				pos += len - 1;
 			default:
 				warning("Unexpected formatting type for U32String::Format.");
 				break;
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 15546033d0..878d96864f 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -756,7 +756,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 	int slot;
 
 	if (isSave) {
-		dialog = new GUI::SaveLoadChooser((_("Save game:")), Common::convertToU32String(("Save")), true);
+		dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
 
 		slot = dialog->runModalWithCurrentTarget();
 		desc = dialog->getResultString();
@@ -767,7 +767,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 		}
 
 		if (desc.size() > 28)
-			desc = Common::U32String(desc.c_str(), 28);
+			desc = Common::U32String(desc.encode().c_str(), 28);
 	} else {
 		dialog = new GUI::SaveLoadChooser((_("Restore game:")), (_("Restore")), false);
 		slot = dialog->runModalWithCurrentTarget();
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index 5592f485eb..5574c8b16e 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -228,7 +228,7 @@ Common::Error CGEEngine::run() {
 		Common::U32String msg = Common::U32String(_text->getText(kSayTheEnd));
 		if (!msg.empty()) {
 			g_system->delayMillis(10);
-			GUI::MessageDialog dialog(msg, Common::U32String("OK"));
+			GUI::MessageDialog dialog(msg);
 			dialog.runModal();
 		}
 	}
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 55e7e8a9cb..e695cc146d 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -952,11 +952,11 @@ bool DrasculaEngine::loadDrasculaDat() {
 	ver = in.readByte();
 
 	if (ver != DRASCULA_DAT_VER) {
-		Common::String errorMessage = Common::String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.").encode().c_str(),
+		Common::U32String errorMessage = Common::U32String::format(
+			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
 			filename.c_str(), DRASCULA_DAT_VER, 0, ver, 0);
 		GUIErrorMessage(errorMessage);
-		warning("%s", errorMessage.c_str());
+		warning("%s", errorMessage.encode().c_str());
 
 		return false;
 	}
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 0f50871425..65f695df9c 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -38,6 +38,7 @@
 #include "common/file.h"
 #include "common/system.h"
 #include "common/str.h"
+#include "common/ustr.h"
 #include "common/error.h"
 #include "common/list.h"
 #include "common/memstream.h"
@@ -430,6 +431,17 @@ void GUIErrorMessageFormat(const char *fmt, ...) {
 	GUIErrorMessage(msg);
 }
 
+void GUIErrorMessageFormat(Common::U32String fmt, ...) {
+	Common::U32String msg("");
+
+	va_list va;
+	va_start(va, fmt);
+	Common::U32String::vformat(fmt.begin(), fmt.end(), msg, va);
+	va_end(va);
+
+	GUIErrorMessage(msg);
+}
+
 void Engine::checkCD() {
 #if defined(WIN32) && !defined(__SYMBIAN32__)
 	// It is a known bug under Windows that games that play CD audio cause
diff --git a/engines/engine.h b/engines/engine.h
index 9031cd48c4..46f939e9b9 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -55,6 +55,7 @@ class Dialog;
  */
 void GUIErrorMessage(const Common::U32String &msg, const char *url = nullptr);
 void GUIErrorMessageWithURL(const Common::U32String &msg, const char *url);
+void GUIErrorMessageFormat(Common::U32String fmt, ...);
 void GUIErrorMessageFormat(const char *fmt, ...) GCC_PRINTF(1, 2);
 
 class Engine;
diff --git a/engines/glk/advsys/vm.cpp b/engines/glk/advsys/vm.cpp
index eb264b4485..234c93ab7e 100644
--- a/engines/glk/advsys/vm.cpp
+++ b/engines/glk/advsys/vm.cpp
@@ -593,8 +593,8 @@ bool VM::getWord(Common::String &line) {
 		_words.push_back(iw);
 		return true;
 	} else {
-		Common::String msg = Common::String::format(_("I don't know the word \"%s\".\n").encode().c_str(), iw._text.c_str());
-		print(msg);
+		Common::U32String msg = Common::U32String::format(_("I don't know the word \"%s\".\n"), iw._text.c_str());
+		print(msg.encode());
 		return false;
 	}
 }
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index b39e3002f7..d6eccb1f30 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -61,7 +61,7 @@ Common::Error LureEngine::init() {
 	Common::File f;
 	VersionStructure version;
 	if (!f.open(SUPPORT_FILENAME)) {
-		GUIErrorMessageFormat(Common::convertFromU32String(_("Unable to locate the '%s' engine data file.")).c_str(), SUPPORT_FILENAME);
+		GUIErrorMessageFormat(_("Unable to locate the '%s' engine data file."), SUPPORT_FILENAME);
 		return Common::kUnknownError;
 	}
 
@@ -70,10 +70,10 @@ Common::Error LureEngine::init() {
 	f.close();
 
 	if (READ_LE_UINT16(&version.id) != 0xffff) {
-		GUIErrorMessageFormat(Common::convertFromU32String(_("The '%s' engine data file is corrupt.")).c_str(), SUPPORT_FILENAME);
+		GUIErrorMessageFormat(_("The '%s' engine data file is corrupt."), SUPPORT_FILENAME);
 		return Common::kUnknownError;
 	} else if ((version.vMajor != LURE_DAT_MAJOR) || (version.vMinor != LURE_DAT_MINOR)) {
-		GUIErrorMessageFormat(Common::convertFromU32String(_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.")).c_str(),
+		GUIErrorMessageFormat(_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
 			SUPPORT_FILENAME, LURE_DAT_MAJOR, LURE_DAT_MINOR,
 			version.vMajor, version.vMinor);
 		return Common::kUnknownError;
diff --git a/engines/mads/dialogs.cpp b/engines/mads/dialogs.cpp
index 4b97f623fa..5b99d906b2 100644
--- a/engines/mads/dialogs.cpp
+++ b/engines/mads/dialogs.cpp
@@ -352,7 +352,7 @@ void TextDialog::draw() {
 	// Draw the text lines
 	int lineYp = _position.y + 5;
 #ifdef USE_TTS
-	Common::U32String text;
+	Common::String text;
 #endif
 	for (int lineNum = 0; lineNum <= _numLines; ++lineNum) {
 		if (_lineXp[lineNum] == -1) {
@@ -393,7 +393,7 @@ void TextDialog::draw() {
 		Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 		if (ttsMan != nullptr) {
 			ttsMan->stop();
-			ttsMan->say(text);
+			ttsMan->say(Common::convertToU32String(text.c_str()));
 		}
 	}
 #endif
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index e92ac48526..9471e9faaf 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -498,8 +498,8 @@ bool MohawkEngine_Riven::checkDatafiles() {
 		return true;
 	}
 
-	Common::String message = _("You are missing the following required Riven data files:\n").encode() + missingFiles;
-	warning("%s", message.c_str());
+	Common::U32String message = _("You are missing the following required Riven data files:\n") + Common::convertToU32String(missingFiles.c_str());
+	warning("%s", message.encode().c_str());
 	GUIErrorMessage(message);
 
 	return false;
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp
index dd29a10c03..1853f33fe4 100644
--- a/engines/mortevielle/mortevielle.cpp
+++ b/engines/mortevielle/mortevielle.cpp
@@ -302,7 +302,7 @@ Common::ErrorCode MortevielleEngine::loadMortDat() {
 
 	// Open the mort.dat file
 	if (!f.open(MORT_DAT)) {
-		GUIErrorMessageFormat(_("Unable to locate the '%s' engine data file.").encode().c_str(), MORT_DAT);
+		GUIErrorMessageFormat(_("Unable to locate the '%s' engine data file."), MORT_DAT);
 		return Common::kReadingFailed;
 	}
 
@@ -310,7 +310,7 @@ Common::ErrorCode MortevielleEngine::loadMortDat() {
 	char fileId[4];
 	f.read(fileId, 4);
 	if (strncmp(fileId, "MORT", 4) != 0) {
-		GUIErrorMessageFormat(_("The '%s' engine data file is corrupt.").encode().c_str(), MORT_DAT);
+		GUIErrorMessageFormat(_("The '%s' engine data file is corrupt."), MORT_DAT);
 		return Common::kReadingFailed;
 	}
 
@@ -320,7 +320,7 @@ Common::ErrorCode MortevielleEngine::loadMortDat() {
 
 	if (majVer < MORT_DAT_REQUIRED_VERSION) {
 		GUIErrorMessageFormat(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.").encode().c_str(),
+			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
 			MORT_DAT, MORT_DAT_REQUIRED_VERSION, 0, majVer, minVer);
 		return Common::kReadingFailed;
 	}
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 25ac9211d2..738bb96af6 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -389,7 +389,7 @@ InfoDialog::InfoDialog(ScummEngine *scumm, int res)
 	_text = new GUI::StaticTextWidget(this, 0, 0, 10, 10, _message, kTextAlignCenter);
 }
 
-InfoDialog::InfoDialog(ScummEngine *scumm, const U32String& message)
+InfoDialog::InfoDialog(ScummEngine *scumm, const U32String &message)
 : ScummDialog(0, 0, 0, 0), _vm(scumm) { // dummy x and w
 
 	_message = message;
@@ -398,7 +398,7 @@ InfoDialog::InfoDialog(ScummEngine *scumm, const U32String& message)
 	_text = new GUI::StaticTextWidget(this, 0, 0, 10, 10, _message, kTextAlignCenter);
 }
 
-void InfoDialog::setInfoText(const U32String& message) {
+void InfoDialog::setInfoText(const U32String &message) {
 	_message = message;
 	_text->setLabel(_message);
 	//reflowLayout(); // FIXME: Should we call this here? Depends on the usage patterns, I guess...
@@ -477,8 +477,11 @@ void PauseDialog::handleKeyDown(Common::KeyState state) {
 ConfirmDialog::ConfirmDialog(ScummEngine *scumm, int res)
 	: InfoDialog(scumm, res), _yesKey('y'), _noKey('n') {
 
-	if (_message.encode().lastChar() != ')') {
-		_yesKey = _message.encode().lastChar();
+	if (_message.empty())
+		return;
+
+	if (_message[_message.size() - 1] != ')') {
+		_yesKey = _message[_message.size() - 1];
 		_message.deleteLastChar();
 
 		if (_yesKey >= 'A' && _yesKey <= 'Z')
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index afcf301b28..11c6ea70c4 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -74,11 +74,11 @@ protected:
 
 public:
 	// arbitrary message
-	InfoDialog(ScummEngine *scumm, const U32String& message);
+	InfoDialog(ScummEngine *scumm, const U32String &message);
 	// from resources
 	InfoDialog(ScummEngine *scumm, int res);
 
-	void setInfoText(const U32String& message);
+	void setInfoText(const U32String &message);
 
 	void handleMouseDown(int x, int y, int button, int clickCount) override {
 		setResult(0);
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index d3851269ca..a816dbc3fb 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1894,10 +1894,10 @@ void ScummEngine::setupMusic(int midi) {
 
 		if (missingFile) {
 			GUI::MessageDialog dialog(
-				Common::String::format(
+				Common::U32String::format(
 					_("Native MIDI support requires the Roland Upgrade from LucasArts,\n"
-					"but %s is missing. Using AdLib instead.").encode().c_str(), fileName.c_str()),
-				_("OK").encode());
+					"but %s is missing. Using AdLib instead."), fileName.c_str()),
+				_("OK"));
 			dialog.runModal();
 			_sound->_musicType = MDT_ADLIB;
 		}
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index 28e1067c8e..369a9526c2 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -184,7 +184,7 @@ Common::Error SupernovaEngine::loadGameStrings() {
 
 	if (stream == nullptr) {
 		Common::Language l = Common::parseLanguage(ConfMan.get("language"));
-		GUIErrorMessageFormat(_("Unable to locate the text for %s language in engine data file.").encode().c_str(), Common::getLanguageDescription(l));
+		GUIErrorMessageFormat(_("Unable to locate the text for %s language in engine data file."), Common::getLanguageDescription(l));
 		return Common::kReadingFailed;
 	}
 
@@ -455,19 +455,19 @@ Common::SeekableReadStream *SupernovaEngine::getBlockFromDatFile(Common::String
 	char id[5], lang[5];
 	id[4] = lang[4] = '\0';
 	if (!f.open(SUPERNOVA_DAT)) {
-		GUIErrorMessageFormat(_("Unable to locate the '%s' engine data file.").encode().c_str(), SUPERNOVA_DAT);
+		GUIErrorMessageFormat(_("Unable to locate the '%s' engine data file."), SUPERNOVA_DAT);
 		return nullptr;
 	}
 	f.read(id, 3);
 	if (strncmp(id, "MSN", 3) != 0) {
-		GUIErrorMessageFormat(_("The '%s' engine data file is corrupt.").encode().c_str(), SUPERNOVA_DAT);
+		GUIErrorMessageFormat(_("The '%s' engine data file is corrupt."), SUPERNOVA_DAT);
 		return nullptr;
 	}
 
 	int version = f.readByte();
 	if (version != SUPERNOVA_DAT_VERSION) {
 		GUIErrorMessageFormat(
-			_("Incorrect version of the '%s' engine data file found. Expected %d but got %d.").encode().c_str(),
+			_("Incorrect version of the '%s' engine data file found. Expected %d but got %d."),
 			SUPERNOVA_DAT, SUPERNOVA_DAT_VERSION, version);
 		return nullptr;
 	}
@@ -477,7 +477,7 @@ Common::SeekableReadStream *SupernovaEngine::getBlockFromDatFile(Common::String
 		int part = f.readByte();
 		gameBlockSize = f.readUint32LE();
 		if (f.eos()){
-			GUIErrorMessageFormat(_("Unable to find block for part %d").encode().c_str(), _MSPart);
+			GUIErrorMessageFormat(_("Unable to find block for part %d"), _MSPart);
 			return nullptr;
 		}
 		if (part == _MSPart) {
@@ -520,7 +520,7 @@ Common::Error SupernovaEngine::showTextReader(const char *extension) {
 			filename = Common::String::format("ms2.%s", extension);
 
 		if (!file.open(filename)) {
-			GUIErrorMessageFormat(_("Unable to find '%s' in game folder or the engine data file.").encode().c_str(), filename.c_str());
+			GUIErrorMessageFormat(_("Unable to find '%s' in game folder or the engine data file."), filename.c_str());
 			return Common::kReadingFailed;
 		}
 		stream = file.readStream(file.size());
diff --git a/engines/zvision/file/save_manager.cpp b/engines/zvision/file/save_manager.cpp
index 8d7c7a42b9..2bba40a771 100644
--- a/engines/zvision/file/save_manager.cpp
+++ b/engines/zvision/file/save_manager.cpp
@@ -218,10 +218,10 @@ bool SaveManager::readSaveGameHeader(Common::InSaveFile *in, SaveGameHeader &hea
 	if (header.version > SAVE_VERSION) {
 		uint tempVersion = header.version;
 		GUI::MessageDialog dialog(
-			Common::String::format(
+			Common::U32String::format(
 				_("This saved game uses version %u, but this engine only "
 				  "supports up to version %d. You will need an updated version "
-				  "of the engine to use this saved game.").encode().c_str(), tempVersion, SAVE_VERSION
+				  "of the engine to use this saved game."), tempVersion, SAVE_VERSION
 			),
 		_("OK"));
 		dialog.runModal();
diff --git a/gui/about.cpp b/gui/about.cpp
index d6c7670350..bfef4f1a39 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -99,8 +99,8 @@ AboutDialog::AboutDialog()
 	version += gScummVMVersion;
 	_lines.push_back(version);
 
-	 Common::U32String date = Common::U32String::format(_("(built on %s)"), gScummVMBuildDate);
-	 _lines.push_back(U32String("C2") + date);
+	Common::U32String date = Common::U32String::format(_("(built on %s)"), gScummVMBuildDate);
+	_lines.push_back(U32String("C2") + date);
 
 	for (i = 0; i < ARRAYSIZE(copyright_text); i++)
 		addLine(U32String(copyright_text[i]));
@@ -235,7 +235,7 @@ void AboutDialog::drawDialog(DrawLayer layerToDraw) {
 		}
 		// Trim leading whitespaces if center mode is on
 		if (align == Graphics::kTextAlignCenter)
-			while (*strLineItrBegin && *strLineItrBegin == ' ')
+			while (strLineItrBegin != strLineItrEnd && *strLineItrBegin == ' ')
 				strLineItrBegin++;
 
 		U32String renderStr(strLineItrBegin, strLineItrEnd);
diff --git a/gui/chooser.cpp b/gui/chooser.cpp
index 0ba5629785..797776e8e3 100644
--- a/gui/chooser.cpp
+++ b/gui/chooser.cpp
@@ -48,7 +48,7 @@ ChooserDialog::ChooserDialog(const U32String &title, String dialogId)
 	_chooseButton->setEnabled(false);
 }
 
-void ChooserDialog::setList(const U32StringArray& list) {
+void ChooserDialog::setList(const U32StringArray &list) {
 	_list->setList(list);
 }
 
diff --git a/gui/chooser.h b/gui/chooser.h
index 06df8fdac7..2ba416255a 100644
--- a/gui/chooser.h
+++ b/gui/chooser.h
@@ -50,7 +50,7 @@ protected:
 public:
 	ChooserDialog(const U32String &title, String dialogId = "Browser");
 
-	void setList(const U32StringArray& list);
+	void setList(const U32StringArray &list);
 
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 };
diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp
index 44b8ab096b..878bbc2b6c 100644
--- a/gui/downloaddialog.cpp
+++ b/gui/downloaddialog.cpp
@@ -224,8 +224,8 @@ Common::U32String DownloadDialog::getSpeedLabelText() {
 
 void DownloadDialog::refreshWidgets() {
 	_localDirectory = CloudMan.getDownloadLocalDirectory();
-	_remoteDirectoryLabel->setLabel(_("From: ").encode() + CloudMan.getDownloadRemoteDirectory());
-	_localDirectoryLabel->setLabel(_("To: ").encode() + _localDirectory);
+	_remoteDirectoryLabel->setLabel(_("From: ") + Common::U32String(CloudMan.getDownloadRemoteDirectory()));
+	_localDirectoryLabel->setLabel(_("To: ") + Common::U32String(_localDirectory));
 	uint32 progress = (uint32)(100 * CloudMan.getDownloadingProgress());
 	_percentLabel->setLabel(Common::String::format("%u %%", progress));
 	_downloadSizeLabel->setLabel(getSizeLabelText());
diff --git a/gui/downloaddialog.h b/gui/downloaddialog.h
index 837d3cbc52..f0d445e96f 100644
--- a/gui/downloaddialog.h
+++ b/gui/downloaddialog.h
@@ -25,6 +25,7 @@
 
 #include "gui/dialog.h"
 #include "common/str.h"
+#include "common/ustr.h"
 
 namespace GUI {
 class LauncherDialog;
diff --git a/gui/options.cpp b/gui/options.cpp
index 20caef9f3d..ff7179cd9b 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -129,11 +129,11 @@ enum {
 	kApplyCmd = 'appl'
 };
 
-static const char *savePeriodLabels[] = { _s("Never"), _s("Every 5 mins"), _s("Every 10 mins"), _s("Every 15 mins"), _s("Every 30 mins"), "" };
+static const char *savePeriodLabels[] = { _s("Never"), _s("Every 5 mins"), _s("Every 10 mins"), _s("Every 15 mins"), _s("Every 30 mins"), nullptr };
 static const int savePeriodValues[] = { 0, 5 * 60, 10 * 60, 15 * 60, 30 * 60, -1 };
 // The keyboard mouse speed values range from 0 to 7 and correspond to speeds shown in the label
 // "10" (value 3) is the default speed corresponding to the speed before introduction of this control
-static const char *kbdMouseSpeedLabels[] = { "3", "5", "8", "10", "13", "15", "18", "20", "" };
+static const char *kbdMouseSpeedLabels[] = { "3", "5", "8", "10", "13", "15", "18", "20", nullptr };
 
 OptionsDialog::OptionsDialog(const Common::String &domain, int x, int y, int w, int h)
 	: Dialog(x, y, w, h), _domain(domain), _graphicsTabId(-1), _midiTabId(-1), _pathsTabId(-1), _tabWidget(nullptr) {
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index ab1d4a2d0a..e4dc7a0a26 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -485,7 +485,7 @@ void PredictiveDialog::processButton(ButtonId button) {
 		"next",    "add",
 		"<",
 		"Cancel",  "OK",
-		"Pre", "(0) ", ""
+		"Pre", "(0) ", nullptr
 	};
 
 	if (_mode == kModeAbc) {
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 871b1ad753..0132442d46 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -294,7 +294,7 @@ void Widget::read(const Common::U32String &str) {
 #pragma mark -
 
 StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, Common::U32String tooltip, ThemeEngine::FontStyle font)
-	: Widget(boss, x, y, w, h, tooltip), _align(align) {
+	: Widget(boss, x, y, w, h, tooltip) {
 	setFlags(WIDGET_ENABLED);
 	_type = kStaticTextWidget;
 	_label = text;


Commit: d12c6c4338a686b0abfe6cd3c8365fb1c0c2896c
    https://github.com/scummvm/scummvm/commit/d12c6c4338a686b0abfe6cd3c8365fb1c0c2896c
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Code cleanup

- Remove extra parantheses leftover from temp code
- SaveLoadDialog - do not encode when setting labels
- Remove mapping variable from ThemeEngine::loadScalableFont (and use default 0)
- Remove incorrect u32 constructor wrapper from confman.set in eventrecorder.cpp

Changed paths:
    backends/keymapper/remap-widget.cpp
    engines/agi/saveload.cpp
    engines/dialogs.cpp
    engines/engine.cpp
    gui/EventRecorder.cpp
    gui/ThemeEngine.cpp
    gui/browser.cpp
    gui/chooser.cpp
    gui/downloaddialog.cpp
    gui/editgamedialog.cpp
    gui/filebrowser-dialog.cpp
    gui/launcher.cpp
    gui/massadd.cpp
    gui/options.cpp
    gui/predictivedialog.cpp
    gui/remotebrowser.cpp
    gui/saveload-dialog.cpp
    gui/themebrowser.cpp
    gui/unknown-game-dialog.cpp
    gui/widget.cpp


diff --git a/backends/keymapper/remap-widget.cpp b/backends/keymapper/remap-widget.cpp
index cb56ac16e1..abd3caf7e6 100644
--- a/backends/keymapper/remap-widget.cpp
+++ b/backends/keymapper/remap-widget.cpp
@@ -282,8 +282,8 @@ void RemapWidget::refreshKeymap() {
 			row.actionText->setLabel(row.action->description);
 
 			row.keyButton = new GUI::DropdownButtonWidget(widgetsBoss(), 0, 0, 0, 0, U32String(""), U32String(""), kRemapCmd + i);
-			row.keyButton->appendEntry((_("Reset to defaults")), kResetActionCmd + i);
-			row.keyButton->appendEntry((_("Clear mapping")), kClearCmd + i);
+			row.keyButton->appendEntry(_("Reset to defaults"), kResetActionCmd + i);
+			row.keyButton->appendEntry(_("Clear mapping"), kClearCmd + i);
 		}
 
 		Array<HardwareInput> mappedInputs = row.keymap->getActionMapping(row.action);
@@ -311,8 +311,8 @@ void RemapWidget::refreshKeymap() {
 			keymapTitle.resetButton = new GUI::ButtonWidget(widgetsBoss(), 0, 0, 0, 0, U32String(""), U32String(""), kResetKeymapCmd + i);
 
 			// I18N: Button to reset keymap mappings to defaults
-			keymapTitle.resetButton->setLabel((_("Reset")));
-			keymapTitle.resetButton->setTooltip((_("Reset to defaults")));
+			keymapTitle.resetButton->setLabel(_("Reset"));
+			keymapTitle.resetButton->setTooltip(_("Reset to defaults"));
 		}
 	}
 }
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 878d96864f..f02fadd55f 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -769,7 +769,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 		if (desc.size() > 28)
 			desc = Common::U32String(desc.encode().c_str(), 28);
 	} else {
-		dialog = new GUI::SaveLoadChooser((_("Restore game:")), (_("Restore")), false);
+		dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
 		slot = dialog->runModalWithCurrentTarget();
 	}
 
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 227449fd88..efb4c6974c 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -70,9 +70,9 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
 	GUI::StaticTextWidget *version = new GUI::StaticTextWidget(this, "GlobalMenu.Version", Common::U32String(gScummVMVersionDate));
 	version->setAlign(Graphics::kTextAlignCenter);
 
-	new GUI::ButtonWidget(this, "GlobalMenu.Resume", (_("~R~esume")), Common::U32String(""), kPlayCmd, 'P');
+	new GUI::ButtonWidget(this, "GlobalMenu.Resume", _("~R~esume"), Common::U32String(""), kPlayCmd, 'P');
 
-	_loadButton = new GUI::ButtonWidget(this, "GlobalMenu.Load", (_("~L~oad")), Common::U32String(""), kLoadCmd);
+	_loadButton = new GUI::ButtonWidget(this, "GlobalMenu.Load", _("~L~oad"), Common::U32String(""), kLoadCmd);
 	_loadButton->setVisible(_engine->hasFeature(Engine::kSupportsLoadingDuringRuntime));
 	_loadButton->setEnabled(_engine->hasFeature(Engine::kSupportsLoadingDuringRuntime));
 
@@ -80,27 +80,27 @@ MainMenuDialog::MainMenuDialog(Engine *engine)
 	_saveButton->setVisible(_engine->hasFeature(Engine::kSupportsSavingDuringRuntime));
 	_saveButton->setEnabled(_engine->hasFeature(Engine::kSupportsSavingDuringRuntime));
 
-	new GUI::ButtonWidget(this, "GlobalMenu.Options", (_("~O~ptions")), Common::U32String(""), kOptionsCmd);
+	new GUI::ButtonWidget(this, "GlobalMenu.Options", _("~O~ptions"), Common::U32String(""), kOptionsCmd);
 
 	// The help button is disabled by default.
 	// To enable "Help", an engine needs to use a subclass of MainMenuDialog
 	// (at least for now, we might change how this works in the future).
-	_helpButton = new GUI::ButtonWidget(this, "GlobalMenu.Help", (_("~H~elp")), Common::U32String(""), kHelpCmd);
+	_helpButton = new GUI::ButtonWidget(this, "GlobalMenu.Help", _("~H~elp"), Common::U32String(""), kHelpCmd);
 
-	new GUI::ButtonWidget(this, "GlobalMenu.About", (_("~A~bout")), Common::U32String(""), kAboutCmd);
+	new GUI::ButtonWidget(this, "GlobalMenu.About", _("~A~bout"), Common::U32String(""), kAboutCmd);
 
 	if (g_system->getOverlayWidth() > 320)
-		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", (_("~R~eturn to Launcher")), Common::U32String(""), kLauncherCmd);
+		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", _("~R~eturn to Launcher"), Common::U32String(""), kLauncherCmd);
 	else
-		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", (_c("~R~eturn to Launcher", "lowres")), Common::U32String(""), kLauncherCmd);
+		_returnToLauncherButton = new GUI::ButtonWidget(this, "GlobalMenu.ReturnToLauncher", _c("~R~eturn to Launcher", "lowres"), Common::U32String(""), kLauncherCmd);
 	_returnToLauncherButton->setEnabled(_engine->hasFeature(Engine::kSupportsReturnToLauncher));
 
 	if (!g_system->hasFeature(OSystem::kFeatureNoQuit))
-		new GUI::ButtonWidget(this, "GlobalMenu.Quit", (_("~Q~uit")), Common::U32String(""), kQuitCmd);
+		new GUI::ButtonWidget(this, "GlobalMenu.Quit", _("~Q~uit"), Common::U32String(""), kQuitCmd);
 
 	_aboutDialog = new GUI::AboutDialog();
-	_loadDialog = new GUI::SaveLoadChooser((_("Load game:")), (_("Load")), false);
-	_saveDialog = new GUI::SaveLoadChooser((_("Save game:")), (_("Save")), true);
+	_loadDialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false);
+	_saveDialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
 }
 
 MainMenuDialog::~MainMenuDialog() {
@@ -282,7 +282,7 @@ ConfigDialog::ConfigDialog() :
 	// The game specific options tab
 	//
 
-	int tabId = tab->addTab((_("Game")), "GlobalConfig_Engine");
+	int tabId = tab->addTab(_("Game"), "GlobalConfig_Engine");
 
 	if (g_engine->hasFeature(Engine::kSupportsChangingOptionsDuringRuntime)) {
 		_engineOptions = metaEngine.buildEngineOptionsWidget(tab, "GlobalConfig_Engine.Container", gameDomain);
@@ -298,7 +298,7 @@ ConfigDialog::ConfigDialog() :
 	// The Audio / Subtitles tab
 	//
 
-	tab->addTab((_("Audio")), "GlobalConfig_Audio");
+	tab->addTab(_("Audio"), "GlobalConfig_Audio");
 
 	//
 	// Sound controllers
@@ -323,7 +323,7 @@ ConfigDialog::ConfigDialog() :
 
 	Common::KeymapArray keymaps = metaEngine.initKeymaps(gameDomain.c_str());
 	if (!keymaps.empty()) {
-		tab->addTab((_("Keymaps")), "GlobalConfig_KeyMapper");
+		tab->addTab(_("Keymaps"), "GlobalConfig_KeyMapper");
 		addKeyMapperControls(tab, "GlobalConfig_KeyMapper.", keymaps, gameDomain);
 	}
 
@@ -332,7 +332,7 @@ ConfigDialog::ConfigDialog() :
 	//
 	Common::AchievementsInfo achievementsInfo = metaEngine.getAchievementsInfo(gameDomain);
 	if (achievementsInfo.descriptions.size() > 0) {
-		tab->addTab((_("Achievements")), "GlobalConfig_Achievements");
+		tab->addTab(_("Achievements"), "GlobalConfig_Achievements");
 		addAchievementsControls(tab, "GlobalConfig_Achievements.", achievementsInfo);
 	}
 
@@ -343,8 +343,8 @@ ConfigDialog::ConfigDialog() :
 	// Add the buttons
 	//
 
-	new GUI::ButtonWidget(this, "GlobalConfig.Ok", (_("~O~K")), Common::U32String(""), GUI::kOKCmd);
-	new GUI::ButtonWidget(this, "GlobalConfig.Cancel", (_("~C~ancel")), Common::U32String(""), GUI::kCloseCmd);
+	new GUI::ButtonWidget(this, "GlobalConfig.Ok", _("~O~K"), Common::U32String(""), GUI::kOKCmd);
+	new GUI::ButtonWidget(this, "GlobalConfig.Cancel", _("~C~ancel"), Common::U32String(""), GUI::kCloseCmd);
 
 #ifdef GUI_ENABLE_KEYSDIALOG
 	new GUI::ButtonWidget(this, "GlobalConfig.Keys", _("~K~eys"), 0, kKeysCmd);
@@ -408,7 +408,7 @@ ExtraGuiOptionsWidget::ExtraGuiOptionsWidget(GuiObject *containerBoss, const Com
 	for (iter = _options.begin(); iter != _options.end(); ++iter, ++i) {
 		Common::String id = Common::String::format("%d", i);
 		_checkboxes.push_back(new CheckboxWidget(widgetsBoss(),
-			_dialogLayout + ".customOption" + id + "Checkbox", (_(iter->label)), _(iter->tooltip)));
+			_dialogLayout + ".customOption" + id + "Checkbox", _(iter->label), _(iter->tooltip)));
 	}
 }
 
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 65f695df9c..0c606061fa 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -777,7 +777,7 @@ bool Engine::loadGameDialog() {
 		return false;
 	}
 
-	GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser((_("Load game:")), (_("Load")), false);
+	GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false);
 
 	int slotNum;
 	{
@@ -806,7 +806,7 @@ bool Engine::saveGameDialog() {
 		return false;
 	}
 
-	GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser((_("Save game:")), (_("Save")), true);
+	GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
 	int slotNum;
 	{
 		PauseToken pt = pauseEngine();
diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp
index 45324167c1..b31fcb9711 100644
--- a/gui/EventRecorder.cpp
+++ b/gui/EventRecorder.cpp
@@ -649,7 +649,7 @@ bool EventRecorder::switchMode() {
 			g_system->getEventManager()->pushEvent(eventReturnToLauncher);
 		}
 	}
-	ConfMan.set("record_mode", Common::U32String(""), Common::ConfigManager::kTransientDomain);
+	ConfMan.set("record_mode", "", Common::ConfigManager::kTransientDomain);
 	ConfMan.setInt("save_slot", emptySlot, Common::ConfigManager::kTransientDomain);
 	_needcontinueGame = true;
 	return true;
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index a2202dd790..a22c4ee0b5 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -1614,7 +1614,6 @@ DrawData ThemeEngine::parseDrawDataId(const Common::String &name) const {
 
 const Graphics::Font *ThemeEngine::loadScalableFont(const Common::String &filename, const Common::String &charset, const int pointsize, Common::String &name) {
 #ifdef USE_FREETYPE2
-	const uint32 *mapping = 0;
 	name = Common::String::format("%s-%s@%d", filename.c_str(), charset.c_str(), pointsize);
 
 	// Try already loaded fonts.
@@ -1628,7 +1627,7 @@ const Graphics::Font *ThemeEngine::loadScalableFont(const Common::String &filena
 	for (Common::ArchiveMemberList::const_iterator i = members.begin(), end = members.end(); i != end; ++i) {
 		Common::SeekableReadStream *stream = (*i)->createReadStream();
 		if (stream) {
-			font = Graphics::loadTTFFont(*stream, pointsize, Graphics::kTTFSizeModeCharacter, 0, Graphics::kTTFRenderModeLight, mapping);
+			font = Graphics::loadTTFFont(*stream, pointsize, Graphics::kTTFSizeModeCharacter, 0, Graphics::kTTFRenderModeLight);
 			delete stream;
 
 			if (font)
@@ -1637,7 +1636,7 @@ const Graphics::Font *ThemeEngine::loadScalableFont(const Common::String &filena
 	}
 
 	// Try loading the font from the common fonts archive.
-	font = Graphics::loadTTFFontFromArchive(filename, pointsize, Graphics::kTTFSizeModeCharacter, 0, Graphics::kTTFRenderModeLight, mapping);
+	font = Graphics::loadTTFFontFromArchive(filename, pointsize, Graphics::kTTFSizeModeCharacter, 0, Graphics::kTTFRenderModeLight);
 	if (font)
 		return font;
 #endif
diff --git a/gui/browser.cpp b/gui/browser.cpp
index d2d5b80493..6284e63e98 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -76,11 +76,11 @@ BrowserDialog::BrowserDialog(const Common::U32String &title, bool dirBrowser)
 
 	// Buttons
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(this, "Browser.Up", (_("Go up")), _("Go to previous directory level"), kGoUpCmd);
+		new ButtonWidget(this, "Browser.Up", _("Go up"), _("Go to previous directory level"), kGoUpCmd);
 	else
-		new ButtonWidget(this, "Browser.Up", (_c("Go up", "lowres")), _("Go to previous directory level"), kGoUpCmd);
-	new ButtonWidget(this, "Browser.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
-	new ButtonWidget(this, "Browser.Choose", (_("Choose")), Common::U32String(""), kChooseCmd);
+		new ButtonWidget(this, "Browser.Up", _c("Go up", "lowres"), _("Go to previous directory level"), kGoUpCmd);
+	new ButtonWidget(this, "Browser.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "Browser.Choose", _("Choose"), Common::U32String(""), kChooseCmd);
 }
 
 int BrowserDialog::runModal() {
diff --git a/gui/chooser.cpp b/gui/chooser.cpp
index 797776e8e3..16bd36a030 100644
--- a/gui/chooser.cpp
+++ b/gui/chooser.cpp
@@ -43,8 +43,8 @@ ChooserDialog::ChooserDialog(const U32String &title, String dialogId)
 	_list->setEditable(false);
 
 	// Buttons
-	new ButtonWidget(this, dialogId + ".Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
-	_chooseButton = new ButtonWidget(this, dialogId + ".Choose", (_("Choose")), Common::U32String(""), kChooseCmd);
+	new ButtonWidget(this, dialogId + ".Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
+	_chooseButton = new ButtonWidget(this, dialogId + ".Choose", _("Choose"), Common::U32String(""), kChooseCmd);
 	_chooseButton->setEnabled(false);
 }
 
diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp
index 878bbc2b6c..173df7d01d 100644
--- a/gui/downloaddialog.cpp
+++ b/gui/downloaddialog.cpp
@@ -46,11 +46,11 @@ DownloadDialog::DownloadDialog(uint32 storageId, LauncherDialog *launcher) :
 	Dialog("GlobalOptions_Cloud_DownloadDialog"), _launcher(launcher), _close(false) {
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
-	_browser = new BrowserDialog((_("Select directory where to download game data")), true);
+	_browser = new BrowserDialog(_("Select directory where to download game data"), true);
 	_remoteBrowser = new RemoteBrowserDialog(_("Select directory with game data"));
 
-	_remoteDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.RemoteDirectory", (_("From: ")));
-	_localDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.LocalDirectory", (_("To: ")));
+	_remoteDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.RemoteDirectory", _("From: "));
+	_localDirectoryLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.LocalDirectory", _("To: "));
 	uint32 progress = (uint32)(100 * CloudMan.getDownloadingProgress());
 	_progressBar = new SliderWidget(this, "GlobalOptions_Cloud_DownloadDialog.ProgressBar");
 	_progressBar->setMinValue(0);
@@ -61,11 +61,11 @@ DownloadDialog::DownloadDialog(uint32 storageId, LauncherDialog *launcher) :
 	_downloadSizeLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSize", Common::U32String(""));
 	_downloadSpeedLabel = new StaticTextWidget(this, "GlobalOptions_Cloud_DownloadDialog.DownloadSpeed", Common::U32String(""));
 	if (g_system->getOverlayWidth() > 320)
-		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", (_("Cancel download")), Common::U32String(""), kDownloadDialogButtonCmd);
+		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", _("Cancel download"), Common::U32String(""), kDownloadDialogButtonCmd);
 	else
-		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", (_c("Cancel download", "lowres")), Common::U32String(""), kDownloadDialogButtonCmd);
+		_cancelButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.MainButton", _c("Cancel download", "lowres"), Common::U32String(""), kDownloadDialogButtonCmd);
 
-	_closeButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.CloseButton", (_("Hide")), Common::U32String(""), kCloseCmd);
+	_closeButton = new ButtonWidget(this, "GlobalOptions_Cloud_DownloadDialog.CloseButton", _("Hide"), Common::U32String(""), kCloseCmd);
 	refreshWidgets();
 
 	CloudMan.setDownloadTarget(this);
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index 2402657b19..a10357676c 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -132,26 +132,26 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	// 1) The game tab
 	//
-	tab->addTab((_("Game")), "GameOptions_Game");
+	tab->addTab(_("Game"), "GameOptions_Game");
 
 	// GUI:  Label & edit widget for the game ID
 	if (g_system->getOverlayWidth() > 320)
-		new StaticTextWidget(tab, "GameOptions_Game.Id", (_("ID:")), _("Short game identifier used for referring to saved games and running the game from the command line"));
+		new StaticTextWidget(tab, "GameOptions_Game.Id", _("ID:"), _("Short game identifier used for referring to saved games and running the game from the command line"));
 	else
-		new StaticTextWidget(tab, "GameOptions_Game.Id", (_c("ID:", "lowres")), _("Short game identifier used for referring to saved games and running the game from the command line"));
+		new StaticTextWidget(tab, "GameOptions_Game.Id", _c("ID:", "lowres"), _("Short game identifier used for referring to saved games and running the game from the command line"));
 	_domainWidget = new DomainEditTextWidget(tab, "GameOptions_Game.Domain", _domain, _("Short game identifier used for referring to saved games and running the game from the command line"));
 
 	// GUI:  Label & edit widget for the description
 	if (g_system->getOverlayWidth() > 320)
-		new StaticTextWidget(tab, "GameOptions_Game.Name", (_("Name:")), _("Full title of the game"));
+		new StaticTextWidget(tab, "GameOptions_Game.Name", _("Name:"), _("Full title of the game"));
 	else
-		new StaticTextWidget(tab, "GameOptions_Game.Name", (_c("Name:", "lowres")), _("Full title of the game"));
+		new StaticTextWidget(tab, "GameOptions_Game.Name", _c("Name:", "lowres"), _("Full title of the game"));
 	_descriptionWidget = new EditTextWidget(tab, "GameOptions_Game.Desc", description, _("Full title of the game"));
 
 	// Language popup
-	_langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", (_("Language:")), _("Language of the game. This will not turn your Spanish game version into English"));
+	_langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", _("Language:"), _("Language of the game. This will not turn your Spanish game version into English"));
 	_langPopUp = new PopUpWidget(tab, "GameOptions_Game.LangPopup", _("Language of the game. This will not turn your Spanish game version into English"));
-	_langPopUp->appendEntry((_("<default>")), (uint32)Common::UNK_LANG);
+	_langPopUp->appendEntry(_("<default>"), (uint32)Common::UNK_LANG);
 	_langPopUp->appendEntry(Common::U32String(""), (uint32)Common::UNK_LANG);
 	const Common::LanguageDescription *l = Common::g_languages;
 	for (; l->code; ++l) {
@@ -161,11 +161,11 @@ EditGameDialog::EditGameDialog(const String &domain)
 
 	// Platform popup
 	if (g_system->getOverlayWidth() > 320)
-		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", (_("Platform:")), _("Platform the game was originally designed for"));
+		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", _("Platform:"), _("Platform the game was originally designed for"));
 	else
-		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", (_c("Platform:", "lowres")), _("Platform the game was originally designed for"));
+		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", _c("Platform:", "lowres"), _("Platform the game was originally designed for"));
 	_platformPopUp = new PopUpWidget(tab, "GameOptions_Game.PlatformPopup", _("Platform the game was originally designed for"));
-	_platformPopUp->appendEntry((_("<default>")));
+	_platformPopUp->appendEntry(_("<default>"));
 	_platformPopUp->appendEntry(Common::U32String(""));
 	const Common::PlatformDescription *p = Common::g_platforms;
 	for (; p->code; ++p) {
@@ -177,7 +177,7 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 
 	if (plugin) {
-		int tabId = tab->addTab((_("Engine")), "GameOptions_Engine");
+		int tabId = tab->addTab(_("Engine"), "GameOptions_Engine");
 
 		const MetaEngine &metaEngine = plugin->get<MetaEngine>();
 		metaEngine.registerDefaultSettings(_domain);
@@ -193,15 +193,15 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	// 3) The graphics tab
 	//
-	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? (_("Graphics")) : (_("GFX")), "GameOptions_Graphics");
+	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX"), "GameOptions_Graphics");
 	ScrollContainerWidget *graphicsContainer = new ScrollContainerWidget(tab, "GameOptions_Graphics.Container", "GameOptions_Graphics_Container", kGraphicsTabContainerReflowCmd);
 	graphicsContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
 	graphicsContainer->setTarget(this);
 
 	if (g_system->getOverlayWidth() > 320)
-		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", (_("Override global graphic settings")), Common::U32String(""), kCmdGlobalGraphicsOverride);
+		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", _("Override global graphic settings"), Common::U32String(""), kCmdGlobalGraphicsOverride);
 	else
-		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", (_c("Override global graphic settings", "lowres")), Common::U32String(""), kCmdGlobalGraphicsOverride);
+		_globalGraphicsOverride = new CheckboxWidget(graphicsContainer, "GameOptions_Graphics_Container.EnableTabCheckbox", _c("Override global graphic settings", "lowres"), Common::U32String(""), kCmdGlobalGraphicsOverride);
 
 	addGraphicControls(graphicsContainer, "GameOptions_Graphics_Container.");
 
@@ -211,12 +211,12 @@ EditGameDialog::EditGameDialog(const String &domain)
 
 	_globalShaderOverride = nullptr;
 	if (g_system->hasFeature(OSystem::kFeatureShader)) {
-		tab->addTab((_("Shader")), "GameOptions_Shader");
+		tab->addTab(_("Shader"), "GameOptions_Shader");
 
 		if (g_system->getOverlayWidth() > 320)
-			_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", (_("Override global shader settings")), Common::U32String(""), kCmdGlobalShaderOverride);
+			_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", _("Override global shader settings"), Common::U32String(""), kCmdGlobalShaderOverride);
 		else
-			_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", (_c("Override global shader settings", "lowres")), Common::U32String(""), kCmdGlobalShaderOverride);
+			_globalShaderOverride = new CheckboxWidget(tab, "GameOptions_Shader.EnableTabCheckbox", _c("Override global shader settings", "lowres"), Common::U32String(""), kCmdGlobalShaderOverride);
 
 		addShaderControls(tab, "GameOptions_Shader.");
 	}
@@ -230,7 +230,7 @@ EditGameDialog::EditGameDialog(const String &domain)
 	}
 
 	if (!keymaps.empty()) {
-		tab->addTab((_("Keymaps")), "GameOptions_KeyMapper");
+		tab->addTab(_("Keymaps"), "GameOptions_KeyMapper");
 		addKeyMapperControls(tab, "GameOptions_KeyMapper.", keymaps, domain);
 	}
 
@@ -240,9 +240,9 @@ EditGameDialog::EditGameDialog(const String &domain)
 	tab->addTab((_("Audio")), "GameOptions_Audio");
 
 	if (g_system->getOverlayWidth() > 320)
-		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", (_("Override global audio settings")), Common::U32String(""), kCmdGlobalAudioOverride);
+		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", _("Override global audio settings"), Common::U32String(""), kCmdGlobalAudioOverride);
 	else
-		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", (_c("Override global audio settings", "lowres")), Common::U32String(""), kCmdGlobalAudioOverride);
+		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", _c("Override global audio settings", "lowres"), Common::U32String(""), kCmdGlobalAudioOverride);
 
 	addAudioControls(tab, "GameOptions_Audio.");
 	addSubtitleControls(tab, "GameOptions_Audio.");
@@ -251,14 +251,14 @@ EditGameDialog::EditGameDialog(const String &domain)
 	// 5) The volume tab
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab((_("Volume")), "GameOptions_Volume");
+		tab->addTab(_("Volume"), "GameOptions_Volume");
 	else
-		tab->addTab((_c("Volume", "lowres")), "GameOptions_Volume");
+		tab->addTab(_c("Volume", "lowres"), "GameOptions_Volume");
 
 	if (g_system->getOverlayWidth() > 320)
-		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", (_("Override global volume settings")), Common::U32String(""), kCmdGlobalVolumeOverride);
+		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", _("Override global volume settings"), Common::U32String(""), kCmdGlobalVolumeOverride);
 	else
-		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", (_c("Override global volume settings", "lowres")), Common::U32String(""), kCmdGlobalVolumeOverride);
+		_globalVolumeOverride = new CheckboxWidget(tab, "GameOptions_Volume.EnableTabCheckbox", _c("Override global volume settings", "lowres"), Common::U32String(""), kCmdGlobalVolumeOverride);
 
 	addVolumeControls(tab, "GameOptions_Volume.");
 
@@ -269,12 +269,12 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	_globalMIDIOverride = nullptr;
 	if (showMidi) {
-		tab->addTab((_("MIDI")), "GameOptions_MIDI");
+		tab->addTab(_("MIDI"), "GameOptions_MIDI");
 
 		if (g_system->getOverlayWidth() > 320)
-			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", (_("Override global MIDI settings")), Common::U32String(""), kCmdGlobalMIDIOverride);
+			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _("Override global MIDI settings"), Common::U32String(""), kCmdGlobalMIDIOverride);
 		else
-			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", (_c("Override global MIDI settings", "lowres")), Common::U32String(""), kCmdGlobalMIDIOverride);
+			_globalMIDIOverride = new CheckboxWidget(tab, "GameOptions_MIDI.EnableTabCheckbox", _c("Override global MIDI settings", "lowres"), Common::U32String(""), kCmdGlobalMIDIOverride);
 
 		addMIDIControls(tab, "GameOptions_MIDI.");
 	}
@@ -284,12 +284,12 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	_globalMT32Override = nullptr;
 	if (showMidi) {
-		tab->addTab((_("MT-32")), "GameOptions_MT32");
+		tab->addTab(_("MT-32"), "GameOptions_MT32");
 
 		if (g_system->getOverlayWidth() > 320)
-			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", (_("Override global MT-32 settings")), Common::U32String(""), kCmdGlobalMT32Override);
+			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _("Override global MT-32 settings"), Common::U32String(""), kCmdGlobalMT32Override);
 		else
-			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", (_c("Override global MT-32 settings", "lowres")), Common::U32String(""), kCmdGlobalMT32Override);
+			_globalMT32Override = new CheckboxWidget(tab, "GameOptions_MT32.EnableTabCheckbox", _c("Override global MT-32 settings", "lowres"), Common::U32String(""), kCmdGlobalMT32Override);
 
 		addMT32Controls(tab, "GameOptions_MT32.");
 	}
@@ -298,9 +298,9 @@ EditGameDialog::EditGameDialog(const String &domain)
 	// 8) The Paths tab
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab((_("Paths")), "GameOptions_Paths");
+		tab->addTab(_("Paths"), "GameOptions_Paths");
 	else
-		tab->addTab((_c("Paths", "lowres")), "GameOptions_Paths");
+		tab->addTab(_c("Paths", "lowres"), "GameOptions_Paths");
 
 	// These buttons have to be extra wide, or the text will be truncated
 	// in the small version of the GUI.
@@ -314,18 +314,18 @@ EditGameDialog::EditGameDialog(const String &domain)
 
 	// GUI:  Button + Label for the additional path
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(tab, "GameOptions_Paths.Extrapath", (_("Extra Path:")), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _("Extra Path:"), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
 	else
-		new ButtonWidget(tab, "GameOptions_Paths.Extrapath", (_c("Extra Path:", "lowres")), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Extrapath", _c("Extra Path:", "lowres"), _("Specifies path to additional data used by the game"), kCmdExtraBrowser);
 	_extraPathWidget = new StaticTextWidget(tab, "GameOptions_Paths.ExtrapathText", extraPath, _("Specifies path to additional data used by the game"));
 
 	_extraPathClearButton = addClearButton(tab, "GameOptions_Paths.ExtraPathClearButton", kCmdExtraPathClear);
 
 	// GUI:  Button + Label for the save path
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(tab, "GameOptions_Paths.Savepath", (_("Save Path:")), _("Specifies where your saved games are put"), kCmdSaveBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Savepath", _("Save Path:"), _("Specifies where your saved games are put"), kCmdSaveBrowser);
 	else
-		new ButtonWidget(tab, "GameOptions_Paths.Savepath", (_c("Save Path:", "lowres")), _("Specifies where your saved games are put"), kCmdSaveBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Savepath", _c("Save Path:", "lowres"), _("Specifies where your saved games are put"), kCmdSaveBrowser);
 	_savePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.SavepathText", savePath, _("Specifies where your saved games are put"));
 
 	_savePathClearButton = addClearButton(tab, "GameOptions_Paths.SavePathClearButton", kCmdSavePathClear);
@@ -347,8 +347,8 @@ EditGameDialog::EditGameDialog(const String &domain)
 	_tabWidget = tab;
 
 	// Add OK & Cancel buttons
-	new ButtonWidget(this, "GameOptions.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
-	new ButtonWidget(this, "GameOptions.Ok", (_("OK")), Common::U32String(""), kOKCmd);
+	new ButtonWidget(this, "GameOptions.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "GameOptions.Ok", _("OK"), Common::U32String(""), kOKCmd);
 }
 
 void EditGameDialog::setupGraphicsTab() {
@@ -361,12 +361,12 @@ void EditGameDialog::open() {
 
 	String extraPath(ConfMan.get("extrapath", _domain));
 	if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) {
-		_extraPathWidget->setLabel((_c("None", "path")));
+		_extraPathWidget->setLabel(_c("None", "path"));
 	}
 
 	String savePath(ConfMan.get("savepath", _domain));
 	if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) {
-		_savePathWidget->setLabel((_("Default")));
+		_savePathWidget->setLabel(_("Default"));
 	}
 
 	int sel, i;
@@ -506,7 +506,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 		break;
 	case kCmdChooseSoundFontCmd:
 	{
-		BrowserDialog browser((_("Select SoundFont")), false);
+		BrowserDialog browser(_("Select SoundFont"), false);
 
 		if (browser.runModal() > 0) {
 			// User made this choice...
@@ -526,7 +526,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	// Change path for the game
 	case kCmdGameBrowser:
 	{
-		BrowserDialog browser((_("Select directory with game data")), true);
+		BrowserDialog browser(_("Select directory with game data"), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -545,7 +545,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	// Change path for extra game data (eg, using sword cutscenes when playing via CD)
 	case kCmdExtraBrowser:
 	{
-		BrowserDialog browser((_("Select additional game directory")), true);
+		BrowserDialog browser(_("Select additional game directory"), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -558,7 +558,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	// Change path for stored save game (perm and temp) data
 	case kCmdSaveBrowser:
 	{
-		BrowserDialog browser((_("Select directory for saved games")), true);
+		BrowserDialog browser(_("Select directory for saved games"), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -574,11 +574,11 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 	}
 
 	case kCmdExtraPathClear:
-		_extraPathWidget->setLabel((_c("None", "path")));
+		_extraPathWidget->setLabel(_c("None", "path"));
 		break;
 
 	case kCmdSavePathClear:
-		_savePathWidget->setLabel((_("Default")));
+		_savePathWidget->setLabel(_("Default"));
 		break;
 
 	case kOKCmd:
diff --git a/gui/filebrowser-dialog.cpp b/gui/filebrowser-dialog.cpp
index eccb682a2a..bbbf6144fb 100644
--- a/gui/filebrowser-dialog.cpp
+++ b/gui/filebrowser-dialog.cpp
@@ -47,7 +47,7 @@ FileBrowserDialog::FileBrowserDialog(const char *title, const char *fileExtensio
 	_fileList = nullptr;
 
 	new StaticTextWidget(this, "FileBrowser.Headline", title ? Common::convertToU32String(title) :
-					mode == kFBModeLoad ? (_("Choose file for loading")) : (_("Enter filename for saving")));
+					mode == kFBModeLoad ? _("Choose file for loading") : _("Enter filename for saving"));
 
 	_fileName = new EditTextWidget(this, "FileBrowser.Filename", Common::U32String(""));
 
@@ -62,8 +62,8 @@ FileBrowserDialog::FileBrowserDialog(const char *title, const char *fileExtensio
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
 	// Buttons
-	new ButtonWidget(this, "FileBrowser.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
-	new ButtonWidget(this, "FileBrowser.Choose", (_("Choose")), Common::U32String(""), kChooseCmd);
+	new ButtonWidget(this, "FileBrowser.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "FileBrowser.Choose", _("Choose"), Common::U32String(""), kChooseCmd);
 }
 
 void FileBrowserDialog::open() {
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 344870399d..7dc35edd97 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -137,14 +137,14 @@ void LauncherDialog::build() {
 	new StaticTextWidget(this, "Launcher.Version", gScummVMFullVersion);
 #endif
 	if (!g_system->hasFeature(OSystem::kFeatureNoQuit))
-		new ButtonWidget(this, "Launcher.QuitButton", (_("~Q~uit")), _("Quit ScummVM"), kQuitCmd);
-	new ButtonWidget(this, "Launcher.AboutButton", (_("A~b~out...")), _("About ScummVM"), kAboutCmd);
-	new ButtonWidget(this, "Launcher.OptionsButton", (_("~O~ptions...")), _("Change global ScummVM options"), kOptionsCmd);
+		new ButtonWidget(this, "Launcher.QuitButton", _("~Q~uit"), _("Quit ScummVM"), kQuitCmd);
+	new ButtonWidget(this, "Launcher.AboutButton", _("A~b~out..."), _("About ScummVM"), kAboutCmd);
+	new ButtonWidget(this, "Launcher.OptionsButton", _("~O~ptions..."), _("Change global ScummVM options"), kOptionsCmd);
 	_startButton =
-		new ButtonWidget(this, "Launcher.StartButton", (_("~S~tart")), _("Start selected game"), kStartCmd);
+		new ButtonWidget(this, "Launcher.StartButton", _("~S~tart"), _("Start selected game"), kStartCmd);
 
 	DropdownButtonWidget *loadButton =
-	        new DropdownButtonWidget(this, "Launcher.LoadGameButton", (_("~L~oad...")), _("Load saved game for selected game"), kLoadGameCmd);
+	        new DropdownButtonWidget(this, "Launcher.LoadGameButton", _("~L~oad..."), _("Load saved game for selected game"), kLoadGameCmd);
 #ifdef ENABLE_EVENTRECORDER
 	loadButton->appendEntry(_("Record..."), kRecordGameCmd);
 #endif
@@ -153,24 +153,24 @@ void LauncherDialog::build() {
 	// Above the lowest button rows: two more buttons (directly below the list box)
 	if (g_system->getOverlayWidth() > 320) {
 		DropdownButtonWidget *addButton =
-			new DropdownButtonWidget(this, "Launcher.AddGameButton", (_("~A~dd Game...")), _("Add games to the list"), kAddGameCmd);
-		addButton->appendEntry((_("Mass Add...")), kMassAddGameCmd);
+			new DropdownButtonWidget(this, "Launcher.AddGameButton", _("~A~dd Game..."), _("Add games to the list"), kAddGameCmd);
+		addButton->appendEntry(_("Mass Add..."), kMassAddGameCmd);
 		_addButton = addButton;
 
 		_editButton =
-			new ButtonWidget(this, "Launcher.EditGameButton", (_("~E~dit Game...")), _("Change game options"), kEditGameCmd);
+			new ButtonWidget(this, "Launcher.EditGameButton", _("~E~dit Game..."), _("Change game options"), kEditGameCmd);
 		_removeButton =
-			new ButtonWidget(this, "Launcher.RemoveGameButton", (_("~R~emove Game")), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
+			new ButtonWidget(this, "Launcher.RemoveGameButton", _("~R~emove Game"), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
 	} else {
 		DropdownButtonWidget *addButton =
 			new DropdownButtonWidget(this, "Launcher.AddGameButton", (_c("~A~dd Game...", "lowres")), _("Add games to the list"), kAddGameCmd);
-		addButton->appendEntry((_c("Mass Add...", "lowres")), kMassAddGameCmd);
+		addButton->appendEntry(_c("Mass Add...", "lowres"), kMassAddGameCmd);
 		_addButton = addButton;
 
 		_editButton =
-		new ButtonWidget(this, "Launcher.EditGameButton", (_c("~E~dit Game...", "lowres")), _("Change game options"), kEditGameCmd);
+		new ButtonWidget(this, "Launcher.EditGameButton", _c("~E~dit Game...", "lowres"), _("Change game options"), kEditGameCmd);
 		_removeButton =
-		new ButtonWidget(this, "Launcher.RemoveGameButton", (_c("~R~emove Game", "lowres")), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
+		new ButtonWidget(this, "Launcher.RemoveGameButton", _c("~R~emove Game", "lowres"), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
 	}
 
 	// Search box
@@ -182,7 +182,7 @@ void LauncherDialog::build() {
 		_searchPic->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageSearch));
 	} else
 #endif
-		_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", (_("Search:")));
+		_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", _("Search:"));
 
 	_searchWidget = new EditTextWidget(this, "Launcher.Search", _search, Common::U32String(""), kSearchCmd);
 	_searchClearButton = addClearButton(this, "Launcher.SearchClearButton", kSearchClearCmd);
@@ -204,10 +204,10 @@ void LauncherDialog::build() {
 	updateButtons();
 
 	// Create file browser dialog
-	_browser = new BrowserDialog((_("Select directory with game data")), true);
+	_browser = new BrowserDialog(_("Select directory with game data"), true);
 
 	// Create Load dialog
-	_loadDialog = new SaveLoadChooser((_("Load game:")), (_("Load")), false);
+	_loadDialog = new SaveLoadChooser(_("Load game:"), _("Load"), false);
 }
 
 void LauncherDialog::clean() {
@@ -753,7 +753,7 @@ void LauncherDialog::reflowLayout() {
 		}
 	} else {
 		if (!_searchDesc)
-			_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", (_("Search:")));
+			_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", _("Search:"));
 
 		if (_searchPic) {
 			removeWidget(_searchPic);
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 91a7f69845..cee29071c4 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -73,10 +73,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
 	// new StaticTextWidget(this, "massadddialog_caption", "Mass Add Dialog");
 
 	_dirProgressText = new StaticTextWidget(this, "MassAdd.DirProgressText",
-											(_("... progress ...")));
+											_("... progress ..."));
 
 	_gameProgressText = new StaticTextWidget(this, "MassAdd.GameProgressText",
-											(_("... progress ...")));
+											_("... progress ..."));
 
 	_dirProgressText->setAlign(Graphics::kTextAlignCenter);
 	_gameProgressText->setAlign(Graphics::kTextAlignCenter);
diff --git a/gui/options.cpp b/gui/options.cpp
index ff7179cd9b..68b60e4a82 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -261,7 +261,7 @@ void OptionsDialog::build() {
 		int value = ConfMan.getInt("kbdmouse_speed", _domain);
 		if (_kbdMouseSpeedSlider && value < ARRAYSIZE(kbdMouseSpeedLabels) - 1 && value >= 0) {
 			_kbdMouseSpeedSlider->setValue(value);
-			_kbdMouseSpeedLabel->setLabel((_(kbdMouseSpeedLabels[value])));
+			_kbdMouseSpeedLabel->setLabel(_(kbdMouseSpeedLabels[value]));
 		}
 	}
 	if (g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
@@ -392,7 +392,7 @@ void OptionsDialog::build() {
 
 		Common::String soundFont(ConfMan.get("soundfont", _domain));
 		if (soundFont.empty() || !ConfMan.hasKey("soundfont", _domain)) {
-			_soundFont->setLabel((_c("None", "soundfont")));
+			_soundFont->setLabel(_c("None", "soundfont"));
 			_soundFontClearButton->setEnabled(false);
 		} else {
 			_soundFont->setLabel(soundFont);
@@ -883,12 +883,12 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
 		_subSpeedLabel->markAsDirty();
 		break;
 	case kClearSoundFontCmd:
-		_soundFont->setLabel((_c("None", "soundfont")));
+		_soundFont->setLabel(_c("None", "soundfont"));
 		_soundFontClearButton->setEnabled(false);
 		g_gui.scheduleTopDialogRedraw();
 		break;
 	case kKbdMouseSpeedChanged:
-		_kbdMouseSpeedLabel->setLabel((_(kbdMouseSpeedLabels[_kbdMouseSpeedSlider->getValue()])));
+		_kbdMouseSpeedLabel->setLabel(_(kbdMouseSpeedLabels[_kbdMouseSpeedSlider->getValue()]));
 		_kbdMouseSpeedLabel->markAsDirty();
 		break;
 	case kJoystickDeadzoneChanged:
@@ -1068,7 +1068,7 @@ void OptionsDialog::setSubtitleSettingsState(bool enabled) {
 void OptionsDialog::addControlControls(GuiObject *boss, const Common::String &prefix) {
 	// Show On-Screen control
 	if (g_system->hasFeature(OSystem::kFeatureOnScreenControl))
-		_onscreenCheckbox = new CheckboxWidget(boss, prefix + "grOnScreenCheckbox", (_("Show On-screen control")));
+		_onscreenCheckbox = new CheckboxWidget(boss, prefix + "grOnScreenCheckbox", _("Show On-screen control"));
 
 	// Touchpad Mouse mode
 	if (g_system->hasFeature(OSystem::kFeatureTouchpadMode))
@@ -1076,14 +1076,14 @@ void OptionsDialog::addControlControls(GuiObject *boss, const Common::String &pr
 
 	// Swap menu and back buttons
 	if (g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons))
-		_swapMenuAndBackBtnsCheckbox = new CheckboxWidget(boss, prefix + "grSwapMenuAndBackBtnsCheckbox", (_("Swap Menu and Back buttons")));
+		_swapMenuAndBackBtnsCheckbox = new CheckboxWidget(boss, prefix + "grSwapMenuAndBackBtnsCheckbox", _("Swap Menu and Back buttons"));
 
 	// Keyboard and joystick mouse speed
 	if (g_system->hasFeature(OSystem::kFeatureKbdMouseSpeed)) {
 		if (g_system->getOverlayWidth() > 320)
-			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", (_("Pointer Speed:")), _("Speed for keyboard/joystick mouse pointer control"));
+			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", _("Pointer Speed:"), _("Speed for keyboard/joystick mouse pointer control"));
 		else
-			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", (_c("Pointer Speed:", "lowres")), _("Speed for keyboard/joystick mouse pointer control"));
+			_kbdMouseSpeedDesc = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedDesc", _c("Pointer Speed:", "lowres"), _("Speed for keyboard/joystick mouse pointer control"));
 		_kbdMouseSpeedSlider = new SliderWidget(boss, prefix + "grKbdMouseSpeedSlider", _("Speed for keyboard/joystick mouse pointer control"), kKbdMouseSpeedChanged);
 		_kbdMouseSpeedLabel = new StaticTextWidget(boss, prefix + "grKbdMouseSpeedLabel", Common::U32String("  "));
 		_kbdMouseSpeedSlider->setMinValue(0);
@@ -1094,9 +1094,9 @@ void OptionsDialog::addControlControls(GuiObject *boss, const Common::String &pr
 	// Joystick deadzone
 	if (g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
 		if (g_system->getOverlayWidth() > 320)
-			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", (_("Joy Deadzone:")), _("Analog joystick Deadzone"));
+			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", _("Joy Deadzone:"), _("Analog joystick Deadzone"));
 		else
-			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", (_c("Joy Deadzone:", "lowres")), _("Analog joystick Deadzone"));
+			_joystickDeadzoneDesc = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneDesc", _c("Joy Deadzone:", "lowres"), _("Analog joystick Deadzone"));
 		_joystickDeadzoneSlider = new SliderWidget(boss, prefix + "grJoystickDeadzoneSlider", _("Analog joystick Deadzone"), kJoystickDeadzoneChanged);
 		_joystickDeadzoneLabel = new StaticTextWidget(boss, prefix + "grJoystickDeadzoneLabel", Common::U32String("  "));
 		_joystickDeadzoneSlider->setMinValue(1);
@@ -1194,13 +1194,13 @@ void OptionsDialog::addShaderControls(GuiObject *boss, const Common::String &pre
 
 	// Shader selector
 	if (g_system->getOverlayWidth() > 320)
-		_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", (_("HW Shader:")), _("Different hardware shaders give different visual effects"));
+		_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", _("HW Shader:"), _("Different hardware shaders give different visual effects"));
 	else
-		_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", (_c("HW Shader:", "lowres")), _("Different hardware shaders give different visual effects"));
+		_shaderPopUpDesc = new StaticTextWidget(boss, prefix + "grShaderPopUpDesc", _c("HW Shader:", "lowres"), _("Different hardware shaders give different visual effects"));
 	_shaderPopUp = new PopUpWidget(boss, prefix + "grShaderPopUp", _("Different shaders give different visual effects"));
 	const OSystem::GraphicsMode *p = g_system->getSupportedShaders();
 
-	_shaderPopUp->appendEntry((_("<default>")));
+	_shaderPopUp->appendEntry(_("<default>"));
 	_shaderPopUp->appendEntry(Common::U32String(""));
 	while (p->name) {
 		_shaderPopUp->appendEntry(_c(p->description, context), p->id);
@@ -1217,10 +1217,10 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 		context = "lowres";
 
 	// The GFX mode popup
-	_gfxPopUpDesc = new StaticTextWidget(boss, prefix + "grModePopupDesc", (_("Graphics mode:")));
+	_gfxPopUpDesc = new StaticTextWidget(boss, prefix + "grModePopupDesc", _("Graphics mode:"));
 	_gfxPopUp = new PopUpWidget(boss, prefix + "grModePopup");
 
-	_gfxPopUp->appendEntry((_("<default>")));
+	_gfxPopUp->appendEntry(_("<default>"));
 	_gfxPopUp->appendEntry(Common::U32String(""));
 	while (gm->name) {
 		_gfxPopUp->appendEntry(_c(gm->description, context), gm->id);
@@ -1231,9 +1231,9 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 	const Common::String allFlags = Common::allRenderModesGUIOs();
 	bool renderingTypeDefined = (strpbrk(_guioptions.c_str(), allFlags.c_str()) != nullptr);
 
-	_renderModePopUpDesc = new StaticTextWidget(boss, prefix + "grRenderPopupDesc", (_("Render mode:")), _("Special dithering modes supported by some games"));
+	_renderModePopUpDesc = new StaticTextWidget(boss, prefix + "grRenderPopupDesc", _("Render mode:"), _("Special dithering modes supported by some games"));
 	_renderModePopUp = new PopUpWidget(boss, prefix + "grRenderPopup", _("Special dithering modes supported by some games"));
-	_renderModePopUp->appendEntry((_("<default>")), Common::kRenderDefault);
+	_renderModePopUp->appendEntry(_("<default>"), Common::kRenderDefault);
 	_renderModePopUp->appendEntry(Common::U32String(""));
 	const Common::RenderModeDescription *rm = Common::g_renderModes;
 	for (; rm->code; ++rm) {
@@ -1244,10 +1244,10 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 
 	// The Stretch mode popup
 	const OSystem::GraphicsMode *sm = g_system->getSupportedStretchModes();
-	_stretchPopUpDesc = new StaticTextWidget(boss, prefix + "grStretchModePopupDesc", (_("Stretch mode:")));
+	_stretchPopUpDesc = new StaticTextWidget(boss, prefix + "grStretchModePopupDesc", _("Stretch mode:"));
 	_stretchPopUp = new PopUpWidget(boss, prefix + "grStretchModePopup");
 
-	_stretchPopUp->appendEntry((_("<default>")));
+	_stretchPopUp->appendEntry(_("<default>"));
 	_stretchPopUp->appendEntry(Common::U32String(""));
 	while (sm->name) {
 		_stretchPopUp->appendEntry(_c(sm->description, context), sm->id);
@@ -1255,13 +1255,13 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 	}
 
 	// Fullscreen checkbox
-	_fullscreenCheckbox = new CheckboxWidget(boss, prefix + "grFullscreenCheckbox", (_("Fullscreen mode")));
+	_fullscreenCheckbox = new CheckboxWidget(boss, prefix + "grFullscreenCheckbox", _("Fullscreen mode"));
 
 	// Filtering checkbox
-	_filteringCheckbox = new CheckboxWidget(boss, prefix + "grFilteringCheckbox", (_("Filter graphics")), _("Use linear filtering when scaling graphics"));
+	_filteringCheckbox = new CheckboxWidget(boss, prefix + "grFilteringCheckbox", _("Filter graphics"), _("Use linear filtering when scaling graphics"));
 
 	// Aspect ratio checkbox
-	_aspectCheckbox = new CheckboxWidget(boss, prefix + "grAspectCheckbox", (_("Aspect ratio correction")), _("Correct aspect ratio for 320x200 games"));
+	_aspectCheckbox = new CheckboxWidget(boss, prefix + "grAspectCheckbox", _("Aspect ratio correction"), _("Correct aspect ratio for 320x200 games"));
 
 	_enableGraphicSettings = true;
 }
@@ -1269,9 +1269,9 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
 void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &prefix) {
 	// The MIDI mode popup & a label
 	if (g_system->getOverlayWidth() > 320)
-		_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? (_("Preferred device:")) : (_("Music device:")), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
+		_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? _("Preferred device:") : _("Music device:"), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
 	else
-		_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? (_c("Preferred dev.:", "lowres")) : (_c("Music device:", "lowres")), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
+		_midiPopUpDesc = new StaticTextWidget(boss, prefix + "auMidiPopupDesc", _domain == Common::ConfigManager::kApplicationDomain ? _c("Preferred dev.:", "lowres") : _c("Music device:", "lowres"), _domain == Common::ConfigManager::kApplicationDomain ? _("Specifies preferred sound device or sound card emulator") : _("Specifies output sound device or sound card emulator"));
 	_midiPopUp = new PopUpWidget(boss, prefix + "auMidiPopup", _("Specifies output sound device or sound card emulator"));
 
 	// Populate it
@@ -1298,13 +1298,13 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref
 	}
 
 	// The OPL emulator popup & a label
-	_oplPopUpDesc = new StaticTextWidget(boss, prefix + "auOPLPopupDesc", (_("AdLib emulator:")), _("AdLib is used for music in many games"));
+	_oplPopUpDesc = new StaticTextWidget(boss, prefix + "auOPLPopupDesc", _("AdLib emulator:"), _("AdLib is used for music in many games"));
 	_oplPopUp = new PopUpWidget(boss, prefix + "auOPLPopup", _("AdLib is used for music in many games"));
 
 	// Populate it
 	const OPL::Config::EmulatorDescription *ed = OPL::Config::getAvailable();
 	while (ed->name) {
-		_oplPopUp->appendEntry((_(ed->description)), ed->id);
+		_oplPopUp->appendEntry(_(ed->description), ed->id);
 		++ed;
 	}
 
@@ -1312,7 +1312,7 @@ void OptionsDialog::addAudioControls(GuiObject *boss, const Common::String &pref
 }
 
 void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefix) {
-	_gmDevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefGmPopupDesc", (_("GM device:")), _("Specifies default sound device for General MIDI output"));
+	_gmDevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefGmPopupDesc", _("GM device:"), _("Specifies default sound device for General MIDI output"));
 	_gmDevicePopUp = new PopUpWidget(boss, prefix + "auPrefGmPopup");
 
 	// Populate
@@ -1323,7 +1323,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 		MusicDevices i = (*m)->get<MusicPluginObject>().getDevices();
 		for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
 			if (d->getMusicDriverId() == "null")
-				_gmDevicePopUp->appendEntry((_("Don't use General MIDI music")), d->getHandle());
+				_gmDevicePopUp->appendEntry(_("Don't use General MIDI music"), d->getHandle());
 		}
 	}
 	// Now we add the other devices.
@@ -1334,7 +1334,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 				if (d->getMusicType() != MT_MT32)
 					_gmDevicePopUp->appendEntry(d->getCompleteName(), d->getHandle());
 			} else if (d->getMusicDriverId() == "auto") {
-				_gmDevicePopUp->appendEntry((_("Use first available device")), d->getHandle());
+				_gmDevicePopUp->appendEntry(_("Use first available device"), d->getHandle());
 			}
 		}
 	}
@@ -1346,18 +1346,18 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 
 	// SoundFont
 	if (g_system->getOverlayWidth() > 320)
-		_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", (_("SoundFont:")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
+		_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", _("SoundFont:"), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
 	else
-		_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", (_c("SoundFont:", "lowres")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
-	_soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", (_c("None", "soundfont")), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"));
+		_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", _c("SoundFont:", "lowres"), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"), kChooseSoundFontCmd);
+	_soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", _c("None", "soundfont"), _("SoundFont is supported by some audio cards, FluidSynth and Timidity"));
 
 	_soundFontClearButton = addClearButton(boss, prefix + "mcFontClearButton", kClearSoundFontCmd);
 
 	// Multi midi setting
-	_multiMidiCheckbox = new CheckboxWidget(boss, prefix + "mcMixedCheckbox", (_("Mixed AdLib/MIDI mode")), _("Use both MIDI and AdLib sound generation"));
+	_multiMidiCheckbox = new CheckboxWidget(boss, prefix + "mcMixedCheckbox", _("Mixed AdLib/MIDI mode"), _("Use both MIDI and AdLib sound generation"));
 
 	// MIDI gain setting (FluidSynth uses this)
-	_midiGainDesc = new StaticTextWidget(boss, prefix + "mcMidiGainText", (_("MIDI gain:")));
+	_midiGainDesc = new StaticTextWidget(boss, prefix + "mcMidiGainText", _("MIDI gain:"));
 	_midiGainSlider = new SliderWidget(boss, prefix + "mcMidiGainSlider", Common::U32String(""), kMidiGainChanged);
 	_midiGainSlider->setMinValue(0);
 	_midiGainSlider->setMaxValue(1000);
@@ -1367,17 +1367,17 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
 }
 
 void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefix) {
-	_mt32DevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefMt32PopupDesc", (_("MT-32 Device:")), _("Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"));
+	_mt32DevicePopUpDesc = new StaticTextWidget(boss, prefix + "auPrefMt32PopupDesc", _("MT-32 Device:"), _("Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"));
 	_mt32DevicePopUp = new PopUpWidget(boss, prefix + "auPrefMt32Popup");
 
 	// Native mt32 setting
 	if (g_system->getOverlayWidth() > 320)
-		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", (_("True Roland MT-32 (disable GM emulation)")), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
+		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _("True Roland MT-32 (disable GM emulation)"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
 	else
-		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", (_c("True Roland MT-32 (no GM emulation)", "lowres")), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
+		_mt32Checkbox = new CheckboxWidget(boss, prefix + "mcMt32Checkbox", _c("True Roland MT-32 (no GM emulation)", "lowres"), _("Check if you want to use your real hardware Roland-compatible sound device connected to your computer"));
 
 	// GS Extensions setting
-	_enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", (_("Roland GS device (enable MT-32 mappings)")), _("Check if you want to enable patch mappings to emulate an MT-32 on a Roland GS device"));
+	_enableGSCheckbox = new CheckboxWidget(boss, prefix + "mcGSCheckbox", _("Roland GS device (enable MT-32 mappings)"), _("Check if you want to enable patch mappings to emulate an MT-32 on a Roland GS device"));
 
 	const PluginList p = MusicMan.getPlugins();
 	// Make sure the null device is the first one in the list to avoid undesired
@@ -1386,7 +1386,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
 		MusicDevices i = (*m)->get<MusicPluginObject>().getDevices();
 		for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
 			if (d->getMusicDriverId() == "null")
-				_mt32DevicePopUp->appendEntry((_("Don't use Roland MT-32 music")), d->getHandle());
+				_mt32DevicePopUp->appendEntry(_("Don't use Roland MT-32 music"), d->getHandle());
 		}
 	}
 	// Now we add the other devices.
@@ -1396,7 +1396,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
 			if (d->getMusicType() >= MT_GM)
 				_mt32DevicePopUp->appendEntry(d->getCompleteName(), d->getHandle());
 			else if (d->getMusicDriverId() == "auto")
-				_mt32DevicePopUp->appendEntry((_("Use first available device")), d->getHandle());
+				_mt32DevicePopUp->appendEntry(_("Use first available device"), d->getHandle());
 		}
 	}
 
@@ -1413,25 +1413,25 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
 void OptionsDialog::addSubtitleControls(GuiObject *boss, const Common::String &prefix, int maxSliderVal) {
 
 	if (g_system->getOverlayWidth() > 320) {
-		_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", (_("Text and speech:")));
+		_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", _("Text and speech:"));
 
 		_subToggleGroup = new RadiobuttonGroup(boss, kSubtitleToggle);
 
-		_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, (_("Speech")));
-		_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, (_("Subtitles")));
-		_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, (_("Both")));
+		_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, _("Speech"));
+		_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, _("Subtitles"));
+		_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, _("Both"));
 
-		_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", (_("Subtitle speed:")));
+		_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", _("Subtitle speed:"));
 	} else {
-		_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", (_c("Text and speech:", "lowres")));
+		_subToggleDesc = new StaticTextWidget(boss, prefix + "subToggleDesc", _c("Text and speech:", "lowres"));
 
 		_subToggleGroup = new RadiobuttonGroup(boss, kSubtitleToggle);
 
-		_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, (_("Spch")), _("Speech"));
-		_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, (_("Subs")), _("Subtitles"));
-		_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, (_c("Both", "lowres")), _("Show subtitles and play speech"));
+		_subToggleSpeechOnly = new RadiobuttonWidget(boss, prefix + "subToggleSpeechOnly", _subToggleGroup, kSubtitlesSpeech, _("Spch"), _("Speech"));
+		_subToggleSubOnly = new RadiobuttonWidget(boss, prefix + "subToggleSubOnly", _subToggleGroup, kSubtitlesSubs, _("Subs"), _("Subtitles"));
+		_subToggleSubBoth = new RadiobuttonWidget(boss, prefix + "subToggleSubBoth", _subToggleGroup, kSubtitlesBoth, _c("Both", "lowres"), _("Show subtitles and play speech"));
 
-		_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", (_c("Subtitle speed:", "lowres")));
+		_subSpeedDesc = new StaticTextWidget(boss, prefix + "subSubtitleSpeedDesc", _c("Subtitle speed:", "lowres"));
 	}
 
 	// Subtitle speed
@@ -1447,7 +1447,7 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
 
 	// Volume controllers
 	if (g_system->getOverlayWidth() > 320)
-		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", (_("Music volume:")));
+		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", _("Music volume:"));
 	else
 		_musicVolumeDesc = new StaticTextWidget(boss, prefix + "vcMusicText", _c("Music volume:", "lowres"));
 	_musicVolumeSlider = new SliderWidget(boss, prefix + "vcMusicSlider", Common::U32String(""), kMusicVolumeChanged);
@@ -1456,12 +1456,12 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
 	_musicVolumeSlider->setMaxValue(Audio::Mixer::kMaxMixerVolume);
 	_musicVolumeLabel->setFlags(WIDGET_CLEARBG);
 
-	_muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", (_("Mute all")), Common::U32String(""), kMuteAllChanged);
+	_muteCheckbox = new CheckboxWidget(boss, prefix + "vcMuteCheckbox", _("Mute all"), Common::U32String(""), kMuteAllChanged);
 
 	if (g_system->getOverlayWidth() > 320)
-		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", (_("SFX volume:")), _("Special sound effects volume"));
+		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", _("SFX volume:"), _("Special sound effects volume"));
 	else
-		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", (_c("SFX volume:", "lowres")), _("Special sound effects volume"));
+		_sfxVolumeDesc = new StaticTextWidget(boss, prefix + "vcSfxText", _c("SFX volume:", "lowres"), _("Special sound effects volume"));
 	_sfxVolumeSlider = new SliderWidget(boss, prefix + "vcSfxSlider", _("Special sound effects volume"), kSfxVolumeChanged);
 	_sfxVolumeLabel = new StaticTextWidget(boss, prefix + "vcSfxLabel", Common::U32String("100%"));
 	_sfxVolumeSlider->setMinValue(0);
@@ -1469,9 +1469,9 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, const Common::String &pre
 	_sfxVolumeLabel->setFlags(WIDGET_CLEARBG);
 
 	if (g_system->getOverlayWidth() > 320)
-		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , (_("Speech volume:")));
+		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , _("Speech volume:"));
 	else
-		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , (_c("Speech volume:", "lowres")));
+		_speechVolumeDesc = new StaticTextWidget(boss, prefix + "vcSpeechText" , _c("Speech volume:", "lowres"));
 	_speechVolumeSlider = new SliderWidget(boss, prefix + "vcSpeechSlider", Common::U32String(""), kSpeechVolumeChanged);
 	_speechVolumeLabel = new StaticTextWidget(boss, prefix + "vcSpeechLabel", Common::U32String("100%"));
 	_speechVolumeSlider->setMinValue(0);
@@ -1564,7 +1564,7 @@ void OptionsDialog::updateSpeechVolume(const int newValue) const {
 
 void OptionsDialog::reflowLayout() {
 	if (_graphicsTabId != -1 && _tabWidget)
-		_tabWidget->setTabTitle(_graphicsTabId, g_system->getOverlayWidth() > 320 ? (_("Graphics")) : (_("GFX")));
+		_tabWidget->setTabTitle(_graphicsTabId, g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX"));
 
 	Dialog::reflowLayout();
 	setupGraphicsTab();
@@ -1695,7 +1695,7 @@ void GlobalOptionsDialog::build() {
 	//
 	// 1) The graphics tab
 	//
-	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? (_("Graphics")) : (_("GFX")), "GlobalOptions_Graphics");
+	_graphicsTabId = tab->addTab(g_system->getOverlayWidth() > 320 ? _("Graphics") : _("GFX"), "GlobalOptions_Graphics");
 	ScrollContainerWidget *graphicsContainer = new ScrollContainerWidget(tab, "GlobalOptions_Graphics.Container", "GlobalOptions_Graphics_Container", kGraphicsTabContainerReflowCmd);
 	graphicsContainer->setTarget(this);
 	graphicsContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -1706,7 +1706,7 @@ void GlobalOptionsDialog::build() {
 	//
 
 	if (g_system->hasFeature(OSystem::kFeatureShader)) {
-		tab->addTab((_("Shader")), "GlobalOptions_Shader");
+		tab->addTab(_("Shader"), "GlobalOptions_Shader");
 		addShaderControls(tab, "GlobalOptions_Shader.");
 	}
 
@@ -1718,7 +1718,7 @@ void GlobalOptionsDialog::build() {
 		g_system->hasFeature(OSystem::kFeatureSwapMenuAndBackButtons) ||
 		g_system->hasFeature(OSystem::kFeatureKbdMouseSpeed) ||
 		g_system->hasFeature(OSystem::kFeatureJoystickDeadzone)) {
-		tab->addTab((_("Control")), "GlobalOptions_Control");
+		tab->addTab(_("Control"), "GlobalOptions_Control");
 		addControlControls(tab, "GlobalOptions_Control.");
 	}
 
@@ -1740,21 +1740,21 @@ void GlobalOptionsDialog::build() {
 	}
 
 	if (!keymaps.empty()) {
-		tab->addTab((_("Keymaps")), "GlobalOptions_KeyMapper");
+		tab->addTab(_("Keymaps"), "GlobalOptions_KeyMapper");
 		addKeyMapperControls(tab, "GlobalOptions_KeyMapper.", keymaps, Common::ConfigManager::kKeymapperDomain);
 	}
 
 	//
 	// 2) The audio tab
 	//
-	tab->addTab((_("Audio")), "GlobalOptions_Audio");
+	tab->addTab(_("Audio"), "GlobalOptions_Audio");
 	addAudioControls(tab, "GlobalOptions_Audio.");
 	addSubtitleControls(tab, "GlobalOptions_Audio.");
 
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab((_("Volume")), "GlobalOptions_Volume");
+		tab->addTab(_("Volume"), "GlobalOptions_Volume");
 	else
-		tab->addTab((_c("Volume", "lowres")), "GlobalOptions_Volume");
+		tab->addTab(_c("Volume", "lowres"), "GlobalOptions_Volume");
 	addVolumeControls(tab, "GlobalOptions_Volume.");
 
 	// TODO: cd drive setting
@@ -1762,31 +1762,31 @@ void GlobalOptionsDialog::build() {
 	//
 	// 3) The MIDI tab
 	//
-	_midiTabId = tab->addTab((_("MIDI")), "GlobalOptions_MIDI");
+	_midiTabId = tab->addTab(_("MIDI"), "GlobalOptions_MIDI");
 	addMIDIControls(tab, "GlobalOptions_MIDI.");
 
 	//
 	// 4) The MT-32 tab
 	//
-	tab->addTab((_("MT-32")), "GlobalOptions_MT32");
+	tab->addTab(_("MT-32"), "GlobalOptions_MT32");
 	addMT32Controls(tab, "GlobalOptions_MT32.");
 
 	//
 	// 5) The Paths tab
 	//
 	if (g_system->getOverlayWidth() > 320)
-		_pathsTabId = tab->addTab((_("Paths")), "GlobalOptions_Paths");
+		_pathsTabId = tab->addTab(_("Paths"), "GlobalOptions_Paths");
 	else
-		_pathsTabId = tab->addTab((_c("Paths", "lowres")), "GlobalOptions_Paths");
+		_pathsTabId = tab->addTab(_c("Paths", "lowres"), "GlobalOptions_Paths");
 	addPathsControls(tab, "GlobalOptions_Paths.", g_system->getOverlayWidth() <= 320);
 
 	//
 	// 6) The miscellaneous tab
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab((_("Misc")), "GlobalOptions_Misc");
+		tab->addTab(_("Misc"), "GlobalOptions_Misc");
 	else
-		tab->addTab((_c("Misc", "lowres")), "GlobalOptions_Misc");
+		tab->addTab(_c("Misc", "lowres"), "GlobalOptions_Misc");
 	ScrollContainerWidget *miscContainer = new ScrollContainerWidget(tab, "GlobalOptions_Misc.Container", "GlobalOptions_Misc_Container");
 	miscContainer->setTarget(this);
 	miscContainer->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
@@ -1798,9 +1798,9 @@ void GlobalOptionsDialog::build() {
 	// 7) The Cloud tab (remote storages)
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab((_("Cloud")), "GlobalOptions_Cloud");
+		tab->addTab(_("Cloud"), "GlobalOptions_Cloud");
 	else
-		tab->addTab((_c("Cloud", "lowres")), "GlobalOptions_Cloud");
+		tab->addTab(_c("Cloud", "lowres"), "GlobalOptions_Cloud");
 
 	ScrollContainerWidget *container = new ScrollContainerWidget(tab, "GlobalOptions_Cloud.Container", "GlobalOptions_Cloud_Container", kCloudTabContainerReflowCmd);
 	container->setTarget(this);
@@ -1814,9 +1814,9 @@ void GlobalOptionsDialog::build() {
 	// 8) The LAN tab (local "cloud" webserver)
 	//
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab((_("LAN")), "GlobalOptions_Network");
+		tab->addTab(_("LAN"), "GlobalOptions_Network");
 	else
-		tab->addTab((_c("LAN", "lowres")), "GlobalOptions_Network");
+		tab->addTab(_c("LAN", "lowres"), "GlobalOptions_Network");
 	addNetworkControls(tab, "GlobalOptions_Network.", g_system->getOverlayWidth() <= 320);
 #endif // USE_SDL_NET
 #endif // USE_CLOUD
@@ -1824,9 +1824,9 @@ void GlobalOptionsDialog::build() {
 	//Accessibility
 #ifdef USE_TTS
 	if (g_system->getOverlayWidth() > 320)
-		tab->addTab((_("Accessibility")), "GlobalOptions_Accessibility");
+		tab->addTab(_("Accessibility"), "GlobalOptions_Accessibility");
 	else
-		tab->addTab((_c("Accessibility", "lowres")), "GlobalOptions_Accessibility");
+		tab->addTab(_c("Accessibility", "lowres"), "GlobalOptions_Accessibility");
 	addAccessibilityControls(tab, "GlobalOptions_Accessibility.");
 #endif // USE_TTS
 
@@ -1835,9 +1835,9 @@ void GlobalOptionsDialog::build() {
 	_tabWidget = tab;
 
 	// Add OK & Cancel buttons
-	new ButtonWidget(this, "GlobalOptions.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
-	new ButtonWidget(this, "GlobalOptions.Apply", (_("Apply")), Common::U32String(""), kApplyCmd);
-	new ButtonWidget(this, "GlobalOptions.Ok", (_("OK")), Common::U32String(""), kOKCmd);
+	new ButtonWidget(this, "GlobalOptions.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "GlobalOptions.Apply", _("Apply"), Common::U32String(""), kApplyCmd);
+	new ButtonWidget(this, "GlobalOptions.Ok", _("OK"), Common::U32String(""), kOKCmd);
 
 #ifdef GUI_ENABLE_KEYSDIALOG
 	_keysDialog = new KeysDialog();
@@ -1937,26 +1937,26 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
 
 	// Save game path
 	if (!lowres)
-		new ButtonWidget(boss, prefix + "SaveButton", (_("Save Path:")), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
+		new ButtonWidget(boss, prefix + "SaveButton", _("Save Path:"), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
 	else
-		new ButtonWidget(boss, prefix + "SaveButton", (_c("Save Path:", "lowres")), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
+		new ButtonWidget(boss, prefix + "SaveButton", _c("Save Path:", "lowres"), _("Specifies where your saved games are put"), kChooseSaveDirCmd);
 	_savePath = new StaticTextWidget(boss, prefix + "SavePath", Common::U32String("/foo/bar"), _("Specifies where your saved games are put"));
 
 	_savePathClearButton = addClearButton(boss, prefix + "SavePathClearButton", kSavePathClearCmd);
 
 	if (!lowres)
-		new ButtonWidget(boss, prefix + "ThemeButton", (_("Theme Path:")), Common::U32String(""), kChooseThemeDirCmd);
+		new ButtonWidget(boss, prefix + "ThemeButton", _("Theme Path:"), Common::U32String(""), kChooseThemeDirCmd);
 	else
-		new ButtonWidget(boss, prefix + "ThemeButton", (_c("Theme Path:", "lowres")), Common::U32String(""), kChooseThemeDirCmd);
-	_themePath = new StaticTextWidget(boss, prefix + "ThemePath", (_c("None", "path")));
+		new ButtonWidget(boss, prefix + "ThemeButton", _c("Theme Path:", "lowres"), Common::U32String(""), kChooseThemeDirCmd);
+	_themePath = new StaticTextWidget(boss, prefix + "ThemePath", _c("None", "path"));
 
 	_themePathClearButton = addClearButton(boss, prefix + "ThemePathClearButton", kThemePathClearCmd);
 
 	if (!lowres)
-		new ButtonWidget(boss, prefix + "ExtraButton", (_("Extra Path:")), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
+		new ButtonWidget(boss, prefix + "ExtraButton", _("Extra Path:"), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
 	else
-		new ButtonWidget(boss, prefix + "ExtraButton", (_c("Extra Path:", "lowres")), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
-	_extraPath = new StaticTextWidget(boss, prefix + "ExtraPath", (_c("None", "path")), _("Specifies path to additional data used by all games or ScummVM"));
+		new ButtonWidget(boss, prefix + "ExtraButton", _c("Extra Path:", "lowres"), _("Specifies path to additional data used by all games or ScummVM"), kChooseExtraDirCmd);
+	_extraPath = new StaticTextWidget(boss, prefix + "ExtraPath", _c("None", "path"), _("Specifies path to additional data used by all games or ScummVM"));
 
 	_extraPathClearButton = addClearButton(boss, prefix + "ExtraPathClearButton", kExtraPathClearCmd);
 
@@ -1973,11 +1973,11 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
 }
 
 void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
-	new ButtonWidget(boss, prefix + "ThemeButton", (_("Theme:")), Common::U32String(""), kChooseThemeCmd);
+	new ButtonWidget(boss, prefix + "ThemeButton", _("Theme:"), Common::U32String(""), kChooseThemeCmd);
 	_curTheme = new StaticTextWidget(boss, prefix + "CurTheme", g_gui.theme()->getThemeName());
 
 
-	_rendererPopUpDesc = new StaticTextWidget(boss, prefix + "RendererPopupDesc", (_("GUI renderer:")));
+	_rendererPopUpDesc = new StaticTextWidget(boss, prefix + "RendererPopupDesc", _("GUI renderer:"));
 	_rendererPopUp = new PopUpWidget(boss, prefix + "RendererPopup");
 
 	if (!lowres) {
@@ -1989,13 +1989,13 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 	}
 
 	if (!lowres)
-		_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", (_("Autosave:")));
+		_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", _("Autosave:"));
 	else
-		_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", (_c("Autosave:", "lowres")));
+		_autosavePeriodPopUpDesc = new StaticTextWidget(boss, prefix + "AutosavePeriodPopupDesc", _c("Autosave:", "lowres"));
 	_autosavePeriodPopUp = new PopUpWidget(boss, prefix + "AutosavePeriodPopup");
 
 	for (int i = 0; savePeriodLabels[i]; i++) {
-		_autosavePeriodPopUp->appendEntry((_(savePeriodLabels[i])), savePeriodValues[i]);
+		_autosavePeriodPopUp->appendEntry(_(savePeriodLabels[i]), savePeriodValues[i]);
 	}
 
 #ifdef GUI_ENABLE_KEYSDIALOG
@@ -2006,10 +2006,10 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 
 
 #ifdef USE_TRANSLATION
-	_guiLanguagePopUpDesc = new StaticTextWidget(boss, prefix + "GuiLanguagePopupDesc", (_("GUI language:")), _("Language of ScummVM GUI"));
+	_guiLanguagePopUpDesc = new StaticTextWidget(boss, prefix + "GuiLanguagePopupDesc", _("GUI language:"), _("Language of ScummVM GUI"));
 	_guiLanguagePopUp = new PopUpWidget(boss, prefix + "GuiLanguagePopup");
 #ifdef USE_DETECTLANG
-	_guiLanguagePopUp->appendEntry((_("<default>")), Common::kTranslationAutodetectId);
+	_guiLanguagePopUp->appendEntry(_("<default>"), Common::kTranslationAutodetectId);
 #endif // USE_DETECTLANG
 	_guiLanguagePopUp->appendEntry(Common::U32String("English"), Common::kTranslationBuiltinId);
 	_guiLanguagePopUp->appendEntry(Common::U32String(""), 0);
@@ -2046,7 +2046,7 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 
 	if (g_system->hasFeature(OSystem::kFeatureSystemBrowserDialog)) {
 		_useSystemDialogsCheckbox = new CheckboxWidget(boss, prefix + "UseSystemDialogs",
-			(_("Use native system file browser")),
+			_("Use native system file browser"),
 			_("Use the native system file browser instead of the ScummVM one to select a file or directory.")
 		);
 
@@ -2073,7 +2073,7 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 #ifdef USE_CLOUD
 #ifdef USE_LIBCURL
 void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
-	_storagePopUpDesc = new StaticTextWidget(boss, prefix + "StoragePopupDesc", (_("Active storage:")), _("Active cloud storage"));
+	_storagePopUpDesc = new StaticTextWidget(boss, prefix + "StoragePopupDesc", _("Active storage:"), _("Active cloud storage"));
 	_storagePopUp = new PopUpWidget(boss, prefix + "StoragePopup");
 	Common::StringArray list = CloudMan.listStorages();
 	for (uint32 i = 0; i < list.size(); ++i) {
@@ -2082,50 +2082,50 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
 	_storagePopUp->setSelected(_selectedStorageIndex);
 
 	if (lowres)
-		_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", (_c("4. Storage is not yet enabled. Verify that username is correct and enable it:", "lowres")));
+		_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", _c("4. Storage is not yet enabled. Verify that username is correct and enable it:", "lowres"));
 	else
-		_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", (_("4. Storage is not yet enabled. Verify that username is correct and enable it:")));
-	_storageEnableButton = new ButtonWidget(boss, prefix + "StorageEnableButton", (_("Enable storage")), _("Confirm you want to use this account for this storage"), kEnableStorageCmd);
+		_storageDisabledHint = new StaticTextWidget(boss, prefix + "StorageDisabledHint", _("4. Storage is not yet enabled. Verify that username is correct and enable it:"));
+	_storageEnableButton = new ButtonWidget(boss, prefix + "StorageEnableButton", _("Enable storage"), _("Confirm you want to use this account for this storage"), kEnableStorageCmd);
 
-	_storageUsernameDesc = new StaticTextWidget(boss, prefix + "StorageUsernameDesc", (_("Username:")), _("Username used by this storage"));
-	_storageUsername = new StaticTextWidget(boss, prefix + "StorageUsernameLabel", (_("<none>")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
+	_storageUsernameDesc = new StaticTextWidget(boss, prefix + "StorageUsernameDesc", _("Username:"), _("Username used by this storage"));
+	_storageUsername = new StaticTextWidget(boss, prefix + "StorageUsernameLabel", _("<none>"), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 
-	_storageUsedSpaceDesc = new StaticTextWidget(boss, prefix + "StorageUsedSpaceDesc", (_("Used space:")), _("Space used by ScummVM's saved games on this storage"));
+	_storageUsedSpaceDesc = new StaticTextWidget(boss, prefix + "StorageUsedSpaceDesc", _("Used space:"), _("Space used by ScummVM's saved games on this storage"));
 	_storageUsedSpace = new StaticTextWidget(boss, prefix + "StorageUsedSpaceLabel", Common::U32String("0 bytes"), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 
-	_storageLastSyncDesc = new StaticTextWidget(boss, prefix + "StorageLastSyncDesc", (_("Last sync:")), _("When was the last time saved games were synced with this storage"));
-	_storageLastSync = new StaticTextWidget(boss, prefix + "StorageLastSyncLabel", (_("<never>")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
+	_storageLastSyncDesc = new StaticTextWidget(boss, prefix + "StorageLastSyncDesc", _("Last sync:"), _("When was the last time saved games were synced with this storage"));
+	_storageLastSync = new StaticTextWidget(boss, prefix + "StorageLastSyncLabel", _("<never>"), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 	if (lowres)
-		_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", (_c("Saved games sync automatically on launch, after saving and on loading.", "lowres")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
+		_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", _c("Saved games sync automatically on launch, after saving and on loading.", "lowres"), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 	else
-		_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", (_("Saved games sync automatically on launch, after saving and on loading.")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
-	_storageSyncSavesButton = new ButtonWidget(boss, prefix + "SyncSavesButton", (_("Sync now")), _("Start saved games sync"), kSyncSavesStorageCmd);
+		_storageSyncHint = new StaticTextWidget(boss, prefix + "StorageSyncHint", _("Saved games sync automatically on launch, after saving and on loading."), Common::U32String(""), ThemeEngine::kFontStyleNormal);
+	_storageSyncSavesButton = new ButtonWidget(boss, prefix + "SyncSavesButton", _("Sync now"), _("Start saved games sync"), kSyncSavesStorageCmd);
 
 	if (lowres)
-		_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", (_c("You can download game files from your cloud ScummVM folder:", "lowres")));
+		_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", _c("You can download game files from your cloud ScummVM folder:", "lowres"));
 	else
-		_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", (_("You can download game files from your cloud ScummVM folder:")));
-	_storageDownloadButton = new ButtonWidget(boss, prefix + "DownloadButton", (_("Download game files")), _("Open downloads manager dialog"), kDownloadStorageCmd);
+		_storageDownloadHint = new StaticTextWidget(boss, prefix + "StorageDownloadHint", _("You can download game files from your cloud ScummVM folder:"));
+	_storageDownloadButton = new ButtonWidget(boss, prefix + "DownloadButton", _("Download game files"), _("Open downloads manager dialog"), kDownloadStorageCmd);
 
 	if (lowres)
-		_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", (_c("To change account for this storage, disconnect and connect again:", "lowres")));
+		_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", _c("To change account for this storage, disconnect and connect again:", "lowres"));
 	else
-		_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", (_("To change account for this storage, disconnect and connect again:")));
-	_storageDisconnectButton = new ButtonWidget(boss, prefix + "DisconnectButton", (_("Disconnect")), _("Stop using this storage on this device"), kDisconnectStorageCmd);
+		_storageDisconnectHint = new StaticTextWidget(boss, prefix + "StorageDisconnectHint", _("To change account for this storage, disconnect and connect again:"));
+	_storageDisconnectButton = new ButtonWidget(boss, prefix + "DisconnectButton", _("Disconnect"), _("Stop using this storage on this device"), kDisconnectStorageCmd);
 
 	if (lowres)
-		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", (_c("This storage is not connected yet! To connect,", "lowres")));
+		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", _c("This storage is not connected yet! To connect,", "lowres"));
 	else
-		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", (_("This storage is not connected yet! To connect,")));
-	_storageWizardOpenLinkHint = new StaticTextWidget(boss, prefix + "StorageWizardOpenLinkHint", (_("1. Open this link:")));
+		_storageWizardNotConnectedHint = new StaticTextWidget(boss, prefix + "StorageWizardNotConnectedHint", _("This storage is not connected yet! To connect,"));
+	_storageWizardOpenLinkHint = new StaticTextWidget(boss, prefix + "StorageWizardOpenLinkHint", _("1. Open this link:"));
 	_storageWizardLink = new ButtonWidget(boss, prefix + "StorageWizardLink", Common::U32String("https://cloud.scummvm.org/"), _("Open URL"), kOpenUrlStorageCmd);
 	if (lowres)
-		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", (_c("2. Get the code and enter it here:", "lowres")));
+		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", _c("2. Get the code and enter it here:", "lowres"));
 	else
-		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", (_("2. Get the code and enter it here:")));
+		_storageWizardCodeHint = new StaticTextWidget(boss, prefix + "StorageWizardCodeHint", _("2. Get the code and enter it here:"));
 	_storageWizardCodeBox = new EditTextWidget(boss, prefix + "StorageWizardCodeBox", Common::U32String(""), Common::U32String(""), 0, 0, ThemeEngine::kFontStyleConsole);
-	_storageWizardPasteButton = new ButtonWidget(boss, prefix + "StorageWizardPasteButton", (_("Paste")), _("Paste code from clipboard"), kPasteCodeStorageCmd);
-	_storageWizardConnectButton = new ButtonWidget(boss, prefix + "StorageWizardConnectButton", (_("3. Connect")), _("Connect your cloud storage account"), kConnectStorageCmd);
+	_storageWizardPasteButton = new ButtonWidget(boss, prefix + "StorageWizardPasteButton", _("Paste"), _("Paste code from clipboard"), kPasteCodeStorageCmd);
+	_storageWizardConnectButton = new ButtonWidget(boss, prefix + "StorageWizardConnectButton", _("3. Connect"), _("Connect your cloud storage account"), kConnectStorageCmd);
 	_storageWizardConnectionStatusHint = new StaticTextWidget(boss, prefix + "StorageWizardConnectionStatusHint", Common::U32String("..."));
 
 	setupCloudTab();
@@ -2134,29 +2134,29 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
 
 #ifdef USE_SDL_NET
 void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
-	_runServerButton = new ButtonWidget(boss, prefix + "RunServerButton", (_("Run server")), _("Run local webserver"), kRunServerCmd);
-	_serverInfoLabel = new StaticTextWidget(boss, prefix + "ServerInfoLabel", (_("Not running")));
+	_runServerButton = new ButtonWidget(boss, prefix + "RunServerButton", _("Run server"), _("Run local webserver"), kRunServerCmd);
+	_serverInfoLabel = new StaticTextWidget(boss, prefix + "ServerInfoLabel", _("Not running"));
 
 	// Root path
 	if (lowres)
-		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", (_c("/root/ Path:", "lowres")), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
+		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", _c("/root/ Path:", "lowres"), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
 	else
-		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", (_("/root/ Path:")), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
+		_rootPathButton = new ButtonWidget(boss, prefix + "RootPathButton", _("/root/ Path:"), _("Select which directory will be shown as /root/ in the Files Manager"), kChooseRootDirCmd);
 	_rootPath = new StaticTextWidget(boss, prefix + "RootPath", Common::U32String("/foo/bar"), _("Select which directory will be shown as /root/ in the Files Manager"));
 	_rootPathClearButton = addClearButton(boss, prefix + "RootPathClearButton", kRootPathClearCmd);
 
 	uint32 port = Networking::LocalWebserver::getPort();
 
-	_serverPortDesc = new StaticTextWidget(boss, prefix + "ServerPortDesc", (_("Server's port:")), _("Port for server to use"));
+	_serverPortDesc = new StaticTextWidget(boss, prefix + "ServerPortDesc", _("Server's port:"), _("Port for server to use"));
 	_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), Common::U32String(""));
 	_serverPortClearButton = addClearButton(boss, prefix + "ServerPortClearButton", kServerPortClearCmd);
 
 	if (lowres) {
-		_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", (_c("Run server to manage files with browser (in the same network).", "lowres")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
-		_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", (_c("Closing options dialog will stop the server.", "lowres")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
+		_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", _c("Run server to manage files with browser (in the same network).", "lowres"), Common::U32String(""), ThemeEngine::kFontStyleNormal);
+		_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", _c("Closing options dialog will stop the server.", "lowres"), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 	} else {
-		_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", (_("Run server to manage files with browser (in the same network).")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
-		_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", (_("Closing options dialog will stop the server.")), Common::U32String(""), ThemeEngine::kFontStyleNormal);
+		_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", _("Run server to manage files with browser (in the same network)."), Common::U32String(""), ThemeEngine::kFontStyleNormal);
+		_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", _("Closing options dialog will stop the server."), Common::U32String(""), ThemeEngine::kFontStyleNormal);
 	}
 
 	reflowNetworkTabLayout();
@@ -2168,7 +2168,7 @@ void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::Stri
 #ifdef USE_TTS
 void GlobalOptionsDialog::addAccessibilityControls(GuiObject *boss, const Common::String &prefix) {
 	_ttsCheckbox = new CheckboxWidget(boss, prefix + "TTSCheckbox",
-		(_("Use Text to speech")), _("Will read text in gui on mouse over."));
+		_("Use Text to speech"), _("Will read text in gui on mouse over."));
 	if (ConfMan.hasKey("tts_enabled"))
 		_ttsCheckbox->setState(ConfMan.getBool("tts_enabled", _domain));
 	else
@@ -2201,12 +2201,12 @@ void GlobalOptionsDialog::apply() {
 	bool isRebuildNeeded = false;
 
 	Common::U32String savePath(_savePath->getLabel());
-	if (!savePath.empty() && (savePath != (_("Default"))))
+	if (!savePath.empty() && (savePath != _("Default")))
 		ConfMan.set("savepath", savePath.encode(), _domain);
 	else
 		ConfMan.removeKey("savepath", _domain);
 
-	Common::U32String themePath((_themePath->getLabel()));
+	Common::U32String themePath(_themePath->getLabel());
 	if (!themePath.empty() && (themePath != _c("None", "path")))
 		ConfMan.set("themepath", themePath.encode(), _domain);
 	else
@@ -2219,9 +2219,9 @@ void GlobalOptionsDialog::apply() {
 		ConfMan.removeKey("extrapath", _domain);
 
 #ifdef DYNAMIC_MODULES
-	Common::String pluginsPath(_pluginsPath->getLabel());
+	Common::U32String pluginsPath(_pluginsPath->getLabel());
 	if (!pluginsPath.empty() && (pluginsPath != _c("None", "path")))
-		ConfMan.set("pluginspath", pluginsPath, _domain);
+		ConfMan.set("pluginspath", pluginsPath.encode(), _domain);
 	else
 		ConfMan.removeKey("pluginspath", _domain);
 #endif
@@ -2394,7 +2394,7 @@ void GlobalOptionsDialog::close() {
 void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 	switch (cmd) {
 	case kChooseSaveDirCmd: {
-		BrowserDialog browser((_("Select directory for saved games")), true);
+		BrowserDialog browser(_("Select directory for saved games"), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2410,7 +2410,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		break;
 	}
 	case kChooseThemeDirCmd: {
-		BrowserDialog browser((_("Select directory for GUI themes")), true);
+		BrowserDialog browser(_("Select directory for GUI themes"), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2420,7 +2420,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		break;
 	}
 	case kChooseExtraDirCmd: {
-		BrowserDialog browser((_("Select directory for extra files")), true);
+		BrowserDialog browser(_("Select directory for extra files"), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2431,7 +2431,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 	}
 #ifdef DYNAMIC_MODULES
 	case kChoosePluginsDirCmd: {
-		BrowserDialog browser((_("Select directory for plugins")), true);
+		BrowserDialog browser(_("Select directory for plugins"), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2444,7 +2444,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 #ifdef USE_CLOUD
 #ifdef USE_SDL_NET
 	case kChooseRootDirCmd: {
-		BrowserDialog browser((_("Select directory for Files Manager /root/")), true);
+		BrowserDialog browser(_("Select directory for Files Manager /root/"), true);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode dir(browser.getResult());
@@ -2459,13 +2459,13 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 #endif
 #endif
 	case kThemePathClearCmd:
-		_themePath->setLabel((_c("None", "path")));
+		_themePath->setLabel(_c("None", "path"));
 		break;
 	case kExtraPathClearCmd:
-		_extraPath->setLabel((_c("None", "path")));
+		_extraPath->setLabel(_c("None", "path"));
 		break;
 	case kSavePathClearCmd:
-		_savePath->setLabel((_("Default")));
+		_savePath->setLabel(_("Default"));
 		break;
 #ifdef DYNAMIC_MODULES
 	case kPluginsPathClearCmd:
@@ -2475,12 +2475,12 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 #ifdef USE_CLOUD
 #ifdef USE_SDL_NET
 	case kRootPathClearCmd:
-		_rootPath->setLabel((_c("None", "path")));
+		_rootPath->setLabel(_c("None", "path"));
 		break;
 #endif
 #endif
 	case kChooseSoundFontCmd: {
-		BrowserDialog browser((_("Select SoundFont")), false);
+		BrowserDialog browser(_("Select SoundFont"), false);
 		if (browser.runModal() > 0) {
 			// User made his choice...
 			Common::FSNode file(browser.getResult());
@@ -2603,7 +2603,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		}
 
 		if (_storageWizardConnectionStatusHint)
-			_storageWizardConnectionStatusHint->setLabel((_("Connecting...")));
+			_storageWizardConnectionStatusHint->setLabel(_("Connecting..."));
 		CloudMan.connectStorage(
 			_selectedStorageIndex, Common::convertFromU32String(code),
 			new Common::Callback<GlobalOptionsDialog, Networking::ErrorResponse>(this, &GlobalOptionsDialog::storageConnectionCallback)
@@ -2926,15 +2926,15 @@ void GlobalOptionsDialog::reflowNetworkTabLayout() {
 
 	if (_runServerButton) {
 		_runServerButton->setVisible(true);
-		_runServerButton->setLabel((_(serverIsRunning ? "Stop server" : "Run server")));
-		_runServerButton->setTooltip((_(serverIsRunning ? "Stop local webserver" : "Run local webserver")));
+		_runServerButton->setLabel(_(serverIsRunning ? "Stop server" : "Run server"));
+		_runServerButton->setTooltip(_(serverIsRunning ? "Stop local webserver" : "Run local webserver"));
 	}
 	if (_serverInfoLabel) {
 		_serverInfoLabel->setVisible(true);
 		if (serverIsRunning)
 			_serverInfoLabel->setLabel(LocalServer.getAddress());
 		else
-			_serverInfoLabel->setLabel((_("Not running")));
+			_serverInfoLabel->setLabel(_("Not running"));
 	}
 	if (_rootPathButton) _rootPathButton->setVisible(true);
 	if (_rootPath) _rootPath->setVisible(true);
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index e4dc7a0a26..3abedb7d23 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -603,13 +603,13 @@ void PredictiveDialog::processButton(ButtonId button) {
 			if (_mode > kModeAbc) {
 				_mode = kModePre;
 				// I18N: Pre means 'Predictive', leave '*' as is
-				_button[kModeAct]->setLabel((_("*  Pre")));
+				_button[kModeAct]->setLabel(_("*  Pre"));
 			} else if (_mode == kModeNum) {
 				// I18N: 'Num' means Numbers
-				_button[kModeAct]->setLabel((_("*  Num")));
+				_button[kModeAct]->setLabel(_("*  Num"));
 			} else {
 				// I18N: 'Abc' means Latin alphabet input
-				_button[kModeAct]->setLabel((_("*  Abc")));
+				_button[kModeAct]->setLabel(_("*  Abc"));
 				_button[kAddAct]->setEnabled(true);
 			}
 
@@ -1024,7 +1024,7 @@ void PredictiveDialog::loadAllDictionary(Dict &dict) {
 void PredictiveDialog::pressEditText() {
 	Common::strlcpy(_predictiveResult, _prefix.c_str(), sizeof(_predictiveResult));
 	Common::strlcat(_predictiveResult, _currentWord.c_str(), sizeof(_predictiveResult));
-	_editText->setEditString(Common::convertToU32String((_predictiveResult)));
+	_editText->setEditString(Common::convertToU32String(_predictiveResult));
 	//_editText->setCaretPos(_prefix.size() + _currentWord.size());
 	_editText->markAsDirty();
 }
diff --git a/gui/remotebrowser.cpp b/gui/remotebrowser.cpp
index 92bb35c897..df653e7883 100644
--- a/gui/remotebrowser.cpp
+++ b/gui/remotebrowser.cpp
@@ -54,11 +54,11 @@ RemoteBrowserDialog::RemoteBrowserDialog(const Common::U32String &title):
 	_fileList->setEditable(false);
 
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(this, "Browser.Up", (_("Go up")), _("Go to previous directory level"), kGoUpCmd);
+		new ButtonWidget(this, "Browser.Up", _("Go up"), _("Go to previous directory level"), kGoUpCmd);
 	else
-		new ButtonWidget(this, "Browser.Up", (_c("Go up", "lowres")), _("Go to previous directory level"), kGoUpCmd);
-	new ButtonWidget(this, "Browser.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
-	new ButtonWidget(this, "Browser.Choose", (_("Choose")), Common::U32String(""), kChooseCmd);
+		new ButtonWidget(this, "Browser.Up", _c("Go up", "lowres"), _("Go to previous directory level"), kGoUpCmd);
+	new ButtonWidget(this, "Browser.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "Browser.Choose", _("Choose"), Common::U32String(""), kChooseCmd);
 }
 
 RemoteBrowserDialog::~RemoteBrowserDialog() {
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index be02d86bd0..58112a4726 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -385,16 +385,16 @@ SaveLoadChooserSimple::SaveLoadChooserSimple(const U32String &title, const U32St
 
 	_gfxWidget = new GraphicsWidget(this, 0, 0, 10, 10);
 
-	_date = new StaticTextWidget(this, 0, 0, 10, 10, (_("No date saved")), Graphics::kTextAlignCenter);
-	_time = new StaticTextWidget(this, 0, 0, 10, 10, (_("No time saved")), Graphics::kTextAlignCenter);
-	_playtime = new StaticTextWidget(this, 0, 0, 10, 10, (_("No playtime saved")), Graphics::kTextAlignCenter);
+	_date = new StaticTextWidget(this, 0, 0, 10, 10, _("No date saved"), Graphics::kTextAlignCenter);
+	_time = new StaticTextWidget(this, 0, 0, 10, 10, _("No time saved"), Graphics::kTextAlignCenter);
+	_playtime = new StaticTextWidget(this, 0, 0, 10, 10, _("No playtime saved"), Graphics::kTextAlignCenter);
 
 	// Buttons
-	new ButtonWidget(this, "SaveLoadChooser.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "SaveLoadChooser.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
 	_chooseButton = new ButtonWidget(this, "SaveLoadChooser.Choose", buttonLabel, Common::U32String(""), kChooseCmd);
 	_chooseButton->setEnabled(false);
 
-	_deleteButton = new ButtonWidget(this, "SaveLoadChooser.Delete", (_("Delete")), Common::U32String(""), kDelCmd);
+	_deleteButton = new ButtonWidget(this, "SaveLoadChooser.Delete", _("Delete"), Common::U32String(""), kDelCmd);
 	_deleteButton->setEnabled(false);
 
 	_delSupport = _metaInfoSupport = _thumbnailSupport = false;
@@ -564,9 +564,9 @@ void SaveLoadChooserSimple::updateSelection(bool redraw) {
 	// We used to support letting the themes specify the fill color with our
 	// initial theme based GUI. But this support was dropped.
 	_gfxWidget->setGfx(-1, -1, 0, 0, 0);
-	_date->setLabel((_("No date saved")));
-	_time->setLabel((_("No time saved")));
-	_playtime->setLabel((_("No playtime saved")));
+	_date->setLabel(_("No date saved"));
+	_time->setLabel(_("No time saved"));
+	_playtime->setLabel(_("No playtime saved"));
 
 	if (selItem >= 0 && _metaInfoSupport) {
 		SaveStateDescriptor desc = (_saveList[selItem].getLocked() ? _saveList[selItem] : _metaEngine->querySaveMetaInfos(_target.c_str(), _saveList[selItem].getSaveSlot()));
@@ -589,13 +589,13 @@ void SaveLoadChooserSimple::updateSelection(bool redraw) {
 		}
 
 		if (_saveDateSupport) {
-			const Common::String &saveDate = desc.getSaveDate();
+			const Common::U32String &saveDate = desc.getSaveDate();
 			if (!saveDate.empty())
-				_date->setLabel(_("Date: ").encode() + saveDate);
+				_date->setLabel(_("Date: ") + saveDate);
 
-			const Common::String &saveTime = desc.getSaveTime();
+			const Common::U32String &saveTime = desc.getSaveTime();
 			if (!saveTime.empty())
-				_time->setLabel(_("Time: ").encode() + saveTime);
+				_time->setLabel(_("Time: ") + saveTime);
 		}
 
 		if (_playTimeSupport) {
@@ -764,11 +764,11 @@ SaveLoadChooserGrid::SaveLoadChooserGrid(const Common::U32String &title, bool sa
 	list->setBackgroundType(ThemeEngine::kWidgetBackgroundNo);
 
 	// Buttons
-	new ButtonWidget(this, "SaveLoadChooser.Delete", (_("Cancel")), Common::U32String(""), kCloseCmd);
-	_nextButton = new ButtonWidget(this, "SaveLoadChooser.Choose", (_("Next")), Common::U32String(""), kNextCmd);
+	new ButtonWidget(this, "SaveLoadChooser.Delete", _("Cancel"), Common::U32String(""), kCloseCmd);
+	_nextButton = new ButtonWidget(this, "SaveLoadChooser.Choose", _("Next"), Common::U32String(""), kNextCmd);
 	_nextButton->setEnabled(false);
 
-	_prevButton = new ButtonWidget(this, "SaveLoadChooser.Cancel", (_("Prev")), Common::U32String(""), kPrevCmd);
+	_prevButton = new ButtonWidget(this, "SaveLoadChooser.Cancel", _("Prev"), Common::U32String(""), kPrevCmd);
 	_prevButton->setEnabled(false);
 
 	// Page display
@@ -975,7 +975,7 @@ void SaveLoadChooserGrid::reflowLayout() {
 			// In the save mode we will always create a new save button as the first button.
 			if (_saveMode && curLine == 0 && curColumn == 0) {
 				_newSaveContainer = new ContainerWidget(this, curX, y, containerWidth, containerHeight);
-				ButtonWidget *newSave = new ButtonWidget(_newSaveContainer, dstX, dstY, buttonWidth, buttonHeight, (_("New Save")), _("Create a new saved game"), kNewSaveCmd);
+				ButtonWidget *newSave = new ButtonWidget(_newSaveContainer, dstX, dstY, buttonWidth, buttonHeight, _("New Save"), _("Create a new saved game"), kNewSaveCmd);
 				// In case no more slots are free, we will disable the new save button
 				if (_nextFreeSaveSlot == -1) {
 					newSave->setEnabled(false);
@@ -1162,7 +1162,7 @@ SavenameDialog::SavenameDialog()
 	: Dialog("SavenameDialog") {
 	_title = new StaticTextWidget(this, "SavenameDialog.DescriptionText", Common::String());
 
-	new ButtonWidget(this, "SavenameDialog.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "SavenameDialog.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
 	new ButtonWidget(this, "SavenameDialog.Ok", _("OK"), Common::U32String(""), kOKCmd);
 
 	_description = new EditTextWidget(this, "SavenameDialog.Description", Common::String(), Common::U32String(""), 0, kOKCmd);
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp
index 212b821055..0680db9416 100644
--- a/gui/themebrowser.cpp
+++ b/gui/themebrowser.cpp
@@ -42,7 +42,7 @@ enum {
 ThemeBrowser::ThemeBrowser() : Dialog("Browser") {
 	_fileList = nullptr;
 
-	new StaticTextWidget(this, "Browser.Headline", (_("Select a Theme")));
+	new StaticTextWidget(this, "Browser.Headline", _("Select a Theme"));
 
 	// Add file list
 	_fileList = new ListWidget(this, "Browser.List");
@@ -52,8 +52,8 @@ ThemeBrowser::ThemeBrowser() : Dialog("Browser") {
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
 	// Buttons
-	new ButtonWidget(this, "Browser.Cancel", (_("Cancel")), Common::U32String(""), kCloseCmd);
-	new ButtonWidget(this, "Browser.Choose", (_("Choose")), Common::U32String(""), kChooseCmd);
+	new ButtonWidget(this, "Browser.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
+	new ButtonWidget(this, "Browser.Choose", _("Choose"), Common::U32String(""), kChooseCmd);
 }
 
 void ThemeBrowser::open() {
diff --git a/gui/unknown-game-dialog.cpp b/gui/unknown-game-dialog.cpp
index ce8169cf45..ec434820b6 100644
--- a/gui/unknown-game-dialog.cpp
+++ b/gui/unknown-game-dialog.cpp
@@ -46,22 +46,22 @@ UnknownGameDialog::UnknownGameDialog(const DetectedGame &detectedGame) :
 		_detectedGame(detectedGame) {
 
 	if (detectedGame.canBeAdded) {
-		_addAnywayButton = new ButtonWidget(this, "UnknownGameDialog.Add", (_("Add anyway")), Common::U32String(""), kAddAnyway);
+		_addAnywayButton = new ButtonWidget(this, "UnknownGameDialog.Add", _("Add anyway"), Common::U32String(""), kAddAnyway);
 	} else {
 		_addAnywayButton = nullptr;
 	}
 
-	_closeButton = new ButtonWidget(this, "UnknownGameDialog.Close", detectedGame.canBeAdded ? (_("Cancel")) : (_("Close")), Common::U32String(""), kClose);
+	_closeButton = new ButtonWidget(this, "UnknownGameDialog.Close", detectedGame.canBeAdded ? _("Cancel") : _("Close"), Common::U32String(""), kClose);
 
 	//Check if we have clipboard functionality
 	if (g_system->hasFeature(OSystem::kFeatureClipboardSupport)) {
-		_copyToClipboardButton = new ButtonWidget(this, "UnknownGameDialog.Copy", (_("Copy to clipboard")), Common::U32String(""), kCopyToClipboard);
+		_copyToClipboardButton = new ButtonWidget(this, "UnknownGameDialog.Copy", _("Copy to clipboard"), Common::U32String(""), kCopyToClipboard);
 	} else
 		_copyToClipboardButton = nullptr;
 
 	//Check if we have support for opening URLs
 	if (g_system->hasFeature(OSystem::kFeatureOpenUrl)) {
-		_openBugTrackerUrlButton = new ButtonWidget(this, "UnknownGameDialog.Report", (_("Report game")), Common::U32String(""), kOpenBugtrackerURL);
+		_openBugTrackerUrlButton = new ButtonWidget(this, "UnknownGameDialog.Report", _("Report game"), Common::U32String(""), kOpenBugtrackerURL);
 	} else
 		_openBugTrackerUrlButton = nullptr;
 
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 0132442d46..a9fca9ae46 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -398,17 +398,17 @@ ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32
 #ifndef DISABLE_FANCY_THEMES
 	if (g_gui.xmlEval()->getVar("Globals.ShowSearchPic") == 1 && g_gui.theme()->supportsImages()) {
 		if (!name.empty())
-			button = new PicButtonWidget(boss, name, (_("Clear value")), cmd);
+			button = new PicButtonWidget(boss, name, _("Clear value"), cmd);
 		else
-			button = new PicButtonWidget(boss, x, y, w, h, (_("Clear value")), cmd);
+			button = new PicButtonWidget(boss, x, y, w, h, _("Clear value"), cmd);
 		((PicButtonWidget *)button)->useThemeTransparency(true);
 		((PicButtonWidget *)button)->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageEraser));
 	} else
 #endif
 		if (!name.empty())
-			button = new ButtonWidget(boss, name, Common::U32String("C"), (_("Clear value")), cmd);
+			button = new ButtonWidget(boss, name, Common::U32String("C"), _("Clear value"), cmd);
 		else
-			button = new ButtonWidget(boss, x, y, w, h, Common::U32String("C"), (_("Clear value")), cmd);
+			button = new ButtonWidget(boss, x, y, w, h, Common::U32String("C"), _("Clear value"), cmd);
 
 	return button;
 }


Commit: d3e64b2df42722d2826ad5286c1b868e888ec9bf
    https://github.com/scummvm/scummvm/commit/d3e64b2df42722d2826ad5286c1b868e888ec9bf
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use const-references for tooltips

Changed paths:
    gui/widget.cpp
    gui/widget.h
    gui/widgets/editable.cpp
    gui/widgets/editable.h
    gui/widgets/list.cpp
    gui/widgets/list.h
    gui/widgets/popup.cpp
    gui/widgets/popup.h


diff --git a/gui/widget.cpp b/gui/widget.cpp
index a9fca9ae46..2bc374da73 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -37,13 +37,13 @@
 
 namespace GUI {
 
-Widget::Widget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip)
+Widget::Widget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &tooltip)
 	: GuiObject(x, y, w, h), _type(0), _boss(boss), _tooltip(tooltip),
 	  _flags(0), _hasFocus(false), _state(ThemeEngine::kStateEnabled) {
 	init();
 }
 
-Widget::Widget(GuiObject *boss, const Common::String &name, Common::U32String tooltip)
+Widget::Widget(GuiObject *boss, const Common::String &name, const Common::U32String &tooltip)
 	: GuiObject(name), _type(0), _boss(boss), _tooltip(tooltip),
 	  _flags(0), _hasFocus(false), _state(ThemeEngine::kStateDisabled) {
 	init();
@@ -293,7 +293,7 @@ void Widget::read(const Common::U32String &str) {
 
 #pragma mark -
 
-StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, Common::U32String tooltip, ThemeEngine::FontStyle font)
+StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, const Common::U32String &tooltip, ThemeEngine::FontStyle font)
 	: Widget(boss, x, y, w, h, tooltip) {
 	setFlags(WIDGET_ENABLED);
 	_type = kStaticTextWidget;
@@ -302,7 +302,7 @@ StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h,
 	_align = Graphics::convertTextAlignH(align, g_gui.useRTL() && _useRTL);
 }
 
-StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::U32String &text, Common::U32String tooltip, ThemeEngine::FontStyle font)
+StaticTextWidget::StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::U32String &text, const Common::U32String &tooltip, ThemeEngine::FontStyle font)
 	: Widget(boss, name, tooltip) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG);
 	_type = kStaticTextWidget;
@@ -344,7 +344,7 @@ void StaticTextWidget::drawWidget() {
 
 #pragma mark -
 
-ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
+ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const Common::U32String &tooltip, uint32 cmd, uint8 hotkey)
 	: StaticTextWidget(boss, x, y, w, h, cleanupHotkey(label), Graphics::kTextAlignCenter, tooltip), CommandSender(boss),
 	  _cmd(cmd), _hotkey(hotkey), _duringPress(false) {
 
@@ -355,7 +355,7 @@ ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Co
 	_type = kButtonWidget;
 }
 
-ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
+ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const Common::U32String &tooltip, uint32 cmd, uint8 hotkey)
 	: StaticTextWidget(boss, name, cleanupHotkey(label), tooltip), CommandSender(boss),
 	  _cmd(cmd), _hotkey(hotkey), _duringPress(false) {
 	if (hotkey == 0)
@@ -431,14 +431,14 @@ void ButtonWidget::setUnpressedState() {
 
 #pragma mark -
 
-DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, Common::U32String tooltip, uint32 cmd, uint8 hotkey) :
+DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const Common::U32String &tooltip, uint32 cmd, uint8 hotkey) :
 		ButtonWidget(boss, x, y, w, h, label, tooltip, cmd, hotkey) {
 	setFlags(getFlags() | WIDGET_TRACK_MOUSE);
 
 	reset();
 }
 
-DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, Common::U32String tooltip, uint32 cmd, uint8 hotkey) :
+DropdownButtonWidget::DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const Common::U32String &tooltip, uint32 cmd, uint8 hotkey) :
 		ButtonWidget(boss, name, label, tooltip, cmd, hotkey) {
 	setFlags(getFlags() | WIDGET_TRACK_MOUSE);
 
@@ -537,7 +537,7 @@ void DropdownButtonWidget::drawWidget() {
 
 #pragma mark -
 
-PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
+PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &tooltip, uint32 cmd, uint8 hotkey)
 	: ButtonWidget(boss, x, y, w, h, Common::U32String(""), tooltip, cmd, hotkey),
 	  _alpha(255), _transparency(false), _showButton(true) {
 
@@ -545,7 +545,7 @@ PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, Co
 	_type = kButtonWidget;
 }
 
-PicButtonWidget::PicButtonWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
+PicButtonWidget::PicButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &tooltip, uint32 cmd, uint8 hotkey)
 	: ButtonWidget(boss, name, Common::U32String(""), tooltip, cmd, hotkey),
 	  _alpha(255), _transparency(false), _showButton(true) {
 	setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG);
@@ -619,13 +619,13 @@ void PicButtonWidget::drawWidget() {
 
 #pragma mark -
 
-CheckboxWidget::CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
+CheckboxWidget::CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const Common::U32String &tooltip, uint32 cmd, uint8 hotkey)
 	: ButtonWidget(boss, x, y, w, h, label, tooltip, cmd, hotkey), _state(false) {
 	setFlags(WIDGET_ENABLED);
 	_type = kCheckboxWidget;
 }
 
-CheckboxWidget::CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, Common::U32String tooltip, uint32 cmd, uint8 hotkey)
+CheckboxWidget::CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const Common::U32String &tooltip, uint32 cmd, uint8 hotkey)
 	: ButtonWidget(boss, name, label, tooltip, cmd, hotkey), _state(false) {
 	setFlags(WIDGET_ENABLED);
 	_type = kCheckboxWidget;
@@ -681,14 +681,14 @@ void RadiobuttonGroup::setEnabled(bool ena) {
 
 #pragma mark -
 
-RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::U32String &label, Common::U32String tooltip, uint8 hotkey)
+RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::U32String &label, const Common::U32String &tooltip, uint8 hotkey)
 	: ButtonWidget(boss, x, y, w, h, label, tooltip, 0, hotkey), _state(false), _value(value), _group(group) {
 	setFlags(WIDGET_ENABLED);
 	_type = kRadiobuttonWidget;
 	_group->addButton(this);
 }
 
-RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::U32String &label, Common::U32String tooltip, uint8 hotkey)
+RadiobuttonWidget::RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::U32String &label, const Common::U32String &tooltip, uint8 hotkey)
 	: ButtonWidget(boss, name, label, tooltip, 0, hotkey), _state(false), _value(value), _group(group) {
 	setFlags(WIDGET_ENABLED);
 	_type = kRadiobuttonWidget;
@@ -722,14 +722,14 @@ void RadiobuttonWidget::drawWidget() {
 
 #pragma mark -
 
-SliderWidget::SliderWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip, uint32 cmd)
+SliderWidget::SliderWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &tooltip, uint32 cmd)
 	: Widget(boss, x, y, w, h, tooltip), CommandSender(boss),
 	  _cmd(cmd), _value(0), _oldValue(0), _valueMin(0), _valueMax(100), _isDragging(false), _labelWidth(0) {
 	setFlags(WIDGET_ENABLED | WIDGET_TRACK_MOUSE | WIDGET_CLEARBG);
 	_type = kSliderWidget;
 }
 
-SliderWidget::SliderWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip, uint32 cmd)
+SliderWidget::SliderWidget(GuiObject *boss, const Common::String &name, const Common::U32String &tooltip, uint32 cmd)
 	: Widget(boss, name, tooltip), CommandSender(boss),
 	  _cmd(cmd), _value(0), _oldValue(0), _valueMin(0), _valueMax(100), _isDragging(false), _labelWidth(0) {
 	setFlags(WIDGET_ENABLED | WIDGET_TRACK_MOUSE | WIDGET_CLEARBG);
diff --git a/gui/widget.h b/gui/widget.h
index 66e313cf50..1de1ebd1ba 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -115,8 +115,8 @@ public:
 	static bool containsWidgetInChain(Widget *start, Widget *search);
 
 public:
-	Widget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip = Common::U32String(""));
-	Widget(GuiObject *boss, const Common::String &name, Common::U32String tooltip = Common::U32String(""));
+	Widget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &tooltip = Common::U32String(""));
+	Widget(GuiObject *boss, const Common::String &name, const Common::U32String &tooltip = Common::U32String(""));
 	~Widget() override;
 
 	void init();
@@ -200,8 +200,8 @@ protected:
 	Graphics::TextAlign		_align;
 	ThemeEngine::FontStyle	_font;
 public:
-	StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, Common::U32String tooltip = Common::U32String(""), ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
-	StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::U32String &text, Common::U32String tooltip = Common::U32String(""), ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
+	StaticTextWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &text, Graphics::TextAlign align, const Common::U32String &tooltip = Common::U32String(""), ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
+	StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::U32String &text, const Common::U32String &tooltip = Common::U32String(""), ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
 	void setValue(int value);
 	void setLabel(const Common::U32String &label);
 	void handleMouseEntered(int button) override	{ readLabel(); }
@@ -221,8 +221,8 @@ protected:
 	uint32	_cmd;
 	uint8	_hotkey;
 public:
-	ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
-	ButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
+	ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
+	ButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
 
 	void getMinSize(int &minWidth, int &minHeight) override;
 
@@ -247,8 +247,8 @@ protected:
 /* DropdownButtonWidget */
 class DropdownButtonWidget : public ButtonWidget {
 public:
-	DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
-	DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
+	DropdownButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
+	DropdownButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
 
 	void handleMouseMoved(int x, int y, int button) override;
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
@@ -282,8 +282,8 @@ protected:
 /* PicButtonWidget */
 class PicButtonWidget : public ButtonWidget {
 public:
-	PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
-	PicButtonWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
+	PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
+	PicButtonWidget(GuiObject *boss, const Common::String &name, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
 	~PicButtonWidget() override;
 
 	void setGfx(const Graphics::Surface *gfx, int statenum = kPicButtonStateEnabled);
@@ -307,8 +307,8 @@ class CheckboxWidget : public ButtonWidget {
 protected:
 	bool	_state;
 public:
-	CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
-	CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
+	CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &label, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
+	CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::U32String &label, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0, uint8 hotkey = 0);
 
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
 	void handleMouseEntered(int button) override	{ readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
@@ -353,8 +353,8 @@ protected:
 	int _value;
 
 public:
-	RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint8 hotkey = 0);
-	RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::U32String &label, Common::U32String tooltip = Common::U32String(""), uint8 hotkey = 0);
+	RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::U32String &label, const Common::U32String &tooltip = Common::U32String(""), uint8 hotkey = 0);
+	RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::U32String &label, const Common::U32String &tooltip = Common::U32String(""), uint8 hotkey = 0);
 
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
 	void handleMouseEntered(int button) override	{ readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
@@ -380,8 +380,8 @@ protected:
 	bool	_isDragging;
 	uint	_labelWidth;
 public:
-	SliderWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0);
-	SliderWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0);
+	SliderWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0);
+	SliderWidget(GuiObject *boss, const Common::String &name, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0);
 
 	void setCmd(uint32 cmd)		{ _cmd = cmd; }
 	uint32 getCmd() const		{ return _cmd; }
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index adfdd92cf1..ea85a08a3d 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -28,12 +28,12 @@
 
 namespace GUI {
 
-EditableWidget::EditableWidget(GuiObject *boss, int x, int y, int w, int h, U32String tooltip, uint32 cmd)
+EditableWidget::EditableWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &tooltip, uint32 cmd)
 	: Widget(boss, x, y, w, h, tooltip), CommandSender(boss), _cmd(cmd) {
 	init();
 }
 
-EditableWidget::EditableWidget(GuiObject *boss, const String &name, U32String tooltip, uint32 cmd)
+EditableWidget::EditableWidget(GuiObject *boss, const String &name, const U32String &tooltip, uint32 cmd)
 	: Widget(boss, name, tooltip), CommandSender(boss), _cmd(cmd) {
 	init();
 }
diff --git a/gui/widgets/editable.h b/gui/widgets/editable.h
index cfffed0a7b..8dc3f23cde 100644
--- a/gui/widgets/editable.h
+++ b/gui/widgets/editable.h
@@ -64,8 +64,8 @@ protected:
 	ThemeEngine::TextInversionState  _inversion;
 
 public:
-	EditableWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0);
-	EditableWidget(GuiObject *boss, const String &name, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0);
+	EditableWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0);
+	EditableWidget(GuiObject *boss, const String &name, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0);
 	~EditableWidget() override;
 
 	void init();
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index c0b1d1c4d5..b4f91c5765 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -33,7 +33,7 @@
 
 namespace GUI {
 
-ListWidget::ListWidget(Dialog *boss, const String &name, U32String tooltip, uint32 cmd)
+ListWidget::ListWidget(Dialog *boss, const String &name, const U32String &tooltip, uint32 cmd)
 	: EditableWidget(boss, name, tooltip), _cmd(cmd) {
 
 	_entriesPerPage = 0;
@@ -70,7 +70,7 @@ ListWidget::ListWidget(Dialog *boss, const String &name, U32String tooltip, uint
 	_scrollBarWidth = 0;
 }
 
-ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, U32String tooltip, uint32 cmd)
+ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, const U32String &tooltip, uint32 cmd)
 	: EditableWidget(boss, x, y, w, h, tooltip), _cmd(cmd) {
 
 	_entriesPerPage = 0;
diff --git a/gui/widgets/list.h b/gui/widgets/list.h
index a62e363a91..65a0330170 100644
--- a/gui/widgets/list.h
+++ b/gui/widgets/list.h
@@ -92,8 +92,8 @@ protected:
 	int				_lastRead;
 
 public:
-	ListWidget(Dialog *boss, const String &name, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0);
-	ListWidget(Dialog *boss, int x, int y, int w, int h, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0);
+	ListWidget(Dialog *boss, const String &name, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0);
+	ListWidget(Dialog *boss, int x, int y, int w, int h, const Common::U32String &tooltip = Common::U32String(""), uint32 cmd = 0);
 
 	bool containsWidget(Widget *) const override;
 	Widget *findWidget(int x, int y) override;
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index fa30fb73ea..af7123fc4a 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -428,7 +428,7 @@ void PopUpDialog::drawMenuEntry(int entry, bool hilite) {
 // PopUpWidget
 //
 
-PopUpWidget::PopUpWidget(GuiObject *boss, const String &name, U32String tooltip)
+PopUpWidget::PopUpWidget(GuiObject *boss, const String &name, const U32String &tooltip)
 	: Widget(boss, name, tooltip), CommandSender(boss) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_IGNORE_DRAG);
 	_type = kPopUpWidget;
@@ -437,7 +437,7 @@ PopUpWidget::PopUpWidget(GuiObject *boss, const String &name, U32String tooltip)
 	_leftPadding = _rightPadding = 0;
 }
 
-PopUpWidget::PopUpWidget(GuiObject *boss, int x, int y, int w, int h, U32String tooltip)
+PopUpWidget::PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &tooltip)
 	: Widget(boss, x, y, w, h, tooltip), CommandSender(boss) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_IGNORE_DRAG);
 	_type = kPopUpWidget;
diff --git a/gui/widgets/popup.h b/gui/widgets/popup.h
index 732593b93e..a21020690e 100644
--- a/gui/widgets/popup.h
+++ b/gui/widgets/popup.h
@@ -58,8 +58,8 @@ protected:
 	int				_rightPadding;
 
 public:
-	PopUpWidget(GuiObject *boss, const String &name, U32String tooltip = U32String(""));
-	PopUpWidget(GuiObject *boss, int x, int y, int w, int h, U32String tooltip = U32String(""));
+	PopUpWidget(GuiObject *boss, const String &name, const U32String &tooltip = U32String(""));
+	PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &tooltip = U32String(""));
 
 	void handleMouseDown(int x, int y, int button, int clickCount) override;
 	void handleMouseWheel(int x, int y, int direction) override;


Commit: f46be5c766175d3e4baa0652cdfaa6b8128f47ba
    https://github.com/scummvm/scummvm/commit/f46be5c766175d3e4baa0652cdfaa6b8128f47ba
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Improve splitting osd messages

Use iterators for construction instead of continous adding

Changed paths:
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp


diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 843547ef15..4445a2c602 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2237,18 +2237,16 @@ void SurfaceSdlGraphicsManager::displayMessageOnOSD(const Common::U32String &msg
 
 	// Split the message into separate lines.
 	Common::Array<Common::U32String> lines;
-	Common::U32String singleMessage;
+	Common::U32String::const_iterator itr = msg.begin(), strLineItrBegin = msg.begin();
 
-	// GUI U32 TODO: This can be better optimized perhaps?
-	for (Common::U32String::const_iterator itr = msg.begin(); itr != msg.end(); itr++) {
+	for ( ; itr != msg.end(); itr++) {
 		if (*itr == '\n') {
-			lines.push_back(singleMessage);
-			singleMessage.clear();
-			continue;
+			lines.push_back(Common::U32String(strLineItrBegin, itr));
+			strLineItrBegin = itr + 1;
 		}
-		singleMessage += (*itr);
 	}
-	lines.push_back(singleMessage);
+	if (strLineItrBegin != msg.end())
+		lines.push_back(Common::U32String(strLineItrBegin, msg.end()));
 
 	// Determine a rect which would contain the message string (clipped to the
 	// screen dimensions).


Commit: bd19eaa5bf45183eca345e10551428ce9d143176
    https://github.com/scummvm/scummvm/commit/bd19eaa5bf45183eca345e10551428ce9d143176
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: More code improvements in engines and misc fixes

- Xeen's GUIError now takes in U32String
- Scumm's ValueDisplayDialog takes in U32
- Mohawk's InfoDialog & PauseDialog takes in U32
- Mohawk - in riven.cpp, Some assignment fixes
- Backends -in sdl.cpp, Remove incorrect conversion from iso8859 when setting text in clipboard
- Graphics - Add u32 strings instead of decoding each piece in format

Changed paths:
    backends/graphics/openglsdl/openglsdl-graphics.cpp
    backends/platform/sdl/sdl.cpp
    engines/mohawk/dialogs.cpp
    engines/mohawk/dialogs.h
    engines/mohawk/riven.cpp
    engines/scumm/detection.cpp
    engines/scumm/dialogs.cpp
    engines/scumm/dialogs.h
    engines/xeen/xeen.cpp
    engines/xeen/xeen.h


diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 76796b251f..79113a35f8 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -659,10 +659,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 		endGFXTransaction();
 
 #ifdef USE_OSD
-		Common::U32String message = Common::String::format("%s: %s",
-			_("Stretch mode").encode().c_str(),
-			_(stretchModes[index].description).encode().c_str()
-			);
+		Common::U32String message = _("Stretch mode") + Common::U32String(": ") + _(stretchModes[index].description);
 		displayMessageOnOSD(message);
 #endif
 
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 8f317aa59b..8bea8dda95 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -519,11 +519,7 @@ Common::U32String OSystem_SDL::getTextFromClipboard() {
 bool OSystem_SDL::setTextInClipboard(const Common::U32String &text) {
 	// The encoding we need to use is UTF-8. Assume we currently have the
 	// current TranslationManager encoding or ISO-8859-1.
-#ifdef USE_TRANSLATION
 	char *utf8_text = SDL_iconv_string("UTF-8", TransMan.getCurrentCharset().c_str(), text.encode().c_str(), text.size() + 1);
-#else
-	char *utf8_text = SDL_iconv_string("UTF-8", "ISO-8859-1", text.c_str(), text.size() + 1);
-#endif
 	if (utf8_text) {
 		int status = SDL_SetClipboardText(utf8_text);
 		SDL_free(utf8_text);
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp
index 18766f410d..7244a4f47f 100644
--- a/engines/mohawk/dialogs.cpp
+++ b/engines/mohawk/dialogs.cpp
@@ -48,13 +48,13 @@
 namespace Mohawk {
 
 // This used to have GUI::Dialog("MohawkDummyDialog"), but that doesn't work with the gui branch merge :P (Sorry, Tanoku!)
-InfoDialog::InfoDialog(MohawkEngine *vm, const Common::String &message) : _vm(vm), GUI::Dialog(0, 0, 1, 1), _message(message) {
+InfoDialog::InfoDialog(MohawkEngine *vm, const Common::U32String &message) : _vm(vm), GUI::Dialog(0, 0, 1, 1), _message(message) {
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundSpecial;
 
 	_text = new GUI::StaticTextWidget(this, 0, 0, 10, 10, _message, Graphics::kTextAlignCenter);
 }
 
-void InfoDialog::setInfoText(const Common::String &message) {
+void InfoDialog::setInfoText(const Common::U32String &message) {
 	_message = message;
 	_text->setLabel(_message);
 }
@@ -74,7 +74,7 @@ void InfoDialog::reflowLayout() {
 	_text->setSize(_w, _h);
 }
 
-PauseDialog::PauseDialog(MohawkEngine *vm, const Common::String &message) : InfoDialog(vm, message) {
+PauseDialog::PauseDialog(MohawkEngine *vm, const Common::U32String &message) : InfoDialog(vm, message) {
 }
 
 void PauseDialog::handleKeyDown(Common::KeyState state) {
diff --git a/engines/mohawk/dialogs.h b/engines/mohawk/dialogs.h
index 47ae65e185..776172b537 100644
--- a/engines/mohawk/dialogs.h
+++ b/engines/mohawk/dialogs.h
@@ -27,6 +27,7 @@
 
 #include "common/events.h"
 #include "common/str.h"
+#include "common/ustr.h"
 
 #include "engines/dialogs.h"
 
@@ -49,13 +50,13 @@ class MohawkEngine;
 class InfoDialog : public GUI::Dialog {
 protected:
 	MohawkEngine *_vm;
-	Common::String _message;
+	Common::U32String _message;
 	GUI::StaticTextWidget *_text;
 
 public:
-	InfoDialog(MohawkEngine *vm, const Common::String &message);
+	InfoDialog(MohawkEngine *vm, const Common::U32String &message);
 
-	void setInfoText(const Common::String &message);
+	void setInfoText(const Common::U32String &message);
 
 	void handleMouseDown(int x, int y, int button, int clickCount) override {
 		setResult(0);
@@ -72,7 +73,7 @@ public:
 
 class PauseDialog : public InfoDialog {
 public:
-	PauseDialog(MohawkEngine* vm, const Common::String &message);
+	PauseDialog(MohawkEngine* vm, const Common::U32String &message);
 	void handleKeyDown(Common::KeyState state) override;
 };
 
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 9471e9faaf..49eda7b88e 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -153,10 +153,10 @@ Common::Error MohawkEngine_Riven::run() {
 
 	// We need to have a cursor source, or the game won't work
 	if (!_cursor->hasSource()) {
-		Common::String message = _("You're missing a Riven executable. The Windows executable is 'riven.exe' or 'rivendmo.exe'. ");
+		Common::U32String message = _("You're missing a Riven executable. The Windows executable is 'riven.exe' or 'rivendmo.exe'. ");
 		message += _("Using the 'arcriven.z' installer file also works. In addition, you can use the Mac 'Riven' executable.");
 		GUIErrorMessage(message);
-		warning("%s", message.c_str());
+		warning("%s", message.encode().c_str());
 		return Common::kNoGameDataFoundError;
 	}
 
@@ -165,9 +165,9 @@ Common::Error MohawkEngine_Riven::run() {
 
 	// We need extras.mhk for inventory images, marble images, and credits images
 	if (!_extrasFile->openFile("extras.mhk")) {
-		Common::String message = _("You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also works.");
+		Common::U32String message = _("You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also works.");
 		GUIErrorMessage(message);
-		warning("%s", message.c_str());
+		warning("%s", message.encode().c_str());
 		return Common::kNoGameDataFoundError;
 	}
 
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 899af3fce6..a05b2a24e1 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -1134,7 +1134,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co
 	// unknown MD5, or with a medium debug level in case of a known MD5 (for
 	// debugging purposes).
 	if (!findInMD5Table(res.md5.c_str())) {
-		Common::String md5Warning;
+		Common::U32String md5Warning;
 
 		md5Warning = _("Your game version appears to be unknown. If this is *NOT* a fan-modified\n"
 		               "version (in particular, not a fan-made translation), please, report the\n"
@@ -1146,7 +1146,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co
 				generateFilenameForDetection(res.fp.pattern, res.fp.genMethod, res.game.platform).c_str(),
 				res.md5.c_str());
 
-		g_system->logMessage(LogMessageType::kWarning, md5Warning.c_str());
+		g_system->logMessage(LogMessageType::kWarning, md5Warning.encode().c_str());
 	} else {
 		debug(1, "Using MD5 '%s'", res.md5.c_str());
 	}
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 738bb96af6..a0ac0aa8ad 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -327,7 +327,7 @@ void HelpDialog::reflowLayout() {
 }
 
 void HelpDialog::displayKeyBindings() {
-	String titleStr, *keyStr, *dscStr;
+	U32String titleStr, *keyStr, *dscStr;
 
 #ifndef __DS__
 	ScummHelp::updateStrings(_game.id, _game.version, _game.platform, _page, titleStr, keyStr, dscStr);
@@ -509,7 +509,7 @@ void ConfirmDialog::handleKeyDown(Common::KeyState state) {
 
 #pragma mark -
 
-ValueDisplayDialog::ValueDisplayDialog(const Common::String& label, int minVal, int maxVal,
+ValueDisplayDialog::ValueDisplayDialog(const Common::U32String& label, int minVal, int maxVal,
 		int val, uint16 incKey, uint16 decKey)
 	: GUI::Dialog(0, 0, 0, 0),
 	_label(label), _min(minVal), _max(maxVal),
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 11c6ea70c4..e1337b65e4 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -24,6 +24,7 @@
 #define SCUMM_DIALOGS_H
 
 #include "common/str.h"
+#include "common/ustr.h"
 #include "common/keyboard.h"
 #include "gui/dialog.h"
 #include "engines/dialogs.h"
@@ -126,7 +127,7 @@ protected:
  */
 class ValueDisplayDialog : public GUI::Dialog {
 public:
-	ValueDisplayDialog(const Common::String& label, int minVal, int maxVal, int val, uint16 incKey, uint16 decKey);
+	ValueDisplayDialog(const Common::U32String& label, int minVal, int maxVal, int val, uint16 incKey, uint16 decKey);
 
 	void open() override;
 	void drawDialog(GUI::DrawLayer layerToDraw) override;
@@ -142,7 +143,7 @@ protected:
 	enum {
 		kDisplayDelay = 1500
 	};
-	Common::String _label;
+	Common::U32String _label;
 	const int _min, _max;
 	const uint16 _incKey, _decKey;
 	int _percentBarWidth;
diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp
index 5de7f796a7..eda132c9a5 100644
--- a/engines/xeen/xeen.cpp
+++ b/engines/xeen/xeen.cpp
@@ -328,7 +328,7 @@ void XeenEngine::saveSettings() {
 	ConfMan.flushToDisk();
 }
 
-void XeenEngine::GUIError(const Common::String &msg) {
+void XeenEngine::GUIError(const Common::U32String &msg) {
 	GUIErrorMessage(msg);
 }
 
diff --git a/engines/xeen/xeen.h b/engines/xeen/xeen.h
index 038abe7fcd..fbaf8a672f 100644
--- a/engines/xeen/xeen.h
+++ b/engines/xeen/xeen.h
@@ -313,7 +313,7 @@ public:
 	/**
 	 * Show an error message in a GUI dialog
 	 */
-	void GUIError(const Common::String &msg);
+	void GUIError(const Common::U32String &msg);
 };
 
 extern XeenEngine *g_vm;


Commit: ffc89d1a2bdea254730648c3e4309bd596d36e1a
    https://github.com/scummvm/scummvm/commit/ffc89d1a2bdea254730648c3e4309bd596d36e1a
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: SCUMM: Make variables in help to use U32

Make titles and other translation dependent variables to use u32

Changed paths:
    engines/scumm/help.cpp
    engines/scumm/help.h


diff --git a/engines/scumm/help.cpp b/engines/scumm/help.cpp
index 16d796a957..e30ae6e26c 100644
--- a/engines/scumm/help.cpp
+++ b/engines/scumm/help.cpp
@@ -23,6 +23,7 @@
 
 
 #include "common/str.h"
+#include "common/ustr.h"
 #include "common/util.h"
 
 #include "scumm/help.h"
@@ -65,9 +66,9 @@ int ScummHelp::numPages(byte gameId) {
 #define ADD_LINE ADD_BIND("","")
 
 void ScummHelp::updateStrings(byte gameId, byte version, Common::Platform platform,
-				int page, String &title, String *&key, String *&dsc) {
-	key = new String[HELP_NUM_LINES];
-	dsc = new String[HELP_NUM_LINES];
+				int page, U32String &title, U32String *&key, U32String *&dsc) {
+	key = new U32String[HELP_NUM_LINES];
+	dsc = new U32String[HELP_NUM_LINES];
 	int i = 0;
 	switch (page) {
 	case 1:
@@ -77,14 +78,14 @@ void ScummHelp::updateStrings(byte gameId, byte version, Common::Platform platfo
 			ADD_BIND(".", _("Skip line of text"));
 		ADD_BIND(_("Esc"), _("Skip cutscene"));
 		ADD_BIND(_("Space"), _("Pause game"));
-		ADD_BIND(String(_("Ctrl")) + " 0-9", _("Load saved game 1-10"));
-		ADD_BIND(String(_("Alt")) + " 0-9", _("Save game 1-10"));
+		ADD_BIND(_("Ctrl") + U32String(" 0-9"), _("Load saved game 1-10"));
+		ADD_BIND(_("Alt") + U32String(" 0-9"), _("Save game 1-10"));
 #ifdef MACOSX
 		ADD_BIND("Cmd q", _("Quit"));
 #else
-		ADD_BIND(String(_("Alt")) + " x, " + _("Ctrl").encode() + " z", _("Quit").encode());
+		ADD_BIND(_("Alt") + U32String(" x, ") + _("Ctrl") + U32String(" z"), _("Quit"));
 #endif
-		ADD_BIND(String(_("Alt")) + " " + _("Enter").encode(), _("Toggle fullscreen"));
+		ADD_BIND(_("Alt") + U32String(" ") + _("Enter"), _("Toggle fullscreen"));
 		ADD_BIND("[, ]", _("Music volume up / down"));
 		ADD_BIND("-, +", _("Text speed slower / faster"));
 		ADD_BIND(_("Enter"), _("Simulate left mouse button"));
@@ -93,14 +94,14 @@ void ScummHelp::updateStrings(byte gameId, byte version, Common::Platform platfo
 	case 2:
 		title = _("Special keyboard commands:");
 		ADD_BIND("~, #", _("Show / Hide console"));
-		ADD_BIND(String(_("Ctrl")) + " d", _("Start the debugger"));
-		ADD_BIND(String(_("Ctrl")) + " s", _("Show memory consumption"));
-		ADD_BIND(String(_("Ctrl")) + " f", _("Run in fast mode (*)"));
-		ADD_BIND(String(_("Ctrl")) + " g", _("Run in really fast mode (*)"));
-		ADD_BIND(String(_("Ctrl")) + " m", _("Toggle mouse capture"));
-		ADD_BIND(String(_("Ctrl")) + " " + _("Alt").encode() + " 1-8", _("Switch between graphics filters"));
-		ADD_BIND(String(_("Ctrl")) + " " + _("Alt").encode() + " +, -", _("Increase / Decrease scale factor"));
-		ADD_BIND(String(_("Ctrl")) + " " + _("Alt").encode() + " a", _("Toggle aspect-ratio correction"));
+		ADD_BIND(_("Ctrl") + U32String(" d"), _("Start the debugger"));
+		ADD_BIND(_("Ctrl") + U32String(" s"), _("Show memory consumption"));
+		ADD_BIND(_("Ctrl") + U32String(" f"), _("Run in fast mode (*)"));
+		ADD_BIND(_("Ctrl") + U32String(" g"), _("Run in really fast mode (*)"));
+		ADD_BIND(_("Ctrl") + U32String(" m"), _("Toggle mouse capture"));
+		ADD_BIND(_("Ctrl") + U32String(" ") + _("Alt") + U32String(" 1-8"), _("Switch between graphics filters"));
+		ADD_BIND(_("Ctrl") + U32String(" ") + _("Alt") + U32String(" +, -"), _("Increase / Decrease scale factor"));
+		ADD_BIND(_("Ctrl") + U32String(" ") + _("Alt") + U32String(" a"), _("Toggle aspect-ratio correction"));
 		ADD_LINE;
 		ADD_LINE;
 		// FIXME: This should use word-wrapping, and should not assume
diff --git a/engines/scumm/help.h b/engines/scumm/help.h
index a3948566c4..a69989872b 100644
--- a/engines/scumm/help.h
+++ b/engines/scumm/help.h
@@ -24,6 +24,7 @@
 #define SCUMM_HELP_H
 
 #include "common/str.h"
+#include "common/ustr.h"
 #include "common/platform.h"
 
 namespace Scumm {
@@ -33,11 +34,12 @@ namespace Scumm {
 class ScummHelp {
 protected:
 	typedef Common::String String;
+	typedef Common::U32String U32String;
 
 public:
 	static int numPages(byte gameId);
 	static void updateStrings(byte gameId, byte version, Common::Platform platform,
-			int page, String &title, String *&key, String *&dsc);
+			int page, U32String &title, U32String *&key, U32String *&dsc);
 };
 
 } // End of namespace Scumm


Commit: 4b6976c558bf07c2bf00cfd94a232f7035ae5e6f
    https://github.com/scummvm/scummvm/commit/4b6976c558bf07c2bf00cfd94a232f7035ae5e6f
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Reduce number of files changed and fixes

Up until last commit, everything was working fine but the amount of files changed was too large. This commit tries to reduce the changes.

- Add a fake constructor to Keymap, text-to-speech, setDescription (save-state)
- Redirecting functions for PopUpWidget::appendEntry, ButtonWidget::setLabel, GUIErrorMessage
- Use the above functions and constructors to reduce changes in Engines
- Fix warnings being in unicode. Only output english text in - Warnings, Errors, etc.
- Mark some strings as "translation" strings. (Not yet added to POTFILES)
- Remove some CP related things from po/modules.mk
- Previously used some Common::convertToU32 where it was not necessary, replace this with u32constructor

Changed paths:
    audio/softsynth/mt32.cpp
    backends/cloud/storage.cpp
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    backends/keymapper/keymap.cpp
    backends/keymapper/keymap.h
    backends/text-to-speech/linux/linux-text-to-speech.cpp
    backends/text-to-speech/windows/windows-text-to-speech.cpp
    backends/text-to-speech/windows/windows-text-to-speech.h
    base/main.cpp
    common/text-to-speech.h
    engines/agi/detection.cpp
    engines/agi/saveload.cpp
    engines/agos/midi.cpp
    engines/agos/saveload.cpp
    engines/bbvs/dialogs.cpp
    engines/cge/cge.cpp
    engines/dialogs.cpp
    engines/drascula/drascula.cpp
    engines/engine.cpp
    engines/engine.h
    engines/game.cpp
    engines/glk/alan2/alan2.cpp
    engines/glk/alan3/alan3.cpp
    engines/glk/hugo/herun.cpp
    engines/glk/hugo/hugo.cpp
    engines/glk/zcode/zcode.cpp
    engines/hdb/detection.cpp
    engines/hugo/hugo.cpp
    engines/illusions/menusystem.cpp
    engines/lab/engine.cpp
    engines/lab/processroom.cpp
    engines/lab/speciallocks.cpp
    engines/lure/surface.cpp
    engines/mads/dialogs.cpp
    engines/mohawk/dialogs.cpp
    engines/mohawk/myst.cpp
    engines/mohawk/myst_stacks/preview.cpp
    engines/mohawk/riven.cpp
    engines/mutationofjb/util.cpp
    engines/pegasus/pegasus.cpp
    engines/saga/saga.cpp
    engines/savestate.h
    engines/sci/detection.cpp
    engines/sci/engine/kmisc.cpp
    engines/sci/sound/music.cpp
    engines/scumm/dialogs.cpp
    engines/scumm/resource.cpp
    engines/scumm/scumm.cpp
    engines/scumm/string.cpp
    engines/sherlock/scalpel/scalpel_user_interface.cpp
    engines/sherlock/talk.cpp
    engines/sky/compact.cpp
    engines/sky/detection.cpp
    engines/supernova/supernova.cpp
    engines/sword2/protocol.cpp
    engines/sword2/resman.cpp
    engines/teenagent/resources.cpp
    engines/testbed/config.cpp
    engines/testbed/config.h
    engines/testbed/speech.cpp
    engines/testbed/testbed.cpp
    engines/tinsel/sound.cpp
    engines/titanic/support/files_manager.cpp
    engines/tony/tony.cpp
    engines/toon/toon.cpp
    engines/tsage/core.cpp
    engines/ultima/ultima4/meta_engine.cpp
    engines/wintermute/base/base_persistence_manager.cpp
    engines/wintermute/detection.cpp
    engines/wintermute/keymapper_tables.h
    engines/xeen/files.cpp
    engines/zvision/detection.cpp
    engines/zvision/zvision.cpp
    gui/widget.cpp
    gui/widget.h
    gui/widgets/popup.cpp
    gui/widgets/popup.h
    po/module.mk


diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index 11183058bd..7b09e28650 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -77,7 +77,7 @@ public:
 		error("MT32emu: Init Error - Missing PCM ROM image");
 	}
 	void showLCDMessage(const char *message) {
-		Common::OSDMessageQueue::instance().addMessage(Common::convertToU32String(message));
+		Common::OSDMessageQueue::instance().addMessage(Common::U32String(message));
 	}
 
 	// Unused callbacks
diff --git a/backends/cloud/storage.cpp b/backends/cloud/storage.cpp
index 25c623e416..76b6a241bb 100644
--- a/backends/cloud/storage.cpp
+++ b/backends/cloud/storage.cpp
@@ -345,9 +345,7 @@ void Storage::directoryDownloadedCallback(FileArrayResponse response) {
 
 	Common::U32String message;
 	if (response.value.size()) {
-		message = Common::U32String::format(
-			_("Download complete.\nFailed to download %u files."),
-			response.value.size());
+		message = Common::U32String::format(_("Download complete.\nFailed to download %u files."), response.value.size());
 	} else {
 		message = _("Download complete.");
 	}
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 4445a2c602..ecc6950cb3 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2549,10 +2549,7 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 		endGFXTransaction();
 
 #ifdef USE_OSD
-		Common::U32String message = Common::String::format("%s: %s",
-		                                                _("Stretch mode").encode().c_str(),
-		                                                _(s_supportedStretchModes[index].description).encode().c_str()
-		);
+		Common::U32String message = _("Stretch mode") + Common::U32String(": ") + _(s_supportedStretchModes[index].description);
 		displayMessageOnOSD(message);
 #endif
 		_forceRedraw = true;
diff --git a/backends/keymapper/keymap.cpp b/backends/keymapper/keymap.cpp
index c86a982abb..5a8f9f820d 100644
--- a/backends/keymapper/keymap.cpp
+++ b/backends/keymapper/keymap.cpp
@@ -44,6 +44,10 @@ Keymap::Keymap(KeymapType type, const String &id, const U32String &description)
 
 }
 
+Keymap::Keymap(KeymapType type, const String &id, const String &description) {
+	Keymap(type, id, U32String(description));
+}
+
 Keymap::~Keymap() {
 	for (ActionArray::iterator it = _actions.begin(); it != _actions.end(); ++it)
 		delete *it;
diff --git a/backends/keymapper/keymap.h b/backends/keymapper/keymap.h
index 3fca37873c..e5c1c4d4aa 100644
--- a/backends/keymapper/keymap.h
+++ b/backends/keymapper/keymap.h
@@ -81,6 +81,7 @@ public:
 	typedef Array<Action *> ActionArray;
 
 	Keymap(KeymapType type, const String &id, const U32String &description);
+	Keymap(KeymapType type, const String &id, const String &description);
 	~Keymap();
 	void setConfigDomain(ConfigManager::Domain *configDomain);
 	void setHardwareInputs(HardwareInputSet *hardwareInputSet);
diff --git a/backends/text-to-speech/linux/linux-text-to-speech.cpp b/backends/text-to-speech/linux/linux-text-to-speech.cpp
index 8ff0004752..a7777f1a50 100644
--- a/backends/text-to-speech/linux/linux-text-to-speech.cpp
+++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp
@@ -194,7 +194,7 @@ bool SpeechDispatcherManager::say(const Common::U32String &str, Action action, C
 		return true;
 	}
 
-	Common::String strUtf8 = str.encode();;
+	Common::String strUtf8 = str.encode();
 
 	if (!_speechQueue.empty() && action == INTERRUPT_NO_REPEAT &&
 			_speechQueue.front() == strUtf8 && isSpeaking()) {
diff --git a/backends/text-to-speech/windows/windows-text-to-speech.cpp b/backends/text-to-speech/windows/windows-text-to-speech.cpp
index d52014b3db..80947cdfc4 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.cpp
+++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp
@@ -246,6 +246,10 @@ bool WindowsTextToSpeechManager::say(const Common::U32String &str, Action action
 	return false;
 }
 
+bool WindowsTextToSpeechManager::say(const Common::String &str, Action action, Common::String charset) {
+	return say(Common::U32String(str), action, charset);
+}
+
 bool WindowsTextToSpeechManager::stop() {
 	if (_speechState == BROKEN || _speechState == NO_VOICE)
 		return true;
diff --git a/backends/text-to-speech/windows/windows-text-to-speech.h b/backends/text-to-speech/windows/windows-text-to-speech.h
index ac0906117a..00dabb7fe6 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.h
+++ b/backends/text-to-speech/windows/windows-text-to-speech.h
@@ -53,6 +53,7 @@ public:
 	virtual ~WindowsTextToSpeechManager() override;
 
 	virtual bool say(const Common::U32String &str, Action action, Common::String charset = "") override;
+	virtual bool say(const Common::String &str, Action action, Common::String charset = "") override;
 
 	virtual bool stop() override;
 	virtual bool pause() override;
diff --git a/base/main.cpp b/base/main.cpp
index be3f5190d0..e378887f82 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -260,7 +260,7 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
 		if (token.equalsIgnoreCase("all"))
 			DebugMan.enableAllDebugChannels();
 		else if (!DebugMan.enableDebugChannel(token))
-			warning(Common::convertFromU32String(_("Engine does not support debug level '%s'")).c_str(), token.c_str());
+			warning("Engine does not support debug level '%s'", token.c_str());
 	}
 
 #ifdef USE_TRANSLATION
diff --git a/common/text-to-speech.h b/common/text-to-speech.h
index 62aa953bf7..2e39115242 100644
--- a/common/text-to-speech.h
+++ b/common/text-to-speech.h
@@ -159,6 +159,7 @@ public:
 	 *        encoding used for the GUI.
 	 */
 	bool say(const U32String &str, String charset = "") { return say(str, INTERRUPT_NO_REPEAT, charset); }
+	bool say(const String &str, String charset = "") { return say(U32String(str), charset); }
 
 	/**
 	 * Says the given string
@@ -179,6 +180,7 @@ public:
 	 *        encoding used for the GUI.
 	 */
 	virtual bool say(const U32String &str, Action action, String charset = "") { return false; }
+	virtual bool say(const String &str, Action action, String charset = "") { return false; }
 
 	/**
 	 * Stops the speech
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 3cf0fd81d7..e897e1258b 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -332,7 +332,7 @@ SaveStateList AgiMetaEngine::listSaves(const char *target) const {
 
 				delete in;
 
-				saveList.push_back(SaveStateDescriptor(slotNr, Common::U32String(description)));
+				saveList.push_back(SaveStateDescriptor(slotNr, description));
 			}
 		}
 	}
@@ -375,11 +375,11 @@ SaveStateDescriptor AgiMetaEngine::querySaveMetaInfos(const char *target, int sl
 			// broken description, ignore it
 			delete in;
 
-			SaveStateDescriptor descriptor(slotNr, Common::U32String("[broken saved game]"));
+			SaveStateDescriptor descriptor(slotNr, "[broken saved game]");
 			return descriptor;
 		}
 
-		SaveStateDescriptor descriptor(slotNr, Common::U32String(description));
+		SaveStateDescriptor descriptor(slotNr, description);
 
 		// Do not allow save slot 0 (used for auto-saving) to be deleted or
 		// overwritten.
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index f02fadd55f..77637846d2 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -767,7 +767,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 		}
 
 		if (desc.size() > 28)
-			desc = Common::U32String(desc.encode().c_str(), 28);
+			desc = Common::U32String(desc.begin(), desc.begin() + 28);
 	} else {
 		dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
 		slot = dialog->runModalWithCurrentTarget();
diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp
index 1811b8e3fa..34c7634d94 100644
--- a/engines/agos/midi.cpp
+++ b/engines/agos/midi.cpp
@@ -37,6 +37,7 @@
 
 // PKWARE data compression library decompressor required for Simon 2
 #include "common/dcl.h"
+#include "common/translation.h"
 
 #include "gui/message.h"
 
@@ -139,12 +140,12 @@ int MidiPlayer::open(int gameType, bool isDemo) {
 		case MT_GM:
 			if (!ConfMan.getBool("native_mt32")) {
 				// Not a real MT32 / no MUNT
-				::GUI::MessageDialog dialog(Common::convertToU32String((
+				::GUI::MessageDialog dialog(_(
 											"You appear to be using a General MIDI device,\n"
 											"but your game only supports Roland MT32 MIDI.\n"
 											"We try to map the Roland MT32 instruments to\n"
 											"General MIDI ones. It is still possible that\n"
-											"some tracks sound incorrect.")));
+											"some tracks sound incorrect."));
 				dialog.runModal();
 			}
 			// Switch to MT32 driver in any case
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index 44208ff782..d89d8f5ec3 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -134,7 +134,7 @@ void AGOSEngine::quickLoadOrSave() {
 	if ((getGameType() == GType_SIMON2 && _boxStarHeight == 200) ||
 		(getGameType() == GType_SIMON1 && (getFeatures() & GF_DEMO)) ||
 		_mouseHideCount || _showPreposition) {
-		buf = Common::String::format("Quick load or save game isn't supported in this location");
+		buf = Common::U32String::format(_("Quick load or save game isn't supported in this location"));
 		GUI::MessageDialog dialog(buf);
 		dialog.runModal();
 		return;
diff --git a/engines/bbvs/dialogs.cpp b/engines/bbvs/dialogs.cpp
index 9f22c26c46..c7afb748c2 100644
--- a/engines/bbvs/dialogs.cpp
+++ b/engines/bbvs/dialogs.cpp
@@ -192,7 +192,7 @@ void MainMenu::gotoMenuScreen(int screen) {
 		} else {
 			btn = &kMenuButtons[screen * 5 + i];
 		}
-		_buttons[i]->setLabel(Common::U32String(btn->label));
+		_buttons[i]->setLabel(btn->label);
 		_buttons[i]->setCmd(btn->cmd);
 		_buttons[i]->setEnabled(btn->cmd != 0);
 	}
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index 5574c8b16e..814d1c2dbc 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -225,7 +225,7 @@ Common::Error CGEEngine::run() {
 
 	// If game is finished, display ending message
 	if (_flag[3]) {
-		Common::U32String msg = Common::U32String(_text->getText(kSayTheEnd));
+		Common::String msg = Common::String(_text->getText(kSayTheEnd));
 		if (!msg.empty()) {
 			g_system->delayMillis(10);
 			GUI::MessageDialog dialog(msg);
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index efb4c6974c..edb3ea98f8 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -214,9 +214,9 @@ void MainMenuDialog::save() {
 
 		Common::Error status = _engine->saveGameState(slot, Common::convertFromU32String(result));
 		if (status.getCode() != Common::kNoError) {
-			Common::U32String failMessage = Common::U32String::format(_("Failed to save game (%s)! "),
+			Common::U32String failMessage = Common::U32String::format(_("Failed to save game (%s)! "
 				  "Please consult the README for basic information, and for "
-				  "instructions on how to obtain further assistance.");
+				  "instructions on how to obtain further assistance."), status.getDesc().c_str());
 			GUI::MessageDialog dialog(failMessage);
 			dialog.runModal();
 		}
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index e695cc146d..64d5f2868d 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -930,7 +930,7 @@ bool DrasculaEngine::loadDrasculaDat() {
 	if (!in.isOpen()) {
 		Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
 		GUIErrorMessage(errorMessage);
-		warning("%s", errorMessage.encode().c_str());
+		warning("Unable to locate the '%s' engine data file.", filename.c_str());
 
 		return false;
 	}
@@ -944,7 +944,7 @@ bool DrasculaEngine::loadDrasculaDat() {
 	if (strcmp(buf, "DRASCULA") != 0) {
 		Common::U32String errorMessage = Common::U32String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
 		GUIErrorMessage(errorMessage);
-		warning("%s", errorMessage.encode().c_str());
+		warning("The '%s' engine data file is corrupt.", filename.c_str());
 
 		return false;
 	}
@@ -956,7 +956,8 @@ bool DrasculaEngine::loadDrasculaDat() {
 			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
 			filename.c_str(), DRASCULA_DAT_VER, 0, ver, 0);
 		GUIErrorMessage(errorMessage);
-		warning("%s", errorMessage.encode().c_str());
+		warning("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.",
+			filename.c_str(), DRASCULA_DAT_VER, 0, ver, 0);
 
 		return false;
 	}
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 0c606061fa..4fb538f6f2 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -320,7 +320,7 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
 			_("Could not switch to resolution '%dx%d'."), width, height);
 
 		GUIErrorMessage(message);
-		error("%s", message.encode().c_str());
+		error("Could not switch to resolution '%dx%d'.", width, height);
 	}
 
 	// Just show warnings then these occur:
@@ -335,8 +335,7 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
 
 	if (gfxError & OSystem::kTransactionModeSwitchFailed) {
 		Common::U32String message;
-		message = Common::U32String::format(
-			_("Could not switch to video mode '%s'."), ConfMan.get("gfx_mode").c_str());
+		message = Common::U32String::format(_("Could not switch to video mode '%s'."), ConfMan.get("gfx_mode").c_str());
 
 		GUI::MessageDialog dialog(message);
 		dialog.runModal();
@@ -344,8 +343,7 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
 
 	if (gfxError & OSystem::kTransactionStretchModeSwitchFailed) {
 		Common::U32String message;
-		message = Common::U32String::format(
-			_("Could not switch to stretch mode '%s'."), ConfMan.get("stretch_mode").c_str());
+		message = Common::U32String::format(_("Could not switch to stretch mode '%s'."), ConfMan.get("stretch_mode").c_str());
 
 		GUI::MessageDialog dialog(message);
 		dialog.runModal();
@@ -402,6 +400,14 @@ void GUIErrorMessageWithURL(const Common::U32String &msg, const char *url) {
 	GUIErrorMessage(msg, url);
 }
 
+void GUIErrorMessageWithURL(const Common::String &msg, const char *url) {
+	GUIErrorMessage(Common::U32String(msg), url);
+}
+
+void GUIErrorMessage(const Common::String &msg, const char *url) {
+	GUIErrorMessage(Common::U32String(msg), url);
+}
+
 void GUIErrorMessage(const Common::U32String &msg, const char *url) {
 	g_system->setWindowCaption("Error");
 	g_system->beginGFXTransaction();
diff --git a/engines/engine.h b/engines/engine.h
index 46f939e9b9..a5dde6b0b0 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -54,7 +54,9 @@ class Dialog;
  * Initializes graphics and shows error message.
  */
 void GUIErrorMessage(const Common::U32String &msg, const char *url = nullptr);
+void GUIErrorMessage(const Common::String &msg, const char *url = nullptr); // Redirect to GUIErrorMessage with U32Strings
 void GUIErrorMessageWithURL(const Common::U32String &msg, const char *url);
+void GUIErrorMessageWithURL(const Common::String &msg, const char *url); // Redirect to GUIErrorMessageWithURL with U32Strings
 void GUIErrorMessageFormat(Common::U32String fmt, ...);
 void GUIErrorMessageFormat(const char *fmt, ...) GCC_PRINTF(1, 2);
 
diff --git a/engines/game.cpp b/engines/game.cpp
index 7b9a67c1aa..6f2c7c25b8 100644
--- a/engines/game.cpp
+++ b/engines/game.cpp
@@ -169,9 +169,9 @@ Common::String generateUnknownGameReport(const DetectedGames &detectedGames, boo
 	assert(!detectedGames.empty());
 
 	const char *reportStart = _s("The game in '%s' seems to be an unknown game variant.\n\n"
-									"Please report the following data to the ScummVM team at %s "
-									"along with the name of the game you tried to add and "
-									"its version, language, etc.:");
+								"Please report the following data to the ScummVM team at %s "
+								"along with the name of the game you tried to add and "
+								"its version, language, etc.:");
 	const char *reportEngineHeader = _s("Matched game IDs for the %s engine:");
 
 	Common::String report = Common::String::format(
diff --git a/engines/glk/alan2/alan2.cpp b/engines/glk/alan2/alan2.cpp
index 8008fd4c4b..d875deecb3 100644
--- a/engines/glk/alan2/alan2.cpp
+++ b/engines/glk/alan2/alan2.cpp
@@ -85,7 +85,7 @@ bool Alan2::initialize() {
 	// Open up the text file
 	txtfil = new Common::File();
 	if (!txtfil->open(Common::String::format("%s.dat", _advName.c_str()))) {
-		GUIErrorMessage(Common::convertToU32String("Could not open adventure text data file"));
+		GUIErrorMessage("Could not open adventure text data file");
 		delete txtfil;
 		return false;
 	}
diff --git a/engines/glk/alan3/alan3.cpp b/engines/glk/alan3/alan3.cpp
index 90baedd9f6..d2bce655dc 100644
--- a/engines/glk/alan3/alan3.cpp
+++ b/engines/glk/alan3/alan3.cpp
@@ -94,7 +94,7 @@ bool Alan3::initialize() {
 	// In Alan 3, the text data comes from the adventure file itself
 	Common::File *txt = new Common::File();
 	if (!txt->open(getFilename())) {
-	    GUIErrorMessage(Common::convertToU32String("Could not open adventure file for text data"));
+	    GUIErrorMessage("Could not open adventure file for text data");
 	    delete txt;
 	    return false;
 	}
diff --git a/engines/glk/hugo/herun.cpp b/engines/glk/hugo/herun.cpp
index 0e46a4789a..1d8a79acb4 100644
--- a/engines/glk/hugo/herun.cpp
+++ b/engines/glk/hugo/herun.cpp
@@ -184,7 +184,7 @@ Start:
 	// Handle any savegame selected directly from the ScummVM launcher
 	if (_savegameSlot != -1) {
 		if (loadGameState(_savegameSlot).getCode() != Common::kNoError) {
-			GUIErrorMessage(Common::convertToU32String("Loading failed"));
+			GUIErrorMessage("Loading failed");
 			_savegameSlot = -1;
 		}
 	}
diff --git a/engines/glk/hugo/hugo.cpp b/engines/glk/hugo/hugo.cpp
index dea8537c46..3e70d722af 100644
--- a/engines/glk/hugo/hugo.cpp
+++ b/engines/glk/hugo/hugo.cpp
@@ -23,6 +23,7 @@
 #include "glk/hugo/hugo.h"
 #include "glk/hugo/resource_archive.h"
 #include "common/config-manager.h"
+#include "common/translation.h"
 
 namespace Glk {
 namespace Hugo {
@@ -179,14 +180,14 @@ Common::Error Hugo::readSaveData(Common::SeekableReadStream *rs) {
 	if (hugo_ferror(rs)) goto RestoreError;
 
 	if (strcmp(testid, id)) {
-		GUIErrorMessage(Common::convertToU32String("Incorrect rs file."));
+		GUIErrorMessage(_("Incorrect rs file."));
 		goto RestoreError;
 	}
 
 	/* Check serial number */
 	if (!hugo_fgets(testserial, 9, rs)) goto RestoreError;
 	if (strcmp(testserial, serial)) {
-		GUIErrorMessage(Common::convertToU32String("Save file created by different version."));
+		GUIErrorMessage(_("Save file created by different version."));
 		goto RestoreError;
 	}
 
diff --git a/engines/glk/zcode/zcode.cpp b/engines/glk/zcode/zcode.cpp
index 818aec711f..5ff22ed723 100644
--- a/engines/glk/zcode/zcode.cpp
+++ b/engines/glk/zcode/zcode.cpp
@@ -123,7 +123,7 @@ Common::Error ZCode::loadGameState(int slot) {
 			|| h_screen_cols != old_screen_cols))
 			erase_window(1);
 	} else {
-		error("%s", _("Error reading save file").encode().c_str());
+		error("%s", ("Error reading save file"));
 	}
 
 	return Common::kNoError;
diff --git a/engines/hdb/detection.cpp b/engines/hdb/detection.cpp
index f04227ead2..438ec89e03 100644
--- a/engines/hdb/detection.cpp
+++ b/engines/hdb/detection.cpp
@@ -254,7 +254,7 @@ SaveStateList HDBMetaEngine::listSaves(const char *target) const {
 				if (slotNum < 8)
 					desc.setDescription(Common::String::format("Auto: %s", mapName));
 				else
-					desc.setDescription(Common::convertToU32String(mapName));
+					desc.setDescription(mapName);
 
 				saveList.push_back(desc);
 			}
@@ -284,7 +284,7 @@ SaveStateDescriptor HDBMetaEngine::querySaveMetaInfos(const char *target, int sl
 
 		desc.setSaveSlot(slot);
 		desc.setPlayTime(timeSeconds * 1000);
-		desc.setDescription(Common::convertToU32String(mapName));
+		desc.setDescription(mapName);
 
 		return desc;
 	}
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 82350ab1d5..3c053d9627 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -435,7 +435,7 @@ bool HugoEngine::loadHugoDat() {
 	if (!in.isOpen()) {
 		Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
 		GUIErrorMessage(errorMessage);
-		warning("%s", errorMessage.encode().c_str());
+		warning("Unable to locate the '%s' engine data file.", filename.c_str());
 		return false;
 	}
 
@@ -453,9 +453,9 @@ bool HugoEngine::loadHugoDat() {
 	int minVer = in.readByte();
 
 	if ((majVer != HUGO_DAT_VER_MAJ) || (minVer != HUGO_DAT_VER_MIN)) {
-		Common::String errorMessage = Common::String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.").encode().c_str(),
-			filename.c_str(),HUGO_DAT_VER_MAJ, HUGO_DAT_VER_MIN, majVer, minVer);
+		Common::U32String errorMessage = Common::U32String::format(
+			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
+			filename.c_str(), HUGO_DAT_VER_MAJ, HUGO_DAT_VER_MIN, majVer, minVer);
 		GUIErrorMessage(errorMessage);
 		return false;
 	}
diff --git a/engines/illusions/menusystem.cpp b/engines/illusions/menusystem.cpp
index c00dace72d..1ac2acdccc 100644
--- a/engines/illusions/menusystem.cpp
+++ b/engines/illusions/menusystem.cpp
@@ -697,7 +697,7 @@ MenuActionSaveGame::MenuActionSaveGame(BaseMenuSystem *menuSystem, uint choiceIn
 
 void MenuActionSaveGame::execute() {
 	GUI::SaveLoadChooser *dialog;
-	Common::U32String desc;
+	Common::String desc;
 	int slot;
 
 	dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index 0703edb64c..f2913b229e 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -122,7 +122,7 @@ void LabEngine::handleTrialWarning() {
 			// Wyrmkeep trial version
 			_extraGameFeatures = GF_WINDOWS_TRIAL;
 
-			GUI::MessageDialog trialMessage(Common::convertToU32String("This is a trial Windows version of the game. To play the full version, you will need to use the original interpreter and purchase a key from Wyrmkeep"));
+			GUI::MessageDialog trialMessage(_("This is a trial Windows version of the game. To play the full version, you will need to use the original interpreter and purchase a key from Wyrmkeep"));
 			trialMessage.runModal();
 		}
 		else {
diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp
index 3860bd6448..c703802174 100644
--- a/engines/lab/processroom.cpp
+++ b/engines/lab/processroom.cpp
@@ -327,7 +327,7 @@ void LabEngine::doActions(const ActionList &actionList) {
 				// This is a Wyrmkeep Windows trial version, thus stop at this
 				// point, since we can't check for game payment status
 				_graphics->readPict(getPictName(true));
-				GUI::MessageDialog trialMessage(Common::convertToU32String("This is the end of the trial version. You can play the full game using the original interpreter from Wyrmkeep"));
+				GUI::MessageDialog trialMessage(_("This is the end of the trial version. You can play the full game using the original interpreter from Wyrmkeep"));
 				trialMessage.runModal();
 				break;
 			}
diff --git a/engines/lab/speciallocks.cpp b/engines/lab/speciallocks.cpp
index ef7f588bbd..361e069843 100644
--- a/engines/lab/speciallocks.cpp
+++ b/engines/lab/speciallocks.cpp
@@ -146,7 +146,7 @@ void SpecialLocks::changeTile(uint16 col, uint16 row) {
 
 	if (scrolltype != -1) {
 		if (_vm->getFeatures() & GF_WINDOWS_TRIAL) {
-			GUI::MessageDialog trialMessage(Common::convertToU32String("This puzzle is not available in the trial version of the game"));
+			GUI::MessageDialog trialMessage(_("This puzzle is not available in the trial version of the game"));
 			trialMessage.runModal();
 			return;
 		}
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index 8ce1be5bf6..ad5d0e4d96 100644
--- a/engines/lure/surface.cpp
+++ b/engines/lure/surface.cpp
@@ -491,7 +491,7 @@ Surface *Surface::newDialog(uint16 width, uint8 numLines, const char **lines, bo
 		Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 		if (ttsMan != nullptr) {
 			ttsMan->stop();
-			ttsMan->say(Common::convertToU32String(text.c_str()));
+			ttsMan->say(text.c_str());
 		}
 	}
 #endif
diff --git a/engines/mads/dialogs.cpp b/engines/mads/dialogs.cpp
index 5b99d906b2..cadb7ae0f0 100644
--- a/engines/mads/dialogs.cpp
+++ b/engines/mads/dialogs.cpp
@@ -393,7 +393,7 @@ void TextDialog::draw() {
 		Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 		if (ttsMan != nullptr) {
 			ttsMan->stop();
-			ttsMan->say(Common::convertToU32String(text.c_str()));
+			ttsMan->say(text.c_str());
 		}
 	}
 #endif
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp
index 7244a4f47f..e18d276d79 100644
--- a/engines/mohawk/dialogs.cpp
+++ b/engines/mohawk/dialogs.cpp
@@ -142,7 +142,7 @@ MystOptionsWidget::MystOptionsWidget(GuiObject *boss, const Common::String &name
 
 			const MystLanguage *languages = MohawkEngine_Myst::listLanguages();
 			while (languages->language != Common::UNK_LANG) {
-				_languagePopUp->appendEntry(Common::convertToU32String(Common::getLanguageDescription(languages->language)), languages->language);
+				_languagePopUp->appendEntry(Common::getLanguageDescription(languages->language), languages->language);
 				languages++;
 			}
 		}
@@ -344,7 +344,7 @@ RivenOptionsWidget::RivenOptionsWidget(GuiObject *boss, const Common::String &na
 
 		const RivenLanguage *languages = MohawkEngine_Riven::listLanguages();
 		while (languages->language != Common::UNK_LANG) {
-			_languagePopUp->appendEntry(Common::convertToU32String(Common::getLanguageDescription(languages->language)), languages->language);
+			_languagePopUp->appendEntry(Common::getLanguageDescription(languages->language), languages->language);
 			languages++;
 		}
 	}
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 28db0c4f82..1b426518d1 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -560,7 +560,7 @@ Common::KeymapArray MohawkEngine_Myst::initKeymaps(const char *target) {
 	bool is25th = checkGameGUIOption(GAMEOPTION_25TH, guiOptions);
 	bool isDemo = checkGameGUIOption(GAMEOPTION_DEMO, guiOptions);
 
-	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "myst", Common::convertToU32String("Myst"));
+	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "myst", "Myst");
 
 	Action *act;
 
diff --git a/engines/mohawk/myst_stacks/preview.cpp b/engines/mohawk/myst_stacks/preview.cpp
index 5152674604..a4f70c3484 100644
--- a/engines/mohawk/myst_stacks/preview.cpp
+++ b/engines/mohawk/myst_stacks/preview.cpp
@@ -29,6 +29,7 @@
 #include "mohawk/myst_stacks/preview.h"
 
 #include "common/system.h"
+#include "common/translation.h"
 #include "gui/message.h"
 
 namespace Mohawk {
@@ -86,7 +87,7 @@ void Preview::o_fadeFromBlack(uint16 var, const ArgumentsArray &args) {
 
 void Preview::o_stayHere(uint16 var, const ArgumentsArray &args) {
 	// Nuh-uh! No leaving the library in the demo!
-	GUI::MessageDialog dialog(Common::convertToU32String("You can't leave the library in the demo."));
+	GUI::MessageDialog dialog(_("You can't leave the library in the demo."));
 	dialog.runModal();
 }
 
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 49eda7b88e..149bacd8bd 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -156,7 +156,8 @@ Common::Error MohawkEngine_Riven::run() {
 		Common::U32String message = _("You're missing a Riven executable. The Windows executable is 'riven.exe' or 'rivendmo.exe'. ");
 		message += _("Using the 'arcriven.z' installer file also works. In addition, you can use the Mac 'Riven' executable.");
 		GUIErrorMessage(message);
-		warning("%s", message.encode().c_str());
+		warning("You're missing a Riven executable. The Windows executable is 'riven.exe' or 'rivendmo.exe'. \
+			Using the 'arcriven.z' installer file also works. In addition, you can use the Mac 'Riven' executable.");
 		return Common::kNoGameDataFoundError;
 	}
 
@@ -167,7 +168,7 @@ Common::Error MohawkEngine_Riven::run() {
 	if (!_extrasFile->openFile("extras.mhk")) {
 		Common::U32String message = _("You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also works.");
 		GUIErrorMessage(message);
-		warning("%s", message.encode().c_str());
+		warning("You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also works.");
 		return Common::kNoGameDataFoundError;
 	}
 
@@ -498,8 +499,8 @@ bool MohawkEngine_Riven::checkDatafiles() {
 		return true;
 	}
 
-	Common::U32String message = _("You are missing the following required Riven data files:\n") + Common::convertToU32String(missingFiles.c_str());
-	warning("%s", message.encode().c_str());
+	Common::U32String message = _("You are missing the following required Riven data files:\n") + Common::U32String(missingFiles);
+	warning("You are missing the following required Riven data files:\n%s", missingFiles.c_str());
 	GUIErrorMessage(message);
 
 	return false;
@@ -829,7 +830,7 @@ Common::KeymapArray MohawkEngine_Riven::initKeymaps(const char *target) {
 	bool is25th = checkGameGUIOption(GAMEOPTION_25TH, guiOptions);
 	bool isDemo = checkGameGUIOption(GAMEOPTION_DEMO, guiOptions);
 
-	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "riven", Common::convertToU32String("Riven"));
+	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "riven", "Riven");
 
 	Action *act;
 
diff --git a/engines/mutationofjb/util.cpp b/engines/mutationofjb/util.cpp
index cab8eea6d7..e4c855ce3e 100644
--- a/engines/mutationofjb/util.cpp
+++ b/engines/mutationofjb/util.cpp
@@ -32,7 +32,7 @@ namespace MutationOfJB {
 void reportFileMissingError(const char *fileName) {
 	Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file"), fileName);
 	GUIErrorMessage(errorMessage);
-	warning("%s", errorMessage.encode().c_str());
+	warning("Unable to locate the '%s' engine data file", fileName);
 }
 
 Common::String toUpperCP895(const Common::String &str) {
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 5fa1e0652e..4affc6f244 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -2476,7 +2476,7 @@ uint PegasusEngine::getNeighborhoodCD(const NeighborhoodID neighborhood) const {
 Common::KeymapArray PegasusEngine::initKeymaps() {
 	using namespace Common;
 
-	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "pegasus", Common::convertToU32String("Pegasus Prime"));
+	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "pegasus", "Pegasus Prime");
 
 	Action *act;
 
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index f83c5a983c..4f6ad22b44 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -25,6 +25,7 @@
 #include "common/config-manager.h"
 #include "common/system.h"
 #include "common/events.h"
+#include "common/translation.h"
 
 #include "audio/mixer.h"
 
@@ -243,7 +244,7 @@ Common::Error SagaEngine::run() {
 
 	// Detect game and open resource files
 	if (!initGame()) {
-		GUIErrorMessage(Common::convertToU32String("Error loading game resources."));
+		GUIErrorMessage(_("Error loading game resources."));
 		return Common::kUnknownError;
 	}
 
diff --git a/engines/savestate.h b/engines/savestate.h
index ae8e0649a2..62ded23ba2 100644
--- a/engines/savestate.h
+++ b/engines/savestate.h
@@ -69,6 +69,7 @@ public:
 	 * @param desc A human readable description of the save state.
 	 */
 	void setDescription(const Common::U32String &desc) { _description = desc; }
+	void setDescription(const Common::String &desc) { _description = Common::U32String(desc); }
 
 	/**
 	 * @return A human readable description of the save state.
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 7166933e12..b47191b7c0 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -1017,7 +1017,7 @@ SaveStateDescriptor SciMetaEngine::querySaveMetaInfos(const char *target, int sl
 			// invalid
 			delete in;
 
-			descriptor.setDescription(Common::convertToU32String("*Invalid*"));
+			descriptor.setDescription("*Invalid*");
 			return descriptor;
 		}
 
@@ -1028,7 +1028,7 @@ SaveStateDescriptor SciMetaEngine::querySaveMetaInfos(const char *target, int sl
 			// invalid
 			delete in;
 
-			descriptor.setDescription(Common::convertToU32String("*Invalid*"));
+			descriptor.setDescription("*Invalid*");
 			return descriptor;
 		}
 		descriptor.setThumbnail(thumbnail);
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 8ea18be757..815d9416fd 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -23,6 +23,7 @@
 #include "common/config-manager.h"
 #include "common/savefile.h"
 #include "common/system.h"
+#include "common/translation.h"
 
 #include "sci/sci.h"
 #include "sci/debug.h"
@@ -870,7 +871,7 @@ reg_t kWinDLL(EngineState *s, int argc, reg_t *argv) {
 	switch (operation) {
 	case 0:	// load DLL
 		if (dllName == "PENGIN16.DLL")
-			showScummVMDialog(Common::convertToU32String("The Poker logic is hardcoded in an external DLL, and is not implemented yet. There exists some dummy logic for now, where opponent actions are chosen randomly"));
+			showScummVMDialog(_("The Poker logic is hardcoded in an external DLL, and is not implemented yet. There exists some dummy logic for now, where opponent actions are chosen randomly"));
 
 		// This is originally a call to LoadLibrary() and to the Watcom function GetIndirectFunctionHandle
 		return make_reg(0, 1000);	// fake ID for loaded DLL, normally returned from Windows LoadLibrary()
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index c2637b57ea..49d9da316d 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -160,7 +160,7 @@ void SciMusic::init() {
 				Common::U32String message = _(
 					"The selected audio driver requires the following file(s):\n\n"
 				);
-				message += Common::convertToU32String(missingFiles);
+				message += Common::U32String(missingFiles);
 				message += _("\n\n"
 					"Some audio drivers (at least for some games) were made\n"
 					"available by Sierra as aftermarket patches and thus might not\n"
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index a0ac0aa8ad..2d16afb2e6 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -609,7 +609,7 @@ void SubtitleSettingsDialog::cycleValue() {
 		_value = 0;
 
 	if (_value == 1 && g_system->getOverlayWidth() <= 320)
-		setInfoText(Common::convertToU32String(_sc("Speech & Subs", "lowres")));
+		setInfoText(Common::U32String(_sc("Speech & Subs", "lowres")));
 	else
 		setInfoText(_(subtitleDesc[_value]));
 
@@ -617,7 +617,7 @@ void SubtitleSettingsDialog::cycleValue() {
 }
 
 Indy3IQPointsDialog::Indy3IQPointsDialog(ScummEngine *scumm, char* text)
-	: InfoDialog(scumm, U32String(text)) {
+	: InfoDialog(scumm, Common::U32String(text)) {
 }
 
 void Indy3IQPointsDialog::handleKeyDown(Common::KeyState state) {
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index a894be6d4d..eebd36c78c 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -232,7 +232,7 @@ void ScummEngine::askForDisk(const char *filename, int disknum) {
 #endif
 	} else {
 		sprintf(buf, "Cannot find file: '%s'", filename);
-		InfoDialog dialog(this, Common::convertToU32String(buf));
+		InfoDialog dialog(this, Common::U32String(buf));
 		runDialog(dialog);
 		error("Cannot find file: '%s'", filename);
 	}
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index a816dbc3fb..aa2b041a25 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2476,7 +2476,7 @@ void ScummEngine::scummLoop_handleSaveLoad() {
 			char buf[256];
 			snprintf(buf, sizeof(buf), _("Successfully saved game in file:\n\n%s").encode().c_str(), filename.c_str());
 
-			GUI::TimedMessageDialog dialog(Common::convertToU32String(buf), 1500);
+			GUI::TimedMessageDialog dialog(Common::U32String(buf), 1500);
 			runDialog(dialog);
 		}
 		if (success && _saveLoadFlag != 1)
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 3ef6b9b766..8a2ef97f4b 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -115,7 +115,7 @@ void ScummEngine::showMessageDialog(const byte *msg) {
 	if (_string[3].color == 0)
 		_string[3].color = 4;
 
-	InfoDialog dialog(this, Common::convertToU32String((char *)buf));
+	InfoDialog dialog(this, Common::U32String((char *)buf));
 	VAR(VAR_KEYPRESS) = runDialog(dialog);
 }
 
diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp
index 0a01dc0192..f819acf7f1 100644
--- a/engines/sherlock/scalpel/scalpel_user_interface.cpp
+++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp
@@ -2069,7 +2069,7 @@ void ScalpelUserInterface::printObjectDesc(const Common::String &str, bool first
 		Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 		if (ttsMan != nullptr) {
 			ttsMan->stop();
-			ttsMan->say(Common::convertToU32String(str.c_str()));
+			ttsMan->say(str.c_str());
 		}
 	}
 #endif
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index 7c823b97a1..f92b7c142a 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -362,7 +362,7 @@ void Talk::talkTo(const Common::String filename) {
 				Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 				if (ttsMan != nullptr) {
 					ttsMan->stop();
-					ttsMan->say(Common::convertToU32String(_statements[select]._reply.c_str()));
+					ttsMan->say(_statements[select]._reply.c_str());
 				}
 			}
 #endif
diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp
index 802d03025c..7a4b528cd2 100644
--- a/engines/sky/compact.cpp
+++ b/engines/sky/compact.cpp
@@ -130,7 +130,7 @@ SkyCompact::SkyCompact() {
 	if (!_cptFile->open(filename.c_str())) {
                 Common::U32String msg = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
                 GUIErrorMessage(msg);
-                error("%s", msg.encode().c_str());
+                error("Unable to locate the '%s' engine data file.", filename.c_str());
 	}
 
 	uint16 fileVersion = _cptFile->readUint16LE();
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index 0984ad0b74..654ca2c4a8 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -209,7 +209,7 @@ Common::KeymapArray SkyMetaEngine::initKeymaps(const char *target) const {
 	using namespace Common;
 	using namespace Sky;
 
-	Keymap *mainKeymap = new Keymap(Keymap::kKeymapTypeGame, "sky-main", Common::convertToU32String("Beneath a Steel Sky"));
+	Keymap *mainKeymap = new Keymap(Keymap::kKeymapTypeGame, "sky-main", "Beneath a Steel Sky");
 
 	Action *act;
 
@@ -237,7 +237,7 @@ Common::KeymapArray SkyMetaEngine::initKeymaps(const char *target) const {
 	act->addDefaultInputMapping("JOY_Y");
 	mainKeymap->addAction(act);
 
-	Keymap *shortcutsKeymap = new Keymap(Keymap::kKeymapTypeGame, SkyEngine::shortcutsKeymapId, Common::convertToU32String("Beneath a Steel Sky - Shortcuts"));
+	Keymap *shortcutsKeymap = new Keymap(Keymap::kKeymapTypeGame, SkyEngine::shortcutsKeymapId, "Beneath a Steel Sky - Shortcuts");
 
 	act = new Action(kStandardActionOpenMainMenu, _("Open control panel"));
 	act->setCustomEngineActionEvent(kSkyActionOpenControlPanel);
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index 369a9526c2..52e4a67911 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -824,8 +824,8 @@ bool SupernovaEngine::saveGame(int slot, const Common::String &description) {
 
 void SupernovaEngine::errorTempSave(bool saving) {
 	GUIErrorMessage(saving
-		? Common::convertToU32String("Failed to save temporary game state. Make sure your save game directory is set in ScummVM and that you can write to it.")
-		: Common::convertToU32String("Failed to load temporary game state."));
+		? _("Failed to save temporary game state. Make sure your save game directory is set in ScummVM and that you can write to it.")
+		: _("Failed to load temporary game state."));
 	error("Unrecoverable error");
 }
 
diff --git a/engines/sword2/protocol.cpp b/engines/sword2/protocol.cpp
index b1d57cb079..caa1a21798 100644
--- a/engines/sword2/protocol.cpp
+++ b/engines/sword2/protocol.cpp
@@ -305,7 +305,7 @@ byte *Sword2Engine::fetchPsxBackground(uint32 location) {
 	byte *buffer;
 
 	if (!file.open("screens.clu")) {
-		GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot open screens.clu"));
+		GUIErrorMessage("Broken Sword II: Cannot open screens.clu");
 		return NULL;
 	}
 
@@ -373,7 +373,7 @@ byte *Sword2Engine::fetchPsxParallax(uint32 location, uint8 level) {
 		return NULL;
 
 	if (!file.open("screens.clu")) {
-		GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot open screens.clu"));
+		GUIErrorMessage("Broken Sword II: Cannot open screens.clu");
 		return NULL;
 	}
 
diff --git a/engines/sword2/resman.cpp b/engines/sword2/resman.cpp
index dd89fe0fdd..44027fd281 100644
--- a/engines/sword2/resman.cpp
+++ b/engines/sword2/resman.cpp
@@ -104,7 +104,7 @@ bool ResourceManager::init() {
 	Common::File file;
 
 	if (!file.open("resource.inf")) {
-		GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot open resource.inf"));
+		GUIErrorMessage("Broken Sword II: Cannot open resource.inf");
 		return false;
 	}
 
@@ -125,7 +125,7 @@ bool ResourceManager::init() {
 		_resFiles[_totalClusters].numEntries = -1;
 		_resFiles[_totalClusters].entryTab = NULL;
 		if (++_totalClusters >= MAX_res_files) {
-			GUIErrorMessage(Common::convertToU32String("Broken Sword II: Too many entries in resource.inf"));
+			GUIErrorMessage("Broken Sword II: Too many entries in resource.inf");
 			return false;
 		}
 	}
@@ -134,7 +134,7 @@ bool ResourceManager::init() {
 
 	// Now load in the binary id to res conversion table
 	if (!file.open("resource.tab")) {
-		GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot open resource.tab"));
+		GUIErrorMessage("Broken Sword II: Cannot open resource.tab");
 		return false;
 	}
 
@@ -151,7 +151,7 @@ bool ResourceManager::init() {
 
 	if (file.eos() || file.err()) {
 		file.close();
-		GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot read resource.tab"));
+		GUIErrorMessage("Broken Sword II: Cannot read resource.tab");
 		return false;
 	}
 
@@ -161,7 +161,7 @@ bool ResourceManager::init() {
 	// version, which has all files on one disc.
 
 	if (!file.open("cd.inf") && !Sword2Engine::isPsx()) {
-		GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot open cd.inf"));
+		GUIErrorMessage("Broken Sword II: Cannot open cd.inf");
 		return false;
 	}
 
@@ -179,7 +179,7 @@ bool ResourceManager::init() {
 			if (file.eos() || file.err()) {
 				delete[] cdInf;
 				file.close();
-				GUIErrorMessage(Common::convertToU32String("Broken Sword II: Cannot read cd.inf"));
+				GUIErrorMessage("Broken Sword II: Cannot read cd.inf");
 				return false;
 			}
 
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index cac15f5a86..5742c0d9db 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -95,7 +95,7 @@ bool Resources::loadArchives(const ADGameDescription *gd) {
 	if (!dat_file->open(filename.c_str())) {
 		delete dat_file;
 		Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
-		warning("%s", errorMessage.encode().c_str());
+		warning("Unable to locate the '%s' engine data file.", filename.c_str());
 		GUIErrorMessage(errorMessage);
 		return false;
 	}
diff --git a/engines/testbed/config.cpp b/engines/testbed/config.cpp
index c8313a6d6e..5ecab08b7c 100644
--- a/engines/testbed/config.cpp
+++ b/engines/testbed/config.cpp
@@ -34,8 +34,8 @@ TestbedOptionsDialog::TestbedOptionsDialog(Common::Array<Testsuite *> &tsList, T
 		GUI::Dialog("TestbedOptions"),
 		_testbedConfMan(tsConfMan) {
 
-	new GUI::StaticTextWidget(this, "TestbedOptions.Headline", Common::convertToU32String("Select Testsuites to Execute"));
-	new GUI::StaticTextWidget(this, "TestbedOptions.Info", Common::convertToU32String("Use Doubleclick to select/deselect"));
+	new GUI::StaticTextWidget(this, "TestbedOptions.Headline", Common::U32String("Select Testsuites to Execute"));
+	new GUI::StaticTextWidget(this, "TestbedOptions.Info", Common::U32String("Use Doubleclick to select/deselect"));
 
 	// Construct a String Array
 	Common::Array<Testsuite *>::const_iterator iter;
@@ -63,12 +63,12 @@ TestbedOptionsDialog::TestbedOptionsDialog(Common::Array<Testsuite *> &tsList, T
 	_testListDisplay->setEditable(false);
 
 	if (selected > (tsList.size() - selected)) {
-		_selectButton = new GUI::ButtonWidget(this, "TestbedOptions.SelectAll", Common::convertToU32String("Deselect All"), Common::U32String(""), kTestbedDeselectAll, 0);
+		_selectButton = new GUI::ButtonWidget(this, "TestbedOptions.SelectAll", Common::U32String("Deselect All"), Common::U32String(""), kTestbedDeselectAll, 0);
 	} else {
-		_selectButton = new GUI::ButtonWidget(this, "TestbedOptions.SelectAll", Common::convertToU32String("Select All"), Common::U32String(""), kTestbedSelectAll, 0);
+		_selectButton = new GUI::ButtonWidget(this, "TestbedOptions.SelectAll", Common::U32String("Select All"), Common::U32String(""), kTestbedSelectAll, 0);
 	}
-	new GUI::ButtonWidget(this, "TestbedOptions.RunTests", Common::convertToU32String("Run tests"), Common::U32String(""), GUI::kCloseCmd);
-	new GUI::ButtonWidget(this, "TestbedOptions.Quit", Common::convertToU32String("Exit Testbed"), Common::U32String(""), kTestbedQuitCmd);
+	new GUI::ButtonWidget(this, "TestbedOptions.RunTests", Common::U32String("Run tests"), Common::U32String(""), GUI::kCloseCmd);
+	new GUI::ButtonWidget(this, "TestbedOptions.Quit", Common::U32String("Exit Testbed"), Common::U32String(""), kTestbedQuitCmd);
 }
 
 TestbedOptionsDialog::~TestbedOptionsDialog() {}
@@ -102,7 +102,7 @@ void TestbedOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd,
 		break;
 
 	case kTestbedDeselectAll:
-		_selectButton->setLabel(Common::convertToU32String("Select All"));
+		_selectButton->setLabel("Select All");
 		_selectButton->setCmd(kTestbedSelectAll);
 		for (uint i = 0; i < _testSuiteArray.size(); i++) {
 			_testListDisplay->markAsDeselected(i);
@@ -114,7 +114,7 @@ void TestbedOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd,
 		break;
 
 	case kTestbedSelectAll:
-		_selectButton->setLabel(Common::convertToU32String("Deselect All"));
+		_selectButton->setLabel("Deselect All");
 		_selectButton->setCmd(kTestbedDeselectAll);
 		for (uint i = 0; i < _testSuiteArray.size(); i++) {
 			_testListDisplay->markAsSelected(i);
diff --git a/engines/testbed/config.h b/engines/testbed/config.h
index 02149e6d09..5a397a3144 100644
--- a/engines/testbed/config.h
+++ b/engines/testbed/config.h
@@ -73,7 +73,7 @@ public:
 
 	void markAsSelected(int i) {
 		if (!_list[i].encode().contains("selected")) {
-			_list[i] += Common::convertToU32String(" (selected)");
+			_list[i] += Common::U32String(" (selected)");
 		}
 		_listColors[i] = GUI::ThemeEngine::kFontColorNormal;
 		draw();
diff --git a/engines/testbed/speech.cpp b/engines/testbed/speech.cpp
index 034e327630..754f7cc263 100644
--- a/engines/testbed/speech.cpp
+++ b/engines/testbed/speech.cpp
@@ -59,7 +59,7 @@ TestExitStatus Speechtests::testMale() {
 		return kTestFailed;
 	}
 	ttsMan->setVoice(maleVoices[0]);
-	ttsMan->say(Common::convertToU32String("Testing text to speech with male voice."));
+	ttsMan->say("Testing text to speech with male voice.");
 	if (!ttsMan->isSpeaking()) {
 		Testsuite::logDetailedPrintf("Male TTS failed\n");
 		return kTestFailed;
@@ -96,7 +96,7 @@ TestExitStatus Speechtests::testFemale() {
 		return kTestFailed;
 	}
 	ttsMan->setVoice(femaleVoices[0]);
-	ttsMan->say(Common::convertToU32String("Testing text to speech with female voice."));
+	ttsMan->say("Testing text to speech with female voice.");
 	if (!ttsMan->isSpeaking()) {
 		Testsuite::logDetailedPrintf("Female TTS failed\n");
 		return kTestFailed;
@@ -128,7 +128,7 @@ TestExitStatus Speechtests::testStop() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say(Common::convertToU32String("Testing text to speech, the speech should stop after approximately a second after it started, so it shouldn't have the time to read this."));
+	ttsMan->say("Testing text to speech, the speech should stop after approximately a second after it started, so it shouldn't have the time to read this.");
 	g_system->delayMillis(1000);
 	ttsMan->stop();
 	// It is allright if the voice isn't available right away, but a second should be
@@ -164,11 +164,11 @@ TestExitStatus Speechtests::testStopAndSpeak() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say(Common::convertToU32String("Testing text to speech, the speech should stop after approximately a second after it started, so it shouldn't have the time to read this."));
+	ttsMan->say("Testing text to speech, the speech should stop after approximately a second after it started, so it shouldn't have the time to read this.");
 	g_system->delayMillis(1000);
 	ttsMan->stop();
-	ttsMan->say(Common::convertToU32String("Now starting the second sentence."), Common::TextToSpeechManager::QUEUE);
-	ttsMan->say(Common::convertToU32String("You should hear that one in totality."), Common::TextToSpeechManager::QUEUE);
+	ttsMan->say("Now starting the second sentence.", Common::TextToSpeechManager::QUEUE);
+	ttsMan->say("You should hear that one in totality.", Common::TextToSpeechManager::QUEUE);
 	if (!ttsMan->isSpeaking()) {
 		Testsuite::logDetailedPrintf("Male TTS failed\n");
 		return kTestFailed;
@@ -201,14 +201,14 @@ TestExitStatus Speechtests::testPauseResume() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say(Common::convertToU32String("Testing text to speech, the speech should pause after a second"));
+	ttsMan->say("Testing text to speech, the speech should pause after a second");
 	g_system->delayMillis(1000);
 	ttsMan->pause();
 	if (!ttsMan->isPaused()) {
 		Testsuite::logDetailedPrintf("TTS pause failed\n");
 		return kTestFailed;
 	}
-	ttsMan->say(Common::convertToU32String("and then resume again"), Common::TextToSpeechManager::QUEUE);
+	ttsMan->say("and then resume again", Common::TextToSpeechManager::QUEUE);
 	g_system->delayMillis(3000);
 	if (!ttsMan->isPaused()) {
 		Testsuite::logDetailedPrintf("TTS pause failed\n");
@@ -247,10 +247,10 @@ TestExitStatus Speechtests::testRate() {
 	}
 
 	ttsMan->setRate(-100);
-	ttsMan->say(Common::convertToU32String("Text to speech slow rate."));
+	ttsMan->say("Text to speech slow rate.");
 	waitForSpeechEnd(ttsMan);
 	ttsMan->setRate(100);
-	ttsMan->say(Common::convertToU32String("Text to speech fast rate."));
+	ttsMan->say("Text to speech fast rate.");
 	waitForSpeechEnd(ttsMan);
 
 	Common::String prompt = "Did you hear a voice saying: \"Text to speech slow rate.\" slowly and then \"Text to speech fast rate.\" fast?";
@@ -280,10 +280,10 @@ TestExitStatus Speechtests::testVolume() {
 	}
 
 	ttsMan->setVolume(20);
-	ttsMan->say(Common::convertToU32String("Text to speech low volume."));
+	ttsMan->say("Text to speech low volume.");
 	waitForSpeechEnd(ttsMan);
 	ttsMan->setVolume(100);
-	ttsMan->say(Common::convertToU32String("Text to speech max volume."));
+	ttsMan->say("Text to speech max volume.");
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice saying: \"Text to speech low volume.\" quietly and then \"Text to speech max volume.\" at a higher volume?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
@@ -312,10 +312,10 @@ TestExitStatus Speechtests::testPitch() {
 	}
 
 	ttsMan->setPitch(100);
-	ttsMan->say(Common::convertToU32String("Text to speech high pitch."));
+	ttsMan->say("Text to speech high pitch.");
 	waitForSpeechEnd(ttsMan);
 	ttsMan->setPitch(-100);
-	ttsMan->say(Common::convertToU32String("Text to speech low pitch."));
+	ttsMan->say("Text to speech low pitch.");
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a high pitched voice saying: \"Text to speech high pitch.\" and then a low pitched voice: \"Text to speech low pitch.\" ?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
@@ -343,7 +343,7 @@ TestExitStatus Speechtests::testStateStacking() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say(Common::convertToU32String("Voice number 1 is speaking"));
+	ttsMan->say("Voice number 1 is speaking");
 	waitForSpeechEnd(ttsMan);
 	ttsMan->pushState();
 	Common::Array<int> femaleVoices = ttsMan->getVoiceIndicesByGender(Common::TTSVoice::FEMALE);
@@ -355,20 +355,20 @@ TestExitStatus Speechtests::testStateStacking() {
 	ttsMan->setVolume(80);
 	ttsMan->setPitch(40);
 	ttsMan->setRate(-30);
-	ttsMan->say(Common::convertToU32String("Voice number 2 is speaking"));
+	ttsMan->say("Voice number 2 is speaking");
 	waitForSpeechEnd(ttsMan);
 	ttsMan->pushState();
 	ttsMan->setVoice(2 % allVoices.size());
 	ttsMan->setVolume(90);
 	ttsMan->setPitch(-80);
 	ttsMan->setRate(-50);
-	ttsMan->say(Common::convertToU32String("Voice number 3 is speaking"));
+	ttsMan->say("Voice number 3 is speaking");
 	waitForSpeechEnd(ttsMan);
 	ttsMan->popState();
-	ttsMan->say(Common::convertToU32String("Voice number 2 is speaking"));
+	ttsMan->say("Voice number 2 is speaking");
 	waitForSpeechEnd(ttsMan);
 	ttsMan->popState();
-	ttsMan->say(Common::convertToU32String("Voice number 1 is speaking"));
+	ttsMan->say("Voice number 1 is speaking");
 	waitForSpeechEnd(ttsMan);
 
 	Common::String prompt = "Did you hear three different voices speaking in this order: 1, 2, 3, 2, 1 and each time the same voice spoke, it sounded the same?";
@@ -397,8 +397,8 @@ TestExitStatus Speechtests::testQueueing() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say(Common::convertToU32String("This is first speech."));
-	ttsMan->say(Common::convertToU32String("This is second speech."), Common::TextToSpeechManager::QUEUE);
+	ttsMan->say("This is first speech.");
+	ttsMan->say("This is second speech.", Common::TextToSpeechManager::QUEUE);
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice saying: \"This is first speech. This is second speech\" ?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
@@ -426,9 +426,9 @@ TestExitStatus Speechtests::testInterrupting() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say(Common::convertToU32String("A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z"));
+	ttsMan->say("A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z");
 	g_system->delayMillis(1000);
-	ttsMan->say(Common::convertToU32String("Speech interrupted"), Common::TextToSpeechManager::INTERRUPT);
+	ttsMan->say("Speech interrupted", Common::TextToSpeechManager::INTERRUPT);
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice saying the engilsh alphabet, but it got interrupted and said: \"Speech interrupted\" instead?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
@@ -456,8 +456,8 @@ TestExitStatus Speechtests::testDroping() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say(Common::convertToU32String("Today is a really nice weather, perfect day to use ScummVM, don't you think?"));
-	ttsMan->say(Common::convertToU32String("Speech interrupted, fail"), Common::TextToSpeechManager::DROP);
+	ttsMan->say("Today is a really nice weather, perfect day to use ScummVM, don't you think?");
+	ttsMan->say("Speech interrupted, fail", Common::TextToSpeechManager::DROP);
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice say: \"Today is a really nice weather, perfect day to use ScummVM, don't you think?\" and nothing else?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
@@ -485,16 +485,16 @@ TestExitStatus Speechtests::testInterruptNoRepeat() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say(Common::convertToU32String("This is the first sentence, this should get interrupted"));
-	ttsMan->say(Common::convertToU32String("Failure"), Common::TextToSpeechManager::QUEUE);
+	ttsMan->say("This is the first sentence, this should get interrupted");
+	ttsMan->say("Failure", Common::TextToSpeechManager::QUEUE);
 	g_system->delayMillis(1000);
-	ttsMan->say(Common::convertToU32String("This is the second sentence, it should play only once"), Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
-	ttsMan->say(Common::convertToU32String("Failure"), Common::TextToSpeechManager::QUEUE);
+	ttsMan->say("This is the second sentence, it should play only once", Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
+	ttsMan->say("Failure", Common::TextToSpeechManager::QUEUE);
 	g_system->delayMillis(1000);
-	ttsMan->say(Common::convertToU32String("This is the second sentence, it should play only once"), Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
-	ttsMan->say(Common::convertToU32String("Failure"), Common::TextToSpeechManager::QUEUE);
+	ttsMan->say("This is the second sentence, it should play only once", Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
+	ttsMan->say("Failure", Common::TextToSpeechManager::QUEUE);
 	g_system->delayMillis(1000);
-	ttsMan->say(Common::convertToU32String("This is the second sentence, it should play only once"), Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
+	ttsMan->say("This is the second sentence, it should play only once", Common::TextToSpeechManager::INTERRUPT_NO_REPEAT);
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice say: \"This is the first sentence, this should get interrupted\", but it got interrupted and \"This is the second sentence, it should play only once.\" got said instead?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
@@ -522,14 +522,14 @@ TestExitStatus Speechtests::testQueueNoRepeat() {
 		return kTestSkipped;
 	}
 
-	ttsMan->say(Common::convertToU32String("This is the first sentence."));
-	ttsMan->say(Common::convertToU32String("This is the first sentence."), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
+	ttsMan->say("This is the first sentence.");
+	ttsMan->say("This is the first sentence.", Common::TextToSpeechManager::QUEUE_NO_REPEAT);
 	g_system->delayMillis(1000);
-	ttsMan->say(Common::convertToU32String("This is the first sentence."), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
-	ttsMan->say(Common::convertToU32String("This is the second sentence."), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
-	ttsMan->say(Common::convertToU32String("This is the second sentence."), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
+	ttsMan->say("This is the first sentence.", Common::TextToSpeechManager::QUEUE_NO_REPEAT);
+	ttsMan->say("This is the second sentence.", Common::TextToSpeechManager::QUEUE_NO_REPEAT);
+	ttsMan->say("This is the second sentence.", Common::TextToSpeechManager::QUEUE_NO_REPEAT);
 	g_system->delayMillis(1000);
-	ttsMan->say(Common::convertToU32String("This is the second sentence."), Common::TextToSpeechManager::QUEUE_NO_REPEAT);
+	ttsMan->say("This is the second sentence.", Common::TextToSpeechManager::QUEUE_NO_REPEAT);
 	waitForSpeechEnd(ttsMan);
 	Common::String prompt = "Did you hear a voice say: \"This is the first sentence. This the second sentence\" and nothing else?";
 	if (!Testsuite::handleInteractiveInput(prompt, "Yes", "No", kOptionLeft)) {
diff --git a/engines/testbed/testbed.cpp b/engines/testbed/testbed.cpp
index cf98513d04..a68909b264 100644
--- a/engines/testbed/testbed.cpp
+++ b/engines/testbed/testbed.cpp
@@ -67,7 +67,7 @@ void TestbedExitDialog::init() {
 		if ((*i)->isEnabled()) {
 			strArray.push_back(Common::String::format("Passed: %d  Failed: %d Skipped: %d", (*i)->getNumTestsPassed(), (*i)->getNumTestsFailed(), (*i)->getNumTestsSkipped()));
 		} else {
-			strArray.push_back(Common::convertToU32String("Skipped"));
+			strArray.push_back(Common::U32String("Skipped"));
 		}
 		colors.push_back(GUI::ThemeEngine::kFontColorAlternate);
 	}
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index 6794908772..bf4a7e781c 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -483,12 +483,12 @@ void SoundManager::setSFXVolumes(uint8 volume) {
 }
 
 void SoundManager::showSoundError(const char *errorMsg, const char *soundFile) {
-	Common::U32String msg;
+	Common::String msg;
 	msg = Common::String::format(errorMsg, soundFile);
-	GUI::MessageDialog dialog(msg);
+	GUI::MessageDialog dialog(msg.c_str(), "OK");
 	dialog.runModal();
 
-	error("%s", msg.encode().c_str());
+	error("%s", msg.c_str());
 }
 
 /**
diff --git a/engines/titanic/support/files_manager.cpp b/engines/titanic/support/files_manager.cpp
index 6835f2e691..63fde3aaba 100644
--- a/engines/titanic/support/files_manager.cpp
+++ b/engines/titanic/support/files_manager.cpp
@@ -39,19 +39,19 @@ CFilesManager::~CFilesManager() {
 
 bool CFilesManager::loadResourceIndex() {
 	if (!_datFile.open("titanic.dat")) {
-		GUIErrorMessage(Common::convertToU32String("Could not find titanic.dat data file"));
+		GUIErrorMessage("Could not find titanic.dat data file");
 		return false;
 	}
 
 	uint headerId = _datFile.readUint32BE();
 	_version = _datFile.readUint16LE();
 	if (headerId != MKTAG('S', 'V', 'T', 'N')) {
-		GUIErrorMessage(Common::convertToU32String("titanic.dat has invalid contents"));
+		GUIErrorMessage("titanic.dat has invalid contents");
 		return false;
 	}
 
 	if (_version != 5) {
-		GUIErrorMessage(Common::convertToU32String("titanic.dat is out of date"));
+		GUIErrorMessage("titanic.dat is out of date");
 		return false;
 	}
 
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index 99fd5d359e..93cacd4b4b 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -195,7 +195,7 @@ bool TonyEngine::loadTonyDat() {
 	if (!in.isOpen()) {
 		msg = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
 		GUIErrorMessage(msg);
-		warning("%s", msg.encode().c_str());
+		warning("Unable to locate the '%s' engine data file.", filename.c_str());
 		return false;
 	}
 
@@ -207,7 +207,7 @@ bool TonyEngine::loadTonyDat() {
 	if (strcmp(buf, "TONY")) {
 		msg = Common::U32String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
 		GUIErrorMessage(msg);
-		warning("%s", msg.encode().c_str());
+		warning("The '%s' engine data file is corrupt.", filename.c_str());
 		return false;
 	}
 
@@ -219,7 +219,8 @@ bool TonyEngine::loadTonyDat() {
 			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
 			filename.c_str(), TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer);
 		GUIErrorMessage(msg);
-		warning("%s", msg.encode().c_str());
+		warning("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.",
+			filename.c_str(), TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer);
 
 		return false;
 	}
@@ -255,7 +256,7 @@ bool TonyEngine::loadTonyDat() {
 	if (expectedLangVariant > numVariant - 1) {
 		msg = Common::U32String::format(_("Font variant not present in '%s' engine data file."), filename.c_str());
 		GUIErrorMessage(msg);
-		warning("%s", msg.encode().c_str());
+		warning("Font variant not present in '%s' engine data file.", filename.c_str());
 
 		return false;
 	}
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index de02f4a6e5..712cd4344c 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -245,7 +245,7 @@ void ToonEngine::parseInput() {
 					} else {
 						Common::U32String buf = Common::U32String::format(_("Could not quick load the saved game #%d"), slotNum);
 						GUI::MessageDialog dialog(buf);
-						warning("%s", buf.encode().c_str());
+						warning("Could not quick load the saved game #%d", slotNum);
 						dialog.runModal();
 					}
 				}
@@ -1526,7 +1526,7 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) {
 	if (!resources()->openPackage(createRoomFilename(locationName + ".PAK"))) {
 		Common::U32String msg = Common::U32String::format(_("Unable to locate the '%s' data file."), createRoomFilename(locationName + ".PAK").c_str());
 		GUIErrorMessage(msg);
-		warning("%s", msg.encode().c_str());
+		warning("Unable to locate the '%s' data file.", createRoomFilename(locationName + ".PAK").c_str());
 		_shouldQuit = true;
 		return;
 	}
@@ -4951,7 +4951,7 @@ bool ToonEngine::loadToonDat() {
 	if (!in.isOpen()) {
 		msg = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
 		GUIErrorMessage(msg);
-		warning("%s", msg.encode().c_str());
+		warning("Unable to locate the '%s' engine data file.", filename.c_str());
 		return false;
 	}
 
@@ -4963,7 +4963,7 @@ bool ToonEngine::loadToonDat() {
 	if (strcmp(buf, "TOON")) {
 		msg = Common::U32String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
 		GUIErrorMessage(msg);
-		warning("%s", msg.encode().c_str());
+		warning("The '%s' engine data file is corrupt.", filename.c_str());
 		return false;
 	}
 
@@ -4975,7 +4975,8 @@ bool ToonEngine::loadToonDat() {
 			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
 			filename.c_str(), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer);
 		GUIErrorMessage(msg);
-		warning("%s", msg.encode().c_str());
+		warning("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.",
+			filename.c_str(), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer);
 
 		return false;
 	}
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 5eac13fd06..50bc6e7e90 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1622,7 +1622,7 @@ void SceneItem::doAction(int action) {
 			break;
 		}
 
-		GUIErrorMessage(Common::convertToU32String(msg));
+		GUIErrorMessage(msg);
 	}
 }
 
@@ -4436,7 +4436,7 @@ void SceneHandler::dispatch() {
 		// FIXME: Make use of the description string in err to enhance
 		// the error reported to the user.
 		if (err.getCode() != Common::kNoError)
-			GUIErrorMessage(Common::convertToU32String(SAVE_ERROR_MSG));
+			GUIErrorMessage(SAVE_ERROR_MSG);
 	}
 	if (_loadGameSlot != -1) {
 		int priorSceneBeforeLoad = GLOBALS._sceneManager._previousScene;
diff --git a/engines/ultima/ultima4/meta_engine.cpp b/engines/ultima/ultima4/meta_engine.cpp
index 550750924b..46384354e6 100644
--- a/engines/ultima/ultima4/meta_engine.cpp
+++ b/engines/ultima/ultima4/meta_engine.cpp
@@ -201,7 +201,7 @@ Common::KeymapArray MetaEngine::initKeymaps(KeybindingMode mode) {
 	for (int kCtr = 0; recPtr->_id; ++recPtr, ++kCtr) {
 		// Core keymaps
 		keyMap = new Common::Keymap(Common::Keymap::kKeymapTypeGame,
-			recPtr->_id, Common::convertToU32String(recPtr->_desc));
+			recPtr->_id, recPtr->_desc);
 		keymapArray.push_back(keyMap);
 
 		if (kCtr == 0) {
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp
index d0c495bf9c..ad38f5d529 100644
--- a/engines/wintermute/base/base_persistence_manager.cpp
+++ b/engines/wintermute/base/base_persistence_manager.cpp
@@ -153,7 +153,7 @@ void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &des
 		return;
 	}
 	desc.setSaveSlot(slot);
-	desc.setDescription(Common::convertToU32String(_savedDescription));
+	desc.setDescription(_savedDescription);
 	desc.setDeletableFlag(true);
 	desc.setWriteProtectedFlag(false);
 
diff --git a/engines/wintermute/detection.cpp b/engines/wintermute/detection.cpp
index 0ead7579d4..ebd5487973 100644
--- a/engines/wintermute/detection.cpp
+++ b/engines/wintermute/detection.cpp
@@ -209,7 +209,7 @@ public:
 	SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override {
 		Wintermute::BasePersistenceManager pm(target, true);
 		SaveStateDescriptor retVal;
-		retVal.setDescription(Common::convertToU32String("Invalid savegame"));
+		retVal.setDescription("Invalid savegame");
 		pm.getSaveStateDesc(slot, retVal);
 		return retVal;
 	}
diff --git a/engines/wintermute/keymapper_tables.h b/engines/wintermute/keymapper_tables.h
index 52bc3b9557..f65030661f 100644
--- a/engines/wintermute/keymapper_tables.h
+++ b/engines/wintermute/keymapper_tables.h
@@ -34,9 +34,9 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 
 	using namespace Common;
 
-	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "wintermute", Common::convertToU32String("Wintermute engine"));
-	Keymap *gameKeyMap = new Keymap(Keymap::kKeymapTypeGame, gameId, Common::convertToU32String(gameDescr));
-	Keymap *extraKeyMap = new Keymap(Keymap::kKeymapTypeGame, "extras", Common::convertToU32String("ScummVM extra actions"));
+	Keymap *engineKeyMap = new Keymap(Keymap::kKeymapTypeGame, "wintermute", "Wintermute engine");
+	Keymap *gameKeyMap = new Keymap(Keymap::kKeymapTypeGame, gameId, gameDescr);
+	Keymap *extraKeyMap = new Keymap(Keymap::kKeymapTypeGame, "extras", "ScummVM extra actions");
 
 	Action *act;
 
diff --git a/engines/xeen/files.cpp b/engines/xeen/files.cpp
index 1a5ed968c5..080246f3dd 100644
--- a/engines/xeen/files.cpp
+++ b/engines/xeen/files.cpp
@@ -255,14 +255,14 @@ bool FileManager::setup() {
 	// Ensure the custom CC archive is present
 	File f;
 	if (!f.exists("xeen.ccs")) {
-		GUIErrorMessage(Common::convertToU32String("Could not find xeen.ccs data file"));
+		GUIErrorMessage("Could not find xeen.ccs data file");
 		return false;
 	}
 
 	// Verify the version of the CC is correct
 	CCArchive *dataCc = new CCArchive("xeen.ccs", "data", true);
 	if (!f.open("VERSION", *dataCc) || f.readUint32LE() != 3) {
-		GUIErrorMessage(Common::convertToU32String("xeen.ccs is out of date"));
+		GUIErrorMessage("xeen.ccs is out of date");
 		return false;
 	}
 	SearchMan.add("data", dataCc);
diff --git a/engines/zvision/detection.cpp b/engines/zvision/detection.cpp
index 3723a8f217..d97cee5ef4 100644
--- a/engines/zvision/detection.cpp
+++ b/engines/zvision/detection.cpp
@@ -129,7 +129,7 @@ Common::KeymapArray ZVisionMetaEngine::initKeymaps(const char *target) const {
 	using namespace Common;
 	using namespace ZVision;
 
-	Keymap *mainKeymap = new Keymap(Keymap::kKeymapTypeGame, mainKeymapId, Common::convertToU32String("Z-Vision"));
+	Keymap *mainKeymap = new Keymap(Keymap::kKeymapTypeGame, mainKeymapId, "Z-Vision");
 
 	Action *act;
 
@@ -145,7 +145,7 @@ Common::KeymapArray ZVisionMetaEngine::initKeymaps(const char *target) const {
 	act->addDefaultInputMapping("JOY_B");
 	mainKeymap->addAction(act);
 
-	Keymap *gameKeymap = new Keymap(Keymap::kKeymapTypeGame, gameKeymapId, Common::convertToU32String("Z-Vision - Game"));
+	Keymap *gameKeymap = new Keymap(Keymap::kKeymapTypeGame, gameKeymapId, "Z-Vision - Game");
 
 	act = new Action(kStandardActionMoveUp, _("Look Up"));
 	act->setCustomEngineActionEvent(kZVisionActionUp);
@@ -232,7 +232,7 @@ Common::KeymapArray ZVisionMetaEngine::initKeymaps(const char *target) const {
 	act->addDefaultInputMapping("C+p");
 	gameKeymap->addAction(act);
 
-	Keymap *cutscenesKeymap = new Keymap(Keymap::kKeymapTypeGame, cutscenesKeymapId, Common::convertToU32String("Z-Vision - Cutscenes"));
+	Keymap *cutscenesKeymap = new Keymap(Keymap::kKeymapTypeGame, cutscenesKeymapId, "Z-Vision - Cutscenes");
 
 	act = new Action(kStandardActionSkip, _("Skip cutscene"));
 	act->setCustomEngineActionEvent(kZVisionActionSkipCutscene);
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index f630325b60..248610b923 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -44,6 +44,7 @@
 #include "common/debug-channels.h"
 #include "common/textconsole.h"
 #include "common/timer.h"
+#include "common/translation.h"
 #include "common/error.h"
 #include "common/system.h"
 #include "common/file.h"
@@ -308,7 +309,7 @@ Common::Error ZVision::run() {
 	}
 
 	if (!foundAllFonts) {
-		GUI::MessageDialog dialog(Common::convertToU32String(
+		GUI::MessageDialog dialog(_(
 				"Before playing this game, you'll need to copy the required "
 				"fonts into ScummVM's extras directory, or into the game directory. "
 				"On Windows, you'll need the following font files from the Windows "
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 2bc374da73..f886e10e1a 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -392,6 +392,10 @@ void ButtonWidget::setLabel(const Common::U32String &label) {
 	StaticTextWidget::setLabel(cleanupHotkey(label));
 }
 
+void ButtonWidget::setLabel(const Common::String &label) {
+	ButtonWidget::setLabel(Common::U32String(label));
+}
+
 ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32 cmd, int x, int y, int w, int h) {
 	ButtonWidget *button;
 
diff --git a/gui/widget.h b/gui/widget.h
index 1de1ebd1ba..a27e53ce78 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -230,6 +230,7 @@ public:
 	uint32 getCmd() const				{ return _cmd; }
 
 	void setLabel(const Common::U32String &label);
+	void setLabel(const Common::String &label);
 
 	void handleMouseUp(int x, int y, int button, int clickCount) override;
 	void handleMouseDown(int x, int y, int button, int clickCount) override;
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index af7123fc4a..6bc8f05cc9 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -503,6 +503,10 @@ void PopUpWidget::appendEntry(const U32String &entry, uint32 tag) {
 	_entries.push_back(e);
 }
 
+void PopUpWidget::appendEntry(const String &entry, uint32 tag) {
+	appendEntry(U32String(entry), tag);
+}
+
 void PopUpWidget::clearEntries() {
 	_entries.clear();
 	_selectedItem = -1;
diff --git a/gui/widgets/popup.h b/gui/widgets/popup.h
index a21020690e..95ed03e35c 100644
--- a/gui/widgets/popup.h
+++ b/gui/widgets/popup.h
@@ -65,6 +65,7 @@ public:
 	void handleMouseWheel(int x, int y, int direction) override;
 
 	void appendEntry(const U32String &entry, uint32 tag = (uint32)-1);
+	void appendEntry(const String &entry, uint32 tag = (uint32)-1);
 	void clearEntries();
 	int numEntries() { return _entries.size(); }
 
diff --git a/po/module.mk b/po/module.mk
index f8addcd2ad..e9b885be3b 100644
--- a/po/module.mk
+++ b/po/module.mk
@@ -1,6 +1,5 @@
 POTFILE := $(srcdir)/po/scummvm.pot
 POFILES := $(wildcard $(srcdir)/po/*.po)
-CPFILES := $(wildcard $(srcdir)/po/*.cp)
 
 ENGINE_INPUT_POTFILES := $(sort $(wildcard $(srcdir)/engines/*/POTFILES))
 updatepot:
@@ -37,12 +36,12 @@ updatepot:
 	fi;
 
 translations-dat: devtools/create_translations
-	devtools/create_translations/create_translations $(POFILES) $(CPFILES)
+	devtools/create_translations/create_translations $(POFILES)
 	mv translations.dat $(srcdir)/gui/themes/
 
-update-translations: updatepot $(POFILES) $(CPFILES) translations-dat
+update-translations: updatepot $(POFILES) translations-dat
 
-update-translations: updatepot $(POFILES) $(CPFILES)
+update-translations: updatepot $(POFILES)
 	@$(foreach file, $(POFILES), echo -n $(notdir $(basename $(file)))": ";msgfmt --statistic $(file);)
 	@rm -f messages.mo
 


Commit: 7a19c7ffeea57eb56dc5c4b1c6a0faa06c841bee
    https://github.com/scummvm/scummvm/commit/7a19c7ffeea57eb56dc5c4b1c6a0faa06c841bee
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
I18N: Update POTFILES

In the previous commit, some new places where translations could be used were found. This commit adds the relevant files to POTFILES.

Changed paths:
  A engines/mohawk/myst_stacks/POTFILES
  A engines/saga/POTFILES
    engines/agos/POTFILES
    engines/glk/POTFILES
    engines/sci/POTFILES
    engines/zvision/POTFILES


diff --git a/engines/agos/POTFILES b/engines/agos/POTFILES
index 7045ed9afe..1f52d7df95 100644
--- a/engines/agos/POTFILES
+++ b/engines/agos/POTFILES
@@ -1,2 +1,3 @@
 engines/agos/saveload.cpp
 engines/agos/animation.cpp
+engines/agos/midi.cpp
diff --git a/engines/glk/POTFILES b/engines/glk/POTFILES
index 5de7ff7607..98899fc042 100644
--- a/engines/glk/POTFILES
+++ b/engines/glk/POTFILES
@@ -12,3 +12,4 @@ engines/glk/quest/quest.cpp
 engines/glk/scott/scott.cpp
 engines/glk/zcode/detection.cpp
 engines/glk/zcode/zcode.cpp
+engines/glk/hugo/hugo.cpp
diff --git a/engines/mohawk/myst_stacks/POTFILES b/engines/mohawk/myst_stacks/POTFILES
new file mode 100644
index 0000000000..339d149265
--- /dev/null
+++ b/engines/mohawk/myst_stacks/POTFILES
@@ -0,0 +1 @@
+engines/mohawk/myst_stacks/preview.cpp
diff --git a/engines/saga/POTFILES b/engines/saga/POTFILES
new file mode 100644
index 0000000000..cec3193f11
--- /dev/null
+++ b/engines/saga/POTFILES
@@ -0,0 +1 @@
+engines/saga/saga.cpp
diff --git a/engines/sci/POTFILES b/engines/sci/POTFILES
index b0de5534a4..801ddffe6d 100644
--- a/engines/sci/POTFILES
+++ b/engines/sci/POTFILES
@@ -3,6 +3,7 @@ engines/sci/engine/guest_additions.cpp
 engines/sci/engine/kfile.cpp
 engines/sci/engine/kgraphics.cpp
 engines/sci/engine/kgraphics32.cpp
+engines/sci/engine/kmisc.cpp
 engines/sci/engine/savegame.cpp
 engines/sci/graphics/controls32.cpp
 engines/sci/graphics/video32.cpp
diff --git a/engines/zvision/POTFILES b/engines/zvision/POTFILES
index a7a6637e37..48188f0322 100644
--- a/engines/zvision/POTFILES
+++ b/engines/zvision/POTFILES
@@ -1,3 +1,4 @@
 engines/zvision/detection_tables.h
 engines/zvision/detection.cpp
 engines/zvision/file/save_manager.cpp
+engines/zvision/zvision.cpp


Commit: cbff58200f3111a3b5f26e3412c1930edcc6aaad
    https://github.com/scummvm/scummvm/commit/cbff58200f3111a3b5f26e3412c1930edcc6aaad
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use u32 for EditRecordDialog and RecorderDialog

- Mark _authors as U32String
- Adjust accordingly in EditRecordDialog
- Some janitorial whitespaces fixes

Changed paths:
    gui/editrecorddialog.cpp
    gui/editrecorddialog.h
    gui/recorderdialog.cpp
    gui/recorderdialog.h


diff --git a/gui/editrecorddialog.cpp b/gui/editrecorddialog.cpp
index 97d0e7fdc6..15752ad872 100644
--- a/gui/editrecorddialog.cpp
+++ b/gui/editrecorddialog.cpp
@@ -27,11 +27,11 @@
 
 namespace GUI {
 
-const Common::String EditRecordDialog::getAuthor() {
+const Common::U32String EditRecordDialog::getAuthor() {
 	return _authorEdit->getEditString();
 }
 
-void EditRecordDialog::setAuthor(const Common::String &author) {
+void EditRecordDialog::setAuthor(const Common::U32String &author) {
 	_authorEdit->setEditString(author);
 }
 
@@ -54,13 +54,13 @@ void EditRecordDialog::setName(const Common::String &name) {
 EditRecordDialog::~EditRecordDialog() {
 }
 
-EditRecordDialog::EditRecordDialog(const Common::String author, const Common::String name, const Common::String notes) : Dialog("EditRecordDialog") {
-	new StaticTextWidget(this,"EditRecordDialog.AuthorLabel",_("Author:"));
-	new StaticTextWidget(this,"EditRecordDialog.NameLabel",_("Name:"));
-	new StaticTextWidget(this,"EditRecordDialog.NotesLabel",_("Notes:"));
-	_authorEdit = new EditTextWidget(this, "EditRecordDialog.AuthorEdit","");
-	_notesEdit = new EditTextWidget(this, "EditRecordDialog.NotesEdit","");
-	_nameEdit = new EditTextWidget(this, "EditRecordDialog.NameEdit","");
+EditRecordDialog::EditRecordDialog(const Common::U32String author, const Common::String name, const Common::String notes) : Dialog("EditRecordDialog") {
+	new StaticTextWidget(this, "EditRecordDialog.AuthorLabel" , _("Author:"));
+	new StaticTextWidget(this, "EditRecordDialog.NameLabel", _("Name:"));
+	new StaticTextWidget(this, "EditRecordDialog.NotesLabel", _("Notes:"));
+	_authorEdit = new EditTextWidget(this, "EditRecordDialog.AuthorEdit", Common::U32String(""));
+	_notesEdit = new EditTextWidget(this, "EditRecordDialog.NotesEdit", Common::U32String(""));
+	_nameEdit = new EditTextWidget(this, "EditRecordDialog.NameEdit", Common::U32String(""));
 	_authorEdit->setEditString(author);
 	_notesEdit->setEditString(notes);
 	_nameEdit->setEditString(name);
diff --git a/gui/editrecorddialog.h b/gui/editrecorddialog.h
index 93edebe1c8..2d246f1563 100644
--- a/gui/editrecorddialog.h
+++ b/gui/editrecorddialog.h
@@ -37,14 +37,14 @@ private:
 	EditTextWidget *_authorEdit;
 	EditRecordDialog() : Dialog("EditRecordDialog") {};
 public:
-	EditRecordDialog(const Common::String author, const Common::String name, const Common::String notes);
+	EditRecordDialog(const Common::U32String author, const Common::String name, const Common::String notes);
 	~EditRecordDialog() override;
 
-	const Common::String getAuthor();
+	const Common::U32String getAuthor();
 	const Common::String getNotes();
 	const Common::String getName();
 
-	void setAuthor(const Common::String &author);
+	void setAuthor(const Common::U32String &author);
 	void setNotes(const Common::String &desc);
 	void setName(const Common::String &name);
 
diff --git a/gui/recorderdialog.cpp b/gui/recorderdialog.cpp
index fb7e4f8842..10a21d675e 100644
--- a/gui/recorderdialog.cpp
+++ b/gui/recorderdialog.cpp
@@ -78,9 +78,9 @@ RecorderDialog::RecorderDialog() : Dialog("RecorderDialog"), _list(nullptr), _cu
 	_gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 10, 10);
 	_container = new GUI::ContainerWidget(this, "RecorderDialog.Thumbnail");
 	if (g_gui.xmlEval()->getVar("Globals.RecorderDialog.ExtInfo.Visible") == 1) {
-		new GUI::ButtonWidget(this,"RecorderDialog.NextScreenShotButton", "<", Common::U32String(""), kPrevScreenshotCmd);
-		new GUI::ButtonWidget(this, "RecorderDialog.PreviousScreenShotButton", ">", Common::U32String(""), kNextScreenshotCmd);
-		_currentScreenshotText = new StaticTextWidget(this, "RecorderDialog.currentScreenshot", "0/0");
+		new GUI::ButtonWidget(this,"RecorderDialog.NextScreenShotButton", Common::U32String("<"), Common::U32String(""), kPrevScreenshotCmd);
+		new GUI::ButtonWidget(this, "RecorderDialog.PreviousScreenShotButton", Common::U32String(">"), Common::U32String(""), kNextScreenshotCmd);
+		_currentScreenshotText = new StaticTextWidget(this, "RecorderDialog.currentScreenshot", Common::U32String("0/0"));
 		_authorText = new StaticTextWidget(this, "RecorderDialog.Author", _("Author: "));
 		_notesText = new StaticTextWidget(this, "RecorderDialog.Notes", _("Notes: "));
 	}
@@ -168,7 +168,7 @@ void RecorderDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 		TimeDate t;
 		QualifiedGameDescriptor desc = EngineMan.findTarget(_target);
 		g_system->getTimeAndDate(t);
-		EditRecordDialog editDlg(_("Unknown Author"), Common::String::format("%.2d.%.2d.%.4d ", t.tm_mday, t.tm_mon, 1900 + t.tm_year) + desc.description, Common::U32String(""));
+		EditRecordDialog editDlg(_("Unknown Author"), Common::String::format("%.2d.%.2d.%.4d ", t.tm_mday, t.tm_mon, 1900 + t.tm_year) + desc.description, "");
 		if (editDlg.runModal() != kOKCmd) {
 			return;
 		}
@@ -197,7 +197,7 @@ void RecorderDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 
 void RecorderDialog::updateList() {
 	Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
-	Common::String pattern(_target+".r??");
+	Common::String pattern(_target + ".r??");
 	Common::StringArray files = saveFileMan->listSavefiles(pattern);
 	Common::PlaybackFile file;
 	Common::StringArray namesList;
@@ -237,8 +237,8 @@ void RecorderDialog::updateSelection(bool redraw) {
 	_currentScreenshot = 0;
 	updateScreenShotsText();
 	if (_list->getSelected() >= 0) {
-		_authorText->setLabel(_("Author: ") + _fileHeaders[_list->getSelected()].author);
-		_notesText->setLabel(_("Notes: ") + _fileHeaders[_list->getSelected()].notes);
+		_authorText->setLabel(_("Author: ") + Common::U32String(_fileHeaders[_list->getSelected()].author));
+		_notesText->setLabel(_("Notes: ") + Common::U32String(_fileHeaders[_list->getSelected()].notes));
 
 		_firstScreenshotUpdate = true;
 		updateScreenshot();
diff --git a/gui/recorderdialog.h b/gui/recorderdialog.h
index 74ee1f4445..352c8460bf 100644
--- a/gui/recorderdialog.h
+++ b/gui/recorderdialog.h
@@ -60,9 +60,9 @@ private:
 	void updateSelection(bool redraw);
 	void updateScreenshot();
 public:
-	Common::String _author;
-	Common::String _name;
-	Common::String _notes;
+	Common::U32String _author;
+	Common::String    _name;
+	Common::String    _notes;
 	enum DialogResult {
 		kRecordDialogClose,
 		kRecordDialogRecord,


Commit: 68d01321d62f39c757793c41b191944dadf8c2b2
    https://github.com/scummvm/scummvm/commit/68d01321d62f39c757793c41b191944dadf8c2b2
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Downscale changes of U32, fix review issues

This commit addresses a range of changes, within scummvm subproject.

- Audio files, like mididrv, remove U32String based name and identifier, because ASCII only.
- mididrv.cpp had some wrong format for warning messages, fix those
- Message dialogs were modified to use default arguments more often, but reverting back to the orignal to minimize changes.
- SetTooltip has a fake constructor that takes in a string, and use it.
- U32Format had some break statements missing, add those.
- RemapWidget: Use fake constructor for setLabel and setTooltip, to make minimal changes
- SDL: setting text in clipboard no longer uses SDL_iconv_string
- TTS: Override base class "say" with strings, so tts->say can be used with normal strings too.
- About dialog: fix incorrect code for u32string variables
- Fix some extra brackets
- Some buttons were incorrectly removed from using translated labels, revert those
- Message Dialog: Pass default and alt buttons as const references
- Saveload Dialog: Use translations in missing places, use const-references. Also, use translations in a correct manner.
- Use const references for tooltip in GraphicsWidget, EditTextWidget, error.cpp
- DomainEditTextWidget: Use U32String for text

Changed paths:
    audio/mididrv.cpp
    audio/mididrv.h
    audio/musicplugin.cpp
    audio/musicplugin.h
    audio/softsynth/mt32.cpp
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    backends/keymapper/remap-widget.cpp
    backends/networking/sdl_net/handlers/createdirectoryhandler.cpp
    backends/platform/sdl/sdl.cpp
    backends/text-to-speech/linux/linux-text-to-speech.cpp
    backends/text-to-speech/linux/linux-text-to-speech.h
    backends/text-to-speech/macosx/macosx-text-to-speech.h
    backends/text-to-speech/macosx/macosx-text-to-speech.mm
    base/commandLine.cpp
    common/ustr.cpp
    gui/about.cpp
    gui/browser.cpp
    gui/editgamedialog.cpp
    gui/error.cpp
    gui/error.h
    gui/launcher.cpp
    gui/massadd.cpp
    gui/message.cpp
    gui/message.h
    gui/options.cpp
    gui/predictivedialog.cpp
    gui/saveload-dialog.cpp
    gui/saveload-dialog.h
    gui/widget.cpp
    gui/widget.h
    gui/widgets/edittext.cpp
    gui/widgets/edittext.h


diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp
index 0b9cfc167f..02fb25a1e8 100644
--- a/audio/mididrv.cpp
+++ b/audio/mididrv.cpp
@@ -146,7 +146,7 @@ MusicType MidiDriver::getMusicType(MidiDriver::DeviceHandle handle) {
 	return MT_INVALID;
 }
 
-Common::U32String MidiDriver::getDeviceString(DeviceHandle handle, DeviceStringType type) {
+Common::String MidiDriver::getDeviceString(DeviceHandle handle, DeviceStringType type) {
 	if (handle) {
 		const PluginList p = MusicMan.getPlugins();
 		for (PluginList::const_iterator m = p.begin(); m != p.end(); m++) {
@@ -173,11 +173,11 @@ Common::U32String MidiDriver::getDeviceString(DeviceHandle handle, DeviceStringT
 
 MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 	// Query the selected music device (defaults to MT_AUTO device).
-	Common::U32String selDevStr = ConfMan.hasKey("music_driver") ? ConfMan.get("music_driver") : Common::String("auto");
+	Common::String selDevStr = ConfMan.hasKey("music_driver") ? ConfMan.get("music_driver") : Common::String("auto");
 	if ((flags & MDT_PREFER_FLUID) && selDevStr == "auto") {
 		selDevStr = "fluidsynth";
 	}
-	DeviceHandle hdl = getDeviceHandle(selDevStr.empty() ? Common::U32String("auto") : selDevStr);
+	DeviceHandle hdl = getDeviceHandle(selDevStr.empty() ? Common::String("auto") : selDevStr);
 	DeviceHandle reslt = 0;
 
 	_forceTypeMT32 = false;
@@ -250,14 +250,14 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 		break;
 	}
 
-	Common::U32String failedDevStr;
+	Common::String failedDevStr;
 	if (getMusicType(hdl) == MT_INVALID) {
 		// If the expressly selected driver or device cannot be found (no longer compiled in, turned off, etc.)
 		// we display a warning and continue.
 		failedDevStr = selDevStr;
 		Common::U32String warningMsg = Common::U32String::format(
-			_("The selected audio device '%s' was not found (e.g. might be turned off or disconnected)."),
-			(failedDevStr + Common::U32String(" ") + _("Attempting to fall back to the next available device...")).encode().c_str());
+			_("The selected audio device '%s' was not found (e.g. might be turned off or disconnected)."), failedDevStr.c_str())
+			+ Common::U32String(" ") + _("Attempting to fall back to the next available device...");
 		GUI::MessageDialog dialog(warningMsg);
 		dialog.runModal();
 	}
@@ -270,8 +270,8 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 			// If the expressly selected device cannot be used we display a warning and continue.
 			failedDevStr = getDeviceString(hdl, MidiDriver::kDeviceName);
 			Common::U32String warningMsg = Common::U32String::format(
-				_("The selected audio device '%s' cannot be used. See log file for more information."),
-				(failedDevStr + Common::U32String(" ") + _("Attempting to fall back to the next available device...")).encode().c_str());
+				_("The selected audio device '%s' cannot be used. See log file for more information."), failedDevStr.c_str())
+				+ Common::U32String(" ") + _("Attempting to fall back to the next available device...");
 			GUI::MessageDialog dialog(warningMsg);
 			dialog.runModal();
 		}
@@ -286,7 +286,7 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 	while (flags != MDT_NONE) {
 		if ((flags & MDT_MIDI) && !skipMidi) {
 			// If a preferred MT32 or GM device has been selected that device gets returned if available.
-			Common::U32String devStr;
+			Common::String devStr;
 			if (flags & MDT_PREFER_MT32)
 				devStr = ConfMan.hasKey("mt32_device") ? ConfMan.get("mt32_device") : Common::String("null");
 			else if (flags & MDT_PREFER_GM)
@@ -296,7 +296,7 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 
 			// Default to Null device here, since we also register a default null setting for
 			// the MT32 or GM device in the config manager.
-			hdl = getDeviceHandle(devStr.empty() ? Common::U32String("null") : devStr);
+			hdl = getDeviceHandle(devStr.empty() ? Common::String("null") : devStr);
 			const MusicType type = getMusicType(hdl);
 
 			// If we have a "Don't use GM/MT-32" setting we skip this part and jump
@@ -308,8 +308,8 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 					// missing device is selected as preferred device and also as GM or MT-32 device).
 					if (failedDevStr != devStr) {
 						Common::U32String warningMsg = Common::U32String::format(
-							_("The preferred audio device '%s' was not found (e.g. might be turned off or disconnected)."),
-							(devStr + Common::U32String(" ") + _("Attempting to fall back to the next available device...")).encode().c_str());
+							_("The preferred audio device '%s' was not found (e.g. might be turned off or disconnected)."), devStr.c_str())
+							+ Common::U32String(" ") + _("Attempting to fall back to the next available device...");
 						GUI::MessageDialog dialog(warningMsg);
 						dialog.runModal();
 					}
@@ -325,8 +325,8 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 						// device is selected as preferred device and also as GM or MT-32 device).
 						if (failedDevStr != getDeviceString(hdl, MidiDriver::kDeviceName)) {
 							Common::U32String warningMsg = Common::U32String::format(
-								_("The preferred audio device '%s' cannot be used. See log file for more information."),
-								(getDeviceString(hdl, MidiDriver::kDeviceName) + Common::U32String(" ") + _("Attempting to fall back to the next available device...")).encode().c_str());
+								_("The preferred audio device '%s' cannot be used. See log file for more information."), getDeviceString(hdl, MidiDriver::kDeviceName).c_str())
+								+ Common::U32String(" ") + _("Attempting to fall back to the next available device...");
 							GUI::MessageDialog dialog(warningMsg);
 							dialog.runModal();
 						}
@@ -446,7 +446,7 @@ bool MidiDriver::checkDevice(MidiDriver::DeviceHandle handle) {
 	return false;
 }
 
-MidiDriver::DeviceHandle MidiDriver::getDeviceHandle(const Common::U32String &identifier) {
+MidiDriver::DeviceHandle MidiDriver::getDeviceHandle(const Common::String &identifier) {
 	const PluginList p = MusicMan.getPlugins();
 
 	if (p.begin() == p.end())
diff --git a/audio/mididrv.h b/audio/mididrv.h
index 7b5025eab4..6f37125cd7 100644
--- a/audio/mididrv.h
+++ b/audio/mididrv.h
@@ -253,7 +253,7 @@ public:
 	static DeviceHandle detectDevice(int flags);
 
 	/** Find the music driver matching the given driver name/description. */
-	static DeviceHandle getDeviceHandle(const Common::U32String &identifier);
+	static DeviceHandle getDeviceHandle(const Common::String &identifier);
 
 	/** Check whether the device with the given handle is available. */
 	static bool checkDevice(DeviceHandle handle);
@@ -262,7 +262,7 @@ public:
 	static MusicType getMusicType(DeviceHandle handle);
 
 	/** Get the device description string matching the given device handle and the given type. */
-	static Common::U32String getDeviceString(DeviceHandle handle, DeviceStringType type);
+	static Common::String getDeviceString(DeviceHandle handle, DeviceStringType type);
 
 	/** Common operations to be done by all drivers on start of send */
 	void midiDriverCommonSend(uint32 b);
diff --git a/audio/musicplugin.cpp b/audio/musicplugin.cpp
index e18274cffc..56f73fd57e 100644
--- a/audio/musicplugin.cpp
+++ b/audio/musicplugin.cpp
@@ -25,12 +25,12 @@
 #include "common/translation.h"
 
 MusicDevice::MusicDevice(MusicPluginObject const *musicPlugin, Common::String name, MusicType mt) :
-	_musicDriverName(_(musicPlugin->getName())), _musicDriverId(musicPlugin->getId()),
-	_name(_(name)), _type(mt) {
+	_musicDriverName(musicPlugin->getName()), _musicDriverId(musicPlugin->getId()),
+	_name(name), _type(mt) {
 }
 
-Common::U32String MusicDevice::getCompleteName() {
-	Common::U32String name;
+Common::String MusicDevice::getCompleteName() {
+	Common::String name;
 
 	if (_name.empty()) {
 		// Default device, just show the driver name
@@ -38,18 +38,18 @@ Common::U32String MusicDevice::getCompleteName() {
 	} else {
 		// Show both device and driver names
 		name = _name;
-		name += Common::U32String(" [");
+		name += " [";
 		name += _musicDriverName;
-		name += Common::U32String("]");
+		name += "]";
 	}
 
 	return name;
 }
 
-Common::U32String MusicDevice::getCompleteId() {
-	Common::U32String id = _musicDriverId;
+Common::String MusicDevice::getCompleteId() {
+	Common::String id = _musicDriverId;
 	if (!_name.empty()) {
-		id += Common::U32String("_");
+		id += "_";
 		id += _name;
 	}
 
@@ -57,5 +57,5 @@ Common::U32String MusicDevice::getCompleteId() {
 }
 
 MidiDriver::DeviceHandle MusicDevice::getHandle() {
-	return (MidiDriver::DeviceHandle)Common::hashit(getCompleteId().encode().c_str());
+	return (MidiDriver::DeviceHandle)Common::hashit(getCompleteId());
 }
diff --git a/audio/musicplugin.h b/audio/musicplugin.h
index 9ae19e545b..705d7a9552 100644
--- a/audio/musicplugin.h
+++ b/audio/musicplugin.h
@@ -26,7 +26,6 @@
 #include "base/plugins.h"
 #include "audio/mididrv.h"
 #include "common/list.h"
-#include "common/ustr.h"
 
 namespace Common {
 class Error;
@@ -43,29 +42,29 @@ class MusicDevice {
 public:
 	MusicDevice(MusicPluginObject const *musicPlugin, Common::String name, MusicType mt);
 
-	const Common::U32String &getName() const { return _name; }
-	const Common::U32String &getMusicDriverName() const { return _musicDriverName; }
-	const Common::U32String &getMusicDriverId() const { return _musicDriverId; }
+	const Common::String &getName() const { return _name; }
+	const Common::String &getMusicDriverName() const { return _musicDriverName; }
+	const Common::String &getMusicDriverId() const { return _musicDriverId; }
 	MusicType getMusicType() const { return _type; }
 
 	/**
 	 * Returns a user readable string that contains the name of the current
 	 * device name (if it isn't the default one) and the name of the driver.
 	 */
-	Common::U32String getCompleteName();
+	Common::String getCompleteName();
 
 	/**
 	 * Returns a user readable string that contains the name of the current
 	 * device name (if it isn't the default one) and the id of the driver.
 	 */
-	Common::U32String getCompleteId();
+	Common::String getCompleteId();
 
 	MidiDriver::DeviceHandle getHandle();
 
 private:
-	Common::U32String _name;
-	Common::U32String _musicDriverName;
-	Common::U32String _musicDriverId;
+	Common::String _name;
+	Common::String _musicDriverName;
+	Common::String _musicDriverId;
 	MusicType _type;
 };
 
diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index 7b09e28650..1a25109aed 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -67,12 +67,12 @@ public:
 
 	// Callbacks for reporting various errors and information
 	void onErrorControlROM() {
-		GUI::MessageDialog dialog("MT32Emu: Init Error - Missing or invalid Control ROM image");
+		GUI::MessageDialog dialog("MT32Emu: Init Error - Missing or invalid Control ROM image", "OK");
 		dialog.runModal();
 		error("MT32emu: Init Error - Missing or invalid Control ROM image");
 	}
 	void onErrorPCMROM() {
-		GUI::MessageDialog dialog("MT32Emu: Init Error - Missing PCM ROM image");
+		GUI::MessageDialog dialog("MT32Emu: Init Error - Missing PCM ROM image", "OK");
 		dialog.runModal();
 		error("MT32emu: Init Error - Missing PCM ROM image");
 	}
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index ecc6950cb3..1797e5d364 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2237,9 +2237,9 @@ void SurfaceSdlGraphicsManager::displayMessageOnOSD(const Common::U32String &msg
 
 	// Split the message into separate lines.
 	Common::Array<Common::U32String> lines;
-	Common::U32String::const_iterator itr = msg.begin(), strLineItrBegin = msg.begin();
+	Common::U32String::const_iterator strLineItrBegin = msg.begin();
 
-	for ( ; itr != msg.end(); itr++) {
+	for (Common::U32String::const_iterator itr = msg.begin(); itr != msg.end(); itr++) {
 		if (*itr == '\n') {
 			lines.push_back(Common::U32String(strLineItrBegin, itr));
 			strLineItrBegin = itr + 1;
diff --git a/backends/keymapper/remap-widget.cpp b/backends/keymapper/remap-widget.cpp
index abd3caf7e6..4c81b29258 100644
--- a/backends/keymapper/remap-widget.cpp
+++ b/backends/keymapper/remap-widget.cpp
@@ -219,8 +219,8 @@ void RemapWidget::startRemapping(uint actionIndex) {
 	_remapTimeout = g_system->getMillis() + kRemapTimeoutDelay;
 	_remapInputWatcher->startWatching();
 
-	_actions[actionIndex].keyButton->setLabel(U32String("..."));
-	_actions[actionIndex].keyButton->setTooltip(U32String(""));
+	_actions[actionIndex].keyButton->setLabel("...");
+	_actions[actionIndex].keyButton->setTooltip("");
 	_actions[actionIndex].keyButton->markAsDirty();
 
 	g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
@@ -301,8 +301,8 @@ void RemapWidget::refreshKeymap() {
 			row.keyButton->setLabel(keysLabel);
 			row.keyButton->setTooltip(keysLabel);
 		} else {
-			row.keyButton->setLabel(U32String("-"));
-			row.keyButton->setTooltip(U32String(""));
+			row.keyButton->setLabel("-");
+			row.keyButton->setTooltip("");
 		}
 
 		KeymapTitleRow &keymapTitle = _keymapSeparators[row.keymap];
diff --git a/backends/networking/sdl_net/handlers/createdirectoryhandler.cpp b/backends/networking/sdl_net/handlers/createdirectoryhandler.cpp
index e00e583485..96f1373736 100644
--- a/backends/networking/sdl_net/handlers/createdirectoryhandler.cpp
+++ b/backends/networking/sdl_net/handlers/createdirectoryhandler.cpp
@@ -57,7 +57,7 @@ void CreateDirectoryHandler::handle(Client &client) {
 
 	// check that <path> is not an absolute root
 	if (path == "" || path == "/") {
-		handleError(client, Common::convertFromU32String(_("Can't create directory here!")).c_str());
+		handleError(client, Common::convertFromU32String(_("Can't create directory here!")));
 		return;
 	}
 
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 8bea8dda95..2fe9692986 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -519,10 +519,9 @@ Common::U32String OSystem_SDL::getTextFromClipboard() {
 bool OSystem_SDL::setTextInClipboard(const Common::U32String &text) {
 	// The encoding we need to use is UTF-8. Assume we currently have the
 	// current TranslationManager encoding or ISO-8859-1.
-	char *utf8_text = SDL_iconv_string("UTF-8", TransMan.getCurrentCharset().c_str(), text.encode().c_str(), text.size() + 1);
+	char *utf8_text = (char *)text.encode().c_str();
 	if (utf8_text) {
 		int status = SDL_SetClipboardText(utf8_text);
-		SDL_free(utf8_text);
 		return status == 0;
 	}
 	return SDL_SetClipboardText(text.encode().c_str()) == 0;
diff --git a/backends/text-to-speech/linux/linux-text-to-speech.cpp b/backends/text-to-speech/linux/linux-text-to-speech.cpp
index a7777f1a50..8825296ee7 100644
--- a/backends/text-to-speech/linux/linux-text-to-speech.cpp
+++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp
@@ -226,6 +226,10 @@ bool SpeechDispatcherManager::say(const Common::U32String &str, Action action, C
 	return false;
 }
 
+bool SpeechDispatcherManager::say(const Common::String &str, Action action, Common::String charset) {
+	return say(Common::U32String(str), action, charset);
+}
+
 bool SpeechDispatcherManager::stop() {
 	if (_speechState == READY || _speechState == BROKEN)
 		return true;
diff --git a/backends/text-to-speech/linux/linux-text-to-speech.h b/backends/text-to-speech/linux/linux-text-to-speech.h
index 77b790509d..906d0ada8f 100644
--- a/backends/text-to-speech/linux/linux-text-to-speech.h
+++ b/backends/text-to-speech/linux/linux-text-to-speech.h
@@ -61,6 +61,7 @@ public:
 	virtual ~SpeechDispatcherManager() override;
 
 	virtual bool say(const Common::U32String &str, Action action, Common::String charset = "") override;
+	virtual bool say(const Common::String &str, Action action, Common::String charset = "") override;
 
 	virtual bool stop() override;
 	virtual bool pause() override;
diff --git a/backends/text-to-speech/macosx/macosx-text-to-speech.h b/backends/text-to-speech/macosx/macosx-text-to-speech.h
index b3e96c228b..35bb723f7d 100644
--- a/backends/text-to-speech/macosx/macosx-text-to-speech.h
+++ b/backends/text-to-speech/macosx/macosx-text-to-speech.h
@@ -37,6 +37,7 @@ public:
 	virtual ~MacOSXTextToSpeechManager() override;
 
 	virtual bool say(const Common::U32String &str, Action action, Common::String charset = "") override;
+	virtual bool say(const Common::String &str, Action action, Common::String charset = "") override;
 
 	virtual bool stop() override;
 	virtual bool pause() override;
diff --git a/backends/text-to-speech/macosx/macosx-text-to-speech.mm b/backends/text-to-speech/macosx/macosx-text-to-speech.mm
index ddf4a4fab7..ff20539088 100644
--- a/backends/text-to-speech/macosx/macosx-text-to-speech.mm
+++ b/backends/text-to-speech/macosx/macosx-text-to-speech.mm
@@ -119,6 +119,10 @@ bool MacOSXTextToSpeechManager::say(const Common::U32String &text, Action action
 	return true;
 }
 
+bool MacOSXTextToSpeechManager::say(const Common::String &text, Action action, Common::String encoding) {
+	return say(Common::U32String(text), action, encoding);
+}
+
 bool MacOSXTextToSpeechManager::startNextSpeech() {
 	_currentSpeech.clear();
 	if (_messageQueue.empty())
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 8e264f148e..1607319c58 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -961,7 +961,7 @@ static void listAudioDevices() {
 		const MusicPluginObject &musicObject = (*i)->get<MusicPluginObject>();
 		MusicDevices deviceList = musicObject.getDevices();
 		for (MusicDevices::iterator j = deviceList.begin(), jend = deviceList.end(); j != jend; ++j) {
-			printf("%-30s %s\n", Common::String::format("\"%s\"", j->getCompleteId().encode().c_str()).c_str(), j->getCompleteName().encode().c_str());
+			printf("%-30s %s\n", Common::String::format("\"%s\"", j->getCompleteId().c_str()).c_str(), j->getCompleteName().c_str());
 		}
 	}
 }
diff --git a/common/ustr.cpp b/common/ustr.cpp
index ceaa1ca52b..d7b9d0c139 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -579,6 +579,7 @@ int U32String::vformat(U32String::const_iterator fmt, const U32String::const_ite
 
 				output.insertString(buffer, pos);
 				pos += len - 1;
+				break;
 			case 'i':
 				int_temp = va_arg(args, uint16);
 				itoa(int_temp, buffer, 10);
@@ -587,6 +588,7 @@ int U32String::vformat(U32String::const_iterator fmt, const U32String::const_ite
 
 				output.insertString(buffer, pos);
 				pos += len - 1;
+				break;
 			default:
 				warning("Unexpected formatting type for U32String::Format.");
 				break;
diff --git a/gui/about.cpp b/gui/about.cpp
index bfef4f1a39..448fe73cfb 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -147,8 +147,7 @@ void AboutDialog::addLine(const U32String &str) {
 	if (*strBeginItr == 0) {
 		_lines.push_back(U32String(""));
 	} else {
-		U32String dupliStr = str;
-		Common::U32String format(dupliStr.encode().c_str(), 2);
+		Common::U32String format(str.begin(), str.begin() + 2);
 		strBeginItr += 2;
 		U32String renderStr(strBeginItr, str.end());
 
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 6284e63e98..b77bff8300 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -72,7 +72,7 @@ BrowserDialog::BrowserDialog(const Common::U32String &title, bool dirBrowser)
 	_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
 
 	// Checkbox for the "show hidden files" state.
-	_showHiddenWidget = new CheckboxWidget(this, "Browser.Hidden", (_("Show hidden files")), _("Show files marked with the hidden attribute"), kHiddenCmd);
+	_showHiddenWidget = new CheckboxWidget(this, "Browser.Hidden", _("Show hidden files"), _("Show files marked with the hidden attribute"), kHiddenCmd);
 
 	// Buttons
 	if (g_system->getOverlayWidth() > 320)
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index a10357676c..8ec1563a69 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -88,7 +88,7 @@ enum {
 */
 class DomainEditTextWidget : public EditTextWidget {
 public:
-	DomainEditTextWidget(GuiObject *boss, const String &name, const String &text, U32String tooltip = U32String(""))
+	DomainEditTextWidget(GuiObject *boss, const String &name, const U32String &text, const U32String &tooltip = U32String(""))
 		: EditTextWidget(boss, name, text, tooltip) {}
 
 protected:
@@ -152,11 +152,11 @@ EditGameDialog::EditGameDialog(const String &domain)
 	_langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", _("Language:"), _("Language of the game. This will not turn your Spanish game version into English"));
 	_langPopUp = new PopUpWidget(tab, "GameOptions_Game.LangPopup", _("Language of the game. This will not turn your Spanish game version into English"));
 	_langPopUp->appendEntry(_("<default>"), (uint32)Common::UNK_LANG);
-	_langPopUp->appendEntry(Common::U32String(""), (uint32)Common::UNK_LANG);
+	_langPopUp->appendEntry("", (uint32)Common::UNK_LANG);
 	const Common::LanguageDescription *l = Common::g_languages;
 	for (; l->code; ++l) {
 		if (checkGameGUIOptionLanguage(l->id, _guioptionsString))
-			_langPopUp->appendEntry(Common::convertToU32String(l->description), l->id);
+			_langPopUp->appendEntry(l->description, l->id);
 	}
 
 	// Platform popup
@@ -166,10 +166,10 @@ EditGameDialog::EditGameDialog(const String &domain)
 		_platformPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.PlatformPopupDesc", _c("Platform:", "lowres"), _("Platform the game was originally designed for"));
 	_platformPopUp = new PopUpWidget(tab, "GameOptions_Game.PlatformPopup", _("Platform the game was originally designed for"));
 	_platformPopUp->appendEntry(_("<default>"));
-	_platformPopUp->appendEntry(Common::U32String(""));
+	_platformPopUp->appendEntry("");
 	const Common::PlatformDescription *p = Common::g_platforms;
 	for (; p->code; ++p) {
-		_platformPopUp->appendEntry(Common::convertToU32String(p->description), p->id);
+		_platformPopUp->appendEntry(p->description, p->id);
 	}
 
 	//
@@ -237,7 +237,7 @@ EditGameDialog::EditGameDialog(const String &domain)
 	//
 	// 4) The audio tab
 	//
-	tab->addTab((_("Audio")), "GameOptions_Audio");
+	tab->addTab(_("Audio"), "GameOptions_Audio");
 
 	if (g_system->getOverlayWidth() > 320)
 		_globalAudioOverride = new CheckboxWidget(tab, "GameOptions_Audio.EnableTabCheckbox", _("Override global audio settings"), Common::U32String(""), kCmdGlobalAudioOverride);
@@ -307,9 +307,9 @@ EditGameDialog::EditGameDialog(const String &domain)
 
 	// GUI:  Button + Label for the game path
 	if (g_system->getOverlayWidth() > 320)
-		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", (_("Game Path:")), Common::U32String(""), kCmdGameBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _("Game Path:"), Common::U32String(""), kCmdGameBrowser);
 	else
-		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", (_c("Game Path:", "lowres")), Common::U32String(""), kCmdGameBrowser);
+		new ButtonWidget(tab, "GameOptions_Paths.Gamepath", _c("Game Path:", "lowres"), Common::U32String(""), kCmdGameBrowser);
 	_gamePathWidget = new StaticTextWidget(tab, "GameOptions_Paths.GamepathText", gamePath);
 
 	// GUI:  Button + Label for the additional path
@@ -337,7 +337,7 @@ EditGameDialog::EditGameDialog(const String &domain)
 		const MetaEngine &metaEngine = plugin->get<MetaEngine>();
 		Common::AchievementsInfo achievementsInfo = metaEngine.getAchievementsInfo(domain);
 		if (achievementsInfo.descriptions.size() > 0) {
-			tab->addTab((_("Achievements")), "GameOptions_Achievements");
+			tab->addTab(_("Achievements"), "GameOptions_Achievements");
 			addAchievementsControls(tab, "GameOptions_Achievements.", achievementsInfo);
 		}
 	}
@@ -438,7 +438,7 @@ void EditGameDialog::open() {
 }
 
 void EditGameDialog::apply() {
-	ConfMan.set("description", Common::convertFromU32String(_descriptionWidget->getEditString()), _domain);
+	ConfMan.set("description", _descriptionWidget->getEditString(), _domain);
 
 	Common::Language lang = (Common::Language)_langPopUp->getSelectedTag();
 	if (lang < 0)
@@ -448,17 +448,17 @@ void EditGameDialog::apply() {
 
 	U32String gamePath(_gamePathWidget->getLabel());
 	if (!gamePath.empty())
-		ConfMan.set("path", gamePath.encode(), _domain);
+		ConfMan.set("path", gamePath, _domain);
 
 	U32String extraPath(_extraPathWidget->getLabel());
 	if (!extraPath.empty() && (extraPath != _c("None", "path")))
-		ConfMan.set("extrapath", extraPath.encode(), _domain);
+		ConfMan.set("extrapath", extraPath, _domain);
 	else
 		ConfMan.removeKey("extrapath", _domain);
 
 	U32String savePath(_savePathWidget->getLabel());
 	if (!savePath.empty() && (savePath != _("Default")))
-		ConfMan.set("savepath", savePath.encode(), _domain);
+		ConfMan.set("savepath", savePath, _domain);
 	else
 		ConfMan.removeKey("savepath", _domain);
 
diff --git a/gui/error.cpp b/gui/error.cpp
index 3cfc0ef020..ca7c487027 100644
--- a/gui/error.cpp
+++ b/gui/error.cpp
@@ -33,7 +33,7 @@ void displayErrorDialog(const Common::U32String &text) {
 	alert.runModal();
 }
 
-void displayErrorDialog(const Common::Error &error, Common::U32String extraText) {
+void displayErrorDialog(const Common::Error &error, const Common::U32String &extraText) {
 	Common::U32String errorText(extraText);
 	errorText += Common::U32String(" ");
 	errorText += _(error.getDesc());
diff --git a/gui/error.h b/gui/error.h
index 1da53d9e19..f97faafbe9 100644
--- a/gui/error.h
+++ b/gui/error.h
@@ -33,7 +33,7 @@ namespace GUI {
  * @param error error code
  * @param extraText extra text to be displayed in addition to default string description(optional)
  */
-void displayErrorDialog(const Common::Error &error, Common::U32String = Common::U32String(""));
+void displayErrorDialog(const Common::Error &error, const Common::U32String &extraText = Common::U32String(""));
 
 /**
  * Displays an error dialog for a given message.
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 7dc35edd97..c48c00faa7 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -163,7 +163,7 @@ void LauncherDialog::build() {
 			new ButtonWidget(this, "Launcher.RemoveGameButton", _("~R~emove Game"), _("Remove game from the list. The game data files stay intact"), kRemoveGameCmd);
 	} else {
 		DropdownButtonWidget *addButton =
-			new DropdownButtonWidget(this, "Launcher.AddGameButton", (_c("~A~dd Game...", "lowres")), _("Add games to the list"), kAddGameCmd);
+			new DropdownButtonWidget(this, "Launcher.AddGameButton", _c("~A~dd Game...", "lowres"), _("Add games to the list"), kAddGameCmd);
 		addButton->appendEntry(_c("Mass Add...", "lowres"), kMassAddGameCmd);
 		_addButton = addButton;
 
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index cee29071c4..956f5f24a6 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -73,10 +73,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
 	// new StaticTextWidget(this, "massadddialog_caption", "Mass Add Dialog");
 
 	_dirProgressText = new StaticTextWidget(this, "MassAdd.DirProgressText",
-											_("... progress ..."));
+						_("... progress ..."));
 
 	_gameProgressText = new StaticTextWidget(this, "MassAdd.GameProgressText",
-											_("... progress ..."));
+						_("... progress ..."));
 
 	_dirProgressText->setAlign(Graphics::kTextAlignCenter);
 	_gameProgressText->setAlign(Graphics::kTextAlignCenter);
@@ -86,10 +86,10 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
 	_list->setNumberingMode(kListNumberingOff);
 	_list->setList(l);
 
-	_okButton = new ButtonWidget(this, "MassAdd.Ok", Common::U32String("Ok"), Common::U32String(""), kOkCmd, Common::ASCII_RETURN);
+	_okButton = new ButtonWidget(this, "MassAdd.Ok", _("OK"), Common::U32String(""), kOkCmd, Common::ASCII_RETURN);
 	_okButton->setEnabled(false);
 
-	new ButtonWidget(this, "MassAdd.Cancel", Common::U32String("Cancel"), Common::U32String(""), kCancelCmd, Common::ASCII_ESCAPE);
+	new ButtonWidget(this, "MassAdd.Cancel", _("Cancel"), Common::U32String(""), kCancelCmd, Common::ASCII_ESCAPE);
 
 	// Build a map from all configured game paths to the targets using them
 	const Common::ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
diff --git a/gui/message.cpp b/gui/message.cpp
index 401cb30ce0..827a0d0511 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -39,7 +39,7 @@ enum {
 
 // TODO: The default button should be visibly distinct from the alternate button
 
-MessageDialog::MessageDialog(const Common::U32String &message, Common::U32String defaultButton, Common::U32String altButton, Graphics::TextAlign alignment, const char *url)
+MessageDialog::MessageDialog(const Common::U32String &message, const Common::U32String &defaultButton, const Common::U32String &altButton, Graphics::TextAlign alignment, const char *url)
 	: Dialog(30, 20, 260, 124) {
 
 	_url = url;
@@ -93,11 +93,15 @@ MessageDialog::MessageDialog(const Common::U32String &message, Common::U32String
 		okButtonPos = cancelButtonPos = (_w - buttonWidth) / 2;
 	}
 
-	if (!defaultButton.empty())
-		new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, defaultButton, Common::U32String(""), kOkCmd, Common::ASCII_RETURN);	// Confirm dialog
+	if (!defaultButton.empty()) {
+		// Confirm dialog
+		new ButtonWidget(this, okButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, defaultButton, Common::U32String(""), kOkCmd, Common::ASCII_RETURN);
+	}
 
-	if (!altButton.empty())
-		new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, altButton, Common::U32String(""), kCancelCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+	if (!altButton.empty()) {
+		// Cancel dialog
+		new ButtonWidget(this, cancelButtonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, altButton, Common::U32String(""), kCancelCmd, Common::ASCII_ESCAPE);
+	}
 }
 
 MessageDialog::MessageDialog(const char *message, const char *defaultButton, const char *altButton, Graphics::TextAlign alignment)
diff --git a/gui/message.h b/gui/message.h
index 89ccd8ff25..80ad8216e4 100644
--- a/gui/message.h
+++ b/gui/message.h
@@ -41,7 +41,7 @@ enum {
  */
 class MessageDialog : public Dialog {
 public:
-	MessageDialog(const Common::U32String &message, Common::U32String defaultButton = Common::U32String("OK"), Common::U32String altButton = Common::U32String(""), Graphics::TextAlign alignment = Graphics::kTextAlignCenter, const char *url = nullptr);
+	MessageDialog(const Common::U32String &message, const Common::U32String &defaultButton = Common::U32String("OK"), const Common::U32String &altButton = Common::U32String(""), Graphics::TextAlign alignment = Graphics::kTextAlignCenter, const char *url = nullptr);
 	MessageDialog(const char *message, const char *defaultButton = "OK", const char *altButton = "", Graphics::TextAlign alignment = Graphics::kTextAlignCenter, const char *url = nullptr);
 
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
diff --git a/gui/options.cpp b/gui/options.cpp
index 68b60e4a82..ecd48842fc 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1155,13 +1155,13 @@ void OptionsDialog::addAchievementsControls(GuiObject *boss, const Common::Strin
 			}
 
 			CheckboxWidget *checkBox;
-			checkBox = new CheckboxWidget(scrollContainer, lineHeight, yPos, width, yStep, Common::convertToU32String(info.descriptions[idx].title));
+			checkBox = new CheckboxWidget(scrollContainer, lineHeight, yPos, width, yStep, Common::U32String(info.descriptions[idx].title));
 			checkBox->setEnabled(false);
 			checkBox->setState(isAchieved);
 			yPos += yStep;
 
 	        if (info.descriptions[idx].comment && strlen(info.descriptions[idx].comment) > 0) {
-				new StaticTextWidget(scrollContainer, lineHeight + descrDelta, yPos, width - descrDelta, yStep, Common::convertToU32String(info.descriptions[idx].comment), Graphics::kTextAlignStart, Common::U32String(""), ThemeEngine::kFontStyleNormal);
+				new StaticTextWidget(scrollContainer, lineHeight + descrDelta, yPos, width - descrDelta, yStep, Common::U32String(info.descriptions[idx].comment), Graphics::kTextAlignStart, Common::U32String(""), ThemeEngine::kFontStyleNormal);
 				yPos += yStep;
 			}
 
@@ -1486,7 +1486,7 @@ bool OptionsDialog::loadMusicDeviceSetting(PopUpWidget *popup, Common::String se
 		return true;
 
 	if (_domain != Common::ConfigManager::kApplicationDomain || ConfMan.hasKey(setting, _domain) || preferredType) {
-		const Common::U32String drv = ConfMan.get(setting, (_domain != Common::ConfigManager::kApplicationDomain && !ConfMan.hasKey(setting, _domain)) ? Common::ConfigManager::kApplicationDomain : _domain);
+		const Common::String drv = ConfMan.get(setting, (_domain != Common::ConfigManager::kApplicationDomain && !ConfMan.hasKey(setting, _domain)) ? Common::ConfigManager::kApplicationDomain : _domain);
 		const PluginList p = MusicMan.getPlugins();
 
 		for (PluginList::const_iterator m = p.begin(); m != p.end(); ++m) {
@@ -1513,7 +1513,7 @@ void OptionsDialog::saveMusicDeviceSetting(PopUpWidget *popup, Common::String se
 		MusicDevices i = (*m)->get<MusicPluginObject>().getDevices();
 		for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
 			if (d->getHandle() == popup->getSelectedTag()) {
-				ConfMan.set(setting, d->getCompleteId().encode().c_str(), _domain);
+				ConfMan.set(setting, d->getCompleteId(), _domain);
 				found = true;
 				break;
 			}
@@ -1851,24 +1851,24 @@ void GlobalOptionsDialog::build() {
 
 #if !defined(__DC__)
 	// Set _savePath to the current save path
-	Common::U32String savePath(ConfMan.get("savepath", _domain));
-	Common::U32String themePath(ConfMan.get("themepath", _domain));
-	Common::U32String extraPath(ConfMan.get("extrapath", _domain));
+	Common::String savePath(ConfMan.get("savepath", _domain));
+	Common::String themePath(ConfMan.get("themepath", _domain));
+	Common::String extraPath(ConfMan.get("extrapath", _domain));
 
 	if (savePath.empty() || !ConfMan.hasKey("savepath", _domain)) {
-		_savePath->setLabel((_("Default")));
+		_savePath->setLabel(_("Default"));
 	} else {
 		_savePath->setLabel(savePath);
 	}
 
 	if (themePath.empty() || !ConfMan.hasKey("themepath", _domain)) {
-		_themePath->setLabel((_c("None", "path")));
+		_themePath->setLabel(_c("None", "path"));
 	} else {
 		_themePath->setLabel(themePath);
 	}
 
 	if (extraPath.empty() || !ConfMan.hasKey("extrapath", _domain)) {
-		_extraPath->setLabel((_c("None", "path")));
+		_extraPath->setLabel(_c("None", "path"));
 	} else {
 		_extraPath->setLabel(extraPath);
 	}
@@ -1900,7 +1900,7 @@ void GlobalOptionsDialog::build() {
 #ifdef USE_SDL_NET
 	Common::String rootPath(ConfMan.get("rootpath", "cloud"));
 	if (rootPath.empty() || !ConfMan.hasKey("rootpath", "cloud")) {
-		_rootPath->setLabel((_c("None", "path")));
+		_rootPath->setLabel(_c("None", "path"));
 	} else {
 		_rootPath->setLabel(rootPath);
 	}
@@ -1982,10 +1982,10 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 
 	if (!lowres) {
 		for (uint i = 1; i < GUI::ThemeEngine::_rendererModesSize; ++i)
-			_rendererPopUp->appendEntry((_(GUI::ThemeEngine::_rendererModes[i].name)), GUI::ThemeEngine::_rendererModes[i].mode);
+			_rendererPopUp->appendEntry(_(GUI::ThemeEngine::_rendererModes[i].name), GUI::ThemeEngine::_rendererModes[i].mode);
 	} else {
 		for (uint i = 1; i < GUI::ThemeEngine::_rendererModesSize; ++i)
-			_rendererPopUp->appendEntry((_(GUI::ThemeEngine::_rendererModes[i].shortname)), GUI::ThemeEngine::_rendererModes[i].mode);
+			_rendererPopUp->appendEntry(_(GUI::ThemeEngine::_rendererModes[i].shortname), GUI::ThemeEngine::_rendererModes[i].mode);
 	}
 
 	if (!lowres)
@@ -2011,12 +2011,12 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 #ifdef USE_DETECTLANG
 	_guiLanguagePopUp->appendEntry(_("<default>"), Common::kTranslationAutodetectId);
 #endif // USE_DETECTLANG
-	_guiLanguagePopUp->appendEntry(Common::U32String("English"), Common::kTranslationBuiltinId);
-	_guiLanguagePopUp->appendEntry(Common::U32String(""), 0);
+	_guiLanguagePopUp->appendEntry("English", Common::kTranslationBuiltinId);
+	_guiLanguagePopUp->appendEntry("", 0);
 	Common::TLangArray languages = TransMan.getSupportedLanguageNames();
 	Common::TLangArray::iterator lang = languages.begin();
 	while (lang != languages.end()) {
-		_guiLanguagePopUp->appendEntry(Common::convertToU32String(lang->name), lang->id);
+		_guiLanguagePopUp->appendEntry(lang->name, lang->id);
 		lang++;
 	}
 
@@ -2168,7 +2168,7 @@ void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::Stri
 #ifdef USE_TTS
 void GlobalOptionsDialog::addAccessibilityControls(GuiObject *boss, const Common::String &prefix) {
 	_ttsCheckbox = new CheckboxWidget(boss, prefix + "TTSCheckbox",
-		_("Use Text to speech"), _("Will read text in gui on mouse over."));
+			_("Use Text to speech"), _("Will read text in gui on mouse over."));
 	if (ConfMan.hasKey("tts_enabled"))
 		_ttsCheckbox->setState(ConfMan.getBool("tts_enabled", _domain));
 	else
@@ -2486,7 +2486,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 			Common::FSNode file(browser.getResult());
 			_soundFont->setLabel(file.getPath());
 
-			if (!file.getPath().empty() && (Common::convertToU32String(file.getPath().c_str()) != _c("None", "path")))
+			if (!file.getPath().empty() && (file.getPath().decode() != _c("None", "path")))
 				_soundFontClearButton->setEnabled(true);
 			else
 				_soundFontClearButton->setEnabled(false);
@@ -2572,9 +2572,9 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		break;
 	}
 	case kConnectStorageCmd: {
-		Common::U32String code("");
+		Common::String code = "";
 		if (_storageWizardCodeBox)
-			code = _storageWizardCodeBox->getEditString();
+			code = _storageWizardCodeBox->getEditString().encode();
 		if (code.size() == 0)
 			return;
 
@@ -2605,7 +2605,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
 		if (_storageWizardConnectionStatusHint)
 			_storageWizardConnectionStatusHint->setLabel(_("Connecting..."));
 		CloudMan.connectStorage(
-			_selectedStorageIndex, Common::convertFromU32String(code),
+			_selectedStorageIndex, code,
 			new Common::Callback<GlobalOptionsDialog, Networking::ErrorResponse>(this, &GlobalOptionsDialog::storageConnectionCallback)
 		);
 		_connectingStorage = true;
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index 3abedb7d23..add657b647 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -70,8 +70,8 @@ enum {
 PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 	new StaticTextWidget(this, "Predictive.Headline", Common::U32String("Enter Text"));
 
-	_button[kCancelAct] =  new ButtonWidget(this, "Predictive.Cancel",  (_("Cancel"))   , Common::U32String(""), kCancelCmd);
-	_button[kOkAct] =      new ButtonWidget(this, "Predictive.OK",      (_("Ok"))       , Common::U32String(""), kOkCmd);
+	_button[kCancelAct] =  new ButtonWidget(this, "Predictive.Cancel",  _("Cancel")   , Common::U32String(""), kCancelCmd);
+	_button[kOkAct] =      new ButtonWidget(this, "Predictive.OK",      _("Ok")       , Common::U32String(""), kOkCmd);
 
 	if (g_gui.useRTL()) {
 		/** If using RTL, swap the internal name of odd columns, to be flipped again when drawing.
@@ -103,8 +103,8 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 	}
 
 	// I18N: You must leave "#" as is, only word 'next' is translatable
-	_button[kNextAct] =    new ButtonWidget(this, "Predictive.Next",    (_("#  next"))  , Common::U32String(""), kNextCmd);
-	_button[kAddAct] =     new ButtonWidget(this, "Predictive.Add",     (_("add"))      , Common::U32String(""), kAddCmd);
+	_button[kNextAct] =    new ButtonWidget(this, "Predictive.Next",    _("#  next")  , Common::U32String(""), kNextCmd);
+	_button[kAddAct]  =    new ButtonWidget(this, "Predictive.Add",     _("add")      , Common::U32String(""), kAddCmd);
 	_button[kAddAct]->setEnabled(false);
 
 #ifndef DISABLE_FANCY_THEMES
@@ -114,7 +114,7 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 		((PicButtonWidget *)_button[kDelAct])->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelButton));
 	} else
 #endif
-		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , (_("<")) , Common::U32String(""), kDelCmd);
+		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , _("<") , Common::U32String(""), kDelCmd);
 	// I18N: Pre means 'Predictive', leave '*' as is
 	_button[kModeAct] = new ButtonWidget(this, "Predictive.Pre", _("*  Pre"), Common::U32String(""), kModeCmd);
 	_editText = new EditTextWidget(this, "Predictive.Word", _search, Common::U32String(""), 0, 0);
@@ -190,7 +190,7 @@ void PredictiveDialog::reflowLayout() {
 		((PicButtonWidget *)_button[kDelAct])->useThemeTransparency(true);
 		((PicButtonWidget *)_button[kDelAct])->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelButton));
 	} else {
-		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , (_("<")) , Common::U32String(""), kDelCmd);
+		_button[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , _("<") , Common::U32String(""), kDelCmd);
 	}
 #endif
 
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 58112a4726..c4a28b7da5 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -49,7 +49,7 @@ enum {
 };
 
 SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(bool canRunInBackground): Dialog("SaveLoadCloudSyncProgress"), _close(false) {
-	_label = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.TitleText", Common::U32String("Downloading saves..."));
+	_label = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.TitleText", _("Downloading saves..."));
 	uint32 progress = (uint32)(100 * CloudMan.getSyncDownloadingProgress());
 	_progressBar = new SliderWidget(this, "SaveLoadCloudSyncProgress.ProgressBar");
 	_progressBar->setMinValue(0);
@@ -57,8 +57,8 @@ SaveLoadCloudSyncProgressDialog::SaveLoadCloudSyncProgressDialog(bool canRunInBa
 	_progressBar->setValue(progress);
 	_progressBar->setEnabled(false);
 	_percentLabel = new StaticTextWidget(this, "SaveLoadCloudSyncProgress.PercentText", Common::String::format("%u %%", progress));
-	new ButtonWidget(this, "SaveLoadCloudSyncProgress.Cancel", Common::U32String("Cancel"), Common::U32String(""), kCancelSyncCmd, Common::ASCII_ESCAPE);	// Cancel dialog
-	ButtonWidget *backgroundButton = new ButtonWidget(this, "SaveLoadCloudSyncProgress.Background", Common::U32String("Run in background"), Common::U32String(""), kBackgroundSyncCmd, Common::ASCII_RETURN);	// Confirm dialog
+	new ButtonWidget(this, "SaveLoadCloudSyncProgress.Cancel", _("Cancel"), Common::U32String(""), kCancelSyncCmd, Common::ASCII_ESCAPE);	// Cancel dialog
+	ButtonWidget *backgroundButton = new ButtonWidget(this, "SaveLoadCloudSyncProgress.Background", _("Run in background"), Common::U32String(""), kBackgroundSyncCmd, Common::ASCII_RETURN);	// Confirm dialog
 	backgroundButton->setEnabled(canRunInBackground);
 	g_gui.scheduleTopDialogRedraw();
 }
@@ -348,7 +348,7 @@ void SaveLoadChooserDialog::addChooserButtons() {
 	}
 }
 
-ButtonWidget *SaveLoadChooserDialog::createSwitchButton(const Common::String &name, Common::U32String desc, Common::U32String tooltip, const char *image, uint32 cmd) {
+ButtonWidget *SaveLoadChooserDialog::createSwitchButton(const Common::String &name, const Common::U32String &desc, const Common::U32String &tooltip, const char *image, uint32 cmd) {
 	ButtonWidget *button;
 
 #ifndef DISABLE_FANCY_THEMES
@@ -683,7 +683,7 @@ void SaveLoadChooserSimple::updateSaveList() {
 		saveSlot = x->getSaveSlot();
 		if (curSlot < saveSlot) {
 			while (curSlot < saveSlot) {
-				SaveStateDescriptor dummySave(curSlot, Common::U32String(""));
+				SaveStateDescriptor dummySave(curSlot, "");
 				_saveList.insert_at(curSlot, dummySave);
 				saveNames.push_back(dummySave.getDescription());
 				colors.push_back(ThemeEngine::kFontColorNormal);
@@ -727,7 +727,7 @@ void SaveLoadChooserSimple::updateSaveList() {
 	Common::String emptyDesc;
 	for (int i = curSlot; i <= maximumSaveSlots; i++) {
 		saveNames.push_back(emptyDesc);
-		SaveStateDescriptor dummySave(i, Common::U32String(""));
+		SaveStateDescriptor dummySave(i, "");
 		_saveList.push_back(dummySave);
 		colors.push_back(ThemeEngine::kFontColorNormal);
 	}
@@ -1102,7 +1102,7 @@ void SaveLoadChooserGrid::updateSaves() {
 		} else {
 			curButton.button->setGfx(kThumbnailWidth, kThumbnailHeight2, 0, 0, 0);
 		}
-		curButton.description->setLabel(Common::String::format("%d. %s", saveSlot, desc.getDescription().encode().c_str()));
+		curButton.description->setLabel(Common::U32String(Common::String::format("%d. ", saveSlot)) + desc.getDescription());
 
 		Common::U32String tooltip(_("Name: "));
 		tooltip += desc.getDescription();
@@ -1165,7 +1165,7 @@ SavenameDialog::SavenameDialog()
 	new ButtonWidget(this, "SavenameDialog.Cancel", _("Cancel"), Common::U32String(""), kCloseCmd);
 	new ButtonWidget(this, "SavenameDialog.Ok", _("OK"), Common::U32String(""), kOKCmd);
 
-	_description = new EditTextWidget(this, "SavenameDialog.Description", Common::String(), Common::U32String(""), 0, kOKCmd);
+	_description = new EditTextWidget(this, "SavenameDialog.Description", Common::U32String(), Common::U32String(""), 0, kOKCmd);
 
 	_targetSlot = 0;
 }
diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h
index de517a8caf..aaea785b23 100644
--- a/gui/saveload-dialog.h
+++ b/gui/saveload-dialog.h
@@ -126,7 +126,7 @@ protected:
 	ButtonWidget *_gridButton;
 
 	void addChooserButtons();
-	ButtonWidget *createSwitchButton(const Common::String &name, Common::U32String desc, Common::U32String tooltip, const char *image, uint32 cmd = 0);
+	ButtonWidget *createSwitchButton(const Common::String &name, const Common::U32String &desc, const Common::U32String &tooltip, const char *image, uint32 cmd = 0);
 #endif // !DISABLE_SAVELOADCHOOSER_GRID
 };
 
diff --git a/gui/widget.cpp b/gui/widget.cpp
index f886e10e1a..da2f8406d9 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -812,13 +812,13 @@ int SliderWidget::posToValue(int pos) {
 
 #pragma mark -
 
-GraphicsWidget::GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip)
+GraphicsWidget::GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &tooltip)
 	: Widget(boss, x, y, w, h, tooltip), _gfx(), _alpha(255), _transparency(false) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG);
 	_type = kGraphicsWidget;
 }
 
-GraphicsWidget::GraphicsWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip)
+GraphicsWidget::GraphicsWidget(GuiObject *boss, const Common::String &name, const Common::U32String &tooltip)
 	: Widget(boss, name, tooltip), _gfx(), _alpha(255), _transparency(false) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG);
 	_type = kGraphicsWidget;
diff --git a/gui/widget.h b/gui/widget.h
index a27e53ce78..9c4810df39 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -172,6 +172,7 @@ public:
 	bool hasTooltip() const { return !_tooltip.empty(); }
 	const Common::U32String &getTooltip() const { return _tooltip; }
 	void setTooltip(const Common::U32String &tooltip) { _tooltip = tooltip; }
+	void setTooltip(const Common::String &tooltip) { _tooltip = Common::U32String(tooltip); }
 
 	virtual bool containsWidget(Widget *) const { return false; }
 
@@ -413,8 +414,8 @@ protected:
 /* GraphicsWidget */
 class GraphicsWidget : public Widget {
 public:
-	GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, Common::U32String tooltip = Common::U32String(""));
-	GraphicsWidget(GuiObject *boss, const Common::String &name, Common::U32String tooltip = Common::U32String(""));
+	GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, const Common::U32String &tooltip = Common::U32String(""));
+	GraphicsWidget(GuiObject *boss, const Common::String &name, const Common::U32String &tooltip = Common::U32String(""));
 	~GraphicsWidget() override;
 
 	void setGfx(const Graphics::Surface *gfx);
diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp
index da480d7dda..7c13d54d4c 100644
--- a/gui/widgets/edittext.cpp
+++ b/gui/widgets/edittext.cpp
@@ -28,7 +28,7 @@
 
 namespace GUI {
 
-EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &text, U32String tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font)
+EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &text, const U32String &tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font)
 	: EditableWidget(boss, x, y - 1, w, h + 2, tooltip, cmd) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE);
 	_type = kEditTextWidget;
@@ -40,7 +40,7 @@ EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, cons
 	_leftPadding = _rightPadding = 0;
 }
 
-EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const U32String &text, U32String tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font)
+EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const U32String &text, const U32String &tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font)
 	: EditableWidget(boss, name, tooltip, cmd) {
 	setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE);
 	_type = kEditTextWidget;
diff --git a/gui/widgets/edittext.h b/gui/widgets/edittext.h
index fa9b84cc57..da4e6de90f 100644
--- a/gui/widgets/edittext.h
+++ b/gui/widgets/edittext.h
@@ -41,8 +41,8 @@ protected:
 	int				_rightPadding;
 
 public:
-	EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &text, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
-	EditTextWidget(GuiObject *boss, const String &name, const U32String &text, Common::U32String tooltip = Common::U32String(""), uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
+	EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const U32String &text, const U32String &tooltip = Common::U32String(""), uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
+	EditTextWidget(GuiObject *boss, const String &name, const U32String &text, const U32String &tooltip = Common::U32String(""), uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
 
 	void setEditString(const U32String &str) override;
 


Commit: 12e4f871a3e5b305ab90c74a13ae0eec6f8d8646
    https://github.com/scummvm/scummvm/commit/12e4f871a3e5b305ab90c74a13ae0eec6f8d8646
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Improve u32 in all engine subsystems

- Common: add wordWrap function to ustr.cpp
- Bladerunner: Explicitly state we have a U32String in subs (same as Subtitles::loadOuttakeSubsText)
- Don't use translations for engine specific "put strings", because they might not support.
- SCI: Use const references for showScummVMDialog
- SCUMM:
-- Don't use translation in md5 warning. left comments with the translated version.
-- Remove some redundant headers in help.cpp
-- Don't use translation in handleSaveload when printing to console
-- Also, display success transaction correctly via u32::format
- TESTBED: Use fake constructor when setting label of button
- SKY: Correctly use translation when using SaveStateDescription
- ULTIMA: Don't use translations when display_string
- ENGINES:
-- GenerateUnknownGameReport correctly, with proper translations.
-- There was an error, where a function had been declared twice, in a header file. Correct this.

Changed paths:
    common/ustr.cpp
    common/ustr.h
    engines/bladerunner/subtitles.cpp
    engines/game.cpp
    engines/game.h
    engines/glk/adrift/os_glk.cpp
    engines/glk/advsys/vm.cpp
    engines/glk/comprehend/game.cpp
    engines/glk/glk_api.cpp
    engines/glk/zcode/zcode.cpp
    engines/sci/engine/kgraphics.cpp
    engines/sci/engine/kgraphics32.cpp
    engines/sci/engine/kmisc.cpp
    engines/sci/engine/savegame.cpp
    engines/sci/graphics/video32.cpp
    engines/sci/resource.cpp
    engines/sci/sci.cpp
    engines/scumm/detection.cpp
    engines/scumm/dialogs.cpp
    engines/scumm/dialogs.h
    engines/scumm/help.cpp
    engines/scumm/scumm.cpp
    engines/sky/detection.cpp
    engines/testbed/sound.cpp
    engines/ultima/nuvie/nuvie.cpp


diff --git a/common/ustr.cpp b/common/ustr.cpp
index d7b9d0c139..2e412775b2 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -496,6 +496,44 @@ U32String operator+(const U32String &x, const U32String &y) {
 	return temp;
 }
 
+void U32String::wordWrap(const uint32 maxLength) {
+	if (_size < maxLength) {
+		return;
+	}
+
+	makeUnique();
+
+	const uint32 kNoSpace = 0xFFFFFFFF;
+
+	uint32 i = 0;
+	while (i < _size) {
+		uint32 lastSpace = kNoSpace;
+		uint32 x = 0;
+		while (i < _size && x <= maxLength) {
+			const char c = _str[i];
+			if (c == '\n') {
+				lastSpace = kNoSpace;
+				x = 0;
+			} else {
+				if (Common::isSpace(c)) {
+					lastSpace = i;
+				}
+				++x;
+			}
+			++i;
+		}
+
+		if (x > maxLength) {
+			if (lastSpace == kNoSpace) {
+				insertChar('\n', i - 1);
+			} else {
+				setChar('\n', lastSpace);
+				i = lastSpace + 1;
+			}
+		}
+	}
+}
+
 uint64 U32String::asUint64() const {
 	uint64 result = 0;
 	for (uint32 i = 0; i < _size; ++i) {
diff --git a/common/ustr.h b/common/ustr.h
index 7efbca5c11..f0ff4257e3 100644
--- a/common/ustr.h
+++ b/common/ustr.h
@@ -232,6 +232,8 @@ public:
     /** Python-like method **/
     String encode(CodePage page = kUtf8) const;
 
+	void wordWrap(const uint32 maxLength);
+
 	uint64 asUint64() const;
 
 	void trim();
diff --git a/engines/bladerunner/subtitles.cpp b/engines/bladerunner/subtitles.cpp
index d9d97f4612..4937ae72fe 100644
--- a/engines/bladerunner/subtitles.cpp
+++ b/engines/bladerunner/subtitles.cpp
@@ -270,7 +270,7 @@ void Subtitles::loadOuttakeSubsText(const Common::String &outtakesName, int fram
  * Used for debug purposes mainly.
  */
 void Subtitles::setGameSubsText(Common::String dbgQuote, bool forceShowWhenNoSpeech) {
-	_currentText = _useUTF8 ? Common::convertUtf8ToUtf32(dbgQuote) : Common::convertToU32String(dbgQuote.c_str());
+	_currentText = _useUTF8 ? Common::convertUtf8ToUtf32(dbgQuote) : Common::U32String(dbgQuote);
 	_forceShowWhenNoSpeech = forceShowWhenNoSpeech; // overrides not showing subtitles when no one is speaking
 }
 
diff --git a/engines/game.cpp b/engines/game.cpp
index 6f2c7c25b8..ae997fce89 100644
--- a/engines/game.cpp
+++ b/engines/game.cpp
@@ -161,25 +161,26 @@ DetectedGames DetectionResults::listDetectedGames() const {
 	return _detectedGames;
 }
 
-Common::String DetectionResults::generateUnknownGameReport(bool translate, uint32 wordwrapAt) const {
+Common::U32String DetectionResults::generateUnknownGameReport(bool translate, uint32 wordwrapAt) const {
 	return ::generateUnknownGameReport(_detectedGames, translate, false, wordwrapAt);
 }
 
-Common::String generateUnknownGameReport(const DetectedGames &detectedGames, bool translate, bool fullPath, uint32 wordwrapAt) {
+Common::U32String generateUnknownGameReport(const DetectedGames &detectedGames, bool translate, bool fullPath, uint32 wordwrapAt) {
 	assert(!detectedGames.empty());
 
 	const char *reportStart = _s("The game in '%s' seems to be an unknown game variant.\n\n"
-								"Please report the following data to the ScummVM team at %s "
-								"along with the name of the game you tried to add and "
-								"its version, language, etc.:");
+					"Please report the following data to the ScummVM team at %s "
+					"along with the name of the game you tried to add and "
+					"its version, language, etc.:");
 	const char *reportEngineHeader = _s("Matched game IDs for the %s engine:");
 
-	Common::String report = Common::String::format(
-			translate ? Common::convertFromU32String(_(reportStart)).c_str() : reportStart,
+	Common::U32String report = Common::U32String::format(
+			translate ? _(reportStart) : Common::U32String(reportStart),
 			fullPath ? detectedGames[0].path.c_str() : detectedGames[0].shortPath.c_str(),
 			"https://bugs.scummvm.org/"
 	);
-	report += "\n";
+
+	report += Common::U32String("\n");
 
 	FilePropertiesMap matchedFiles;
 
@@ -193,15 +194,15 @@ Common::String generateUnknownGameReport(const DetectedGames &detectedGames, boo
 			currentEngineId = game.engineId;
 
 			// If the engine is not the same as for the previous entry, print an engine line header
-			report += "\n";
-			report += Common::String::format(
-					translate ? Common::convertFromU32String(_(reportEngineHeader)).c_str() : reportEngineHeader,
+			report += Common::U32String("\n");
+			report += Common::U32String::format(
+					translate ? _(reportEngineHeader) : Common::U32String(reportEngineHeader),
 					game.engineId.c_str()
 			);
-			report += " ";
+			report += Common::U32String(" ");
 
 		} else {
-			report += ", ";
+			report += Common::U32String(", ");
 		}
 
 		// Add the gameId to the list of matched games for the engine
@@ -219,17 +220,17 @@ Common::String generateUnknownGameReport(const DetectedGames &detectedGames, boo
 		report.wordWrap(wordwrapAt);
 	}
 
-	report += "\n\n";
+	report += Common::U32String("\n\n");
 
 	for (FilePropertiesMap::const_iterator file = matchedFiles.begin(); file != matchedFiles.end(); ++file)
 		report += Common::String::format("  {\"%s\", 0, \"%s\", %d},\n", file->_key.c_str(), file->_value.md5.c_str(), file->_value.size);
 
-	report += "\n";
+	report += Common::U32String("\n");
 
 	return report;
 }
 
-Common::String generateUnknownGameReport(const DetectedGame &detectedGame, bool translate, bool fullPath, uint32 wordwrapAt) {
+Common::U32String generateUnknownGameReport(const DetectedGame &detectedGame, bool translate, bool fullPath, uint32 wordwrapAt) {
 	DetectedGames detectedGames;
 	detectedGames.push_back(detectedGame);
 
diff --git a/engines/game.h b/engines/game.h
index 57c5e88237..8d0b013e12 100644
--- a/engines/game.h
+++ b/engines/game.h
@@ -26,6 +26,7 @@
 #include "common/array.h"
 #include "common/hash-str.h"
 #include "common/str.h"
+#include "common/ustr.h"
 #include "common/str-array.h"
 #include "common/language.h"
 #include "common/platform.h"
@@ -233,7 +234,7 @@ public:
 	 *
 	 * @see ::generateUnknownGameReport
 	 */
-	Common::String generateUnknownGameReport(bool translate, uint32 wordwrapAt = 0) const;
+	Common::U32String generateUnknownGameReport(bool translate, uint32 wordwrapAt = 0) const;
 
 private:
 	DetectedGames _detectedGames;
@@ -248,7 +249,7 @@ private:
  *                 of last component of the path is included
  * @param wordwrapAt word wrap the text part of the report after a number of characters
  */
-Common::String generateUnknownGameReport(const DetectedGames &detectedGames, bool translate, bool fullPath, uint32 wordwrapAt = 0);
-Common::String generateUnknownGameReport(const DetectedGame &detectedGame, bool translate, bool fullPath, uint32 wordwrapAt = 0);
+Common::U32String generateUnknownGameReport(const DetectedGames &detectedGames, bool translate, bool fullPath, uint32 wordwrapAt = 0);
+Common::U32String generateUnknownGameReport(const DetectedGame &detectedGame, bool translate, bool fullPath, uint32 wordwrapAt = 0);
 
 #endif
diff --git a/engines/glk/adrift/os_glk.cpp b/engines/glk/adrift/os_glk.cpp
index c5f25f76ca..c726a5d135 100644
--- a/engines/glk/adrift/os_glk.cpp
+++ b/engines/glk/adrift/os_glk.cpp
@@ -2811,7 +2811,7 @@ static int gsc_startup_code(Common::SeekableReadStream *game_stream, int restore
 		 * Display a brief loading game message; here we have to use a timeout
 		 * to ensure that the text is flushed to Glk.
 		 */
-		g_vm->glk_put_string(_("Loading game...\n").encode().c_str());
+		g_vm->glk_put_string("Loading game...\n");
 		if (g_vm->glk_gestalt(gestalt_Timer, 0)) {
 			event_t event;
 
diff --git a/engines/glk/advsys/vm.cpp b/engines/glk/advsys/vm.cpp
index 234c93ab7e..9aaf2df8f6 100644
--- a/engines/glk/advsys/vm.cpp
+++ b/engines/glk/advsys/vm.cpp
@@ -593,8 +593,8 @@ bool VM::getWord(Common::String &line) {
 		_words.push_back(iw);
 		return true;
 	} else {
-		Common::U32String msg = Common::U32String::format(_("I don't know the word \"%s\".\n"), iw._text.c_str());
-		print(msg.encode());
+		Common::String msg = Common::String::format("I don't know the word \"%s\".\n", iw._text.c_str());
+		print(msg);
 		return false;
 	}
 }
diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index 8a795cf47c..adab7b606d 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -1330,7 +1330,7 @@ void ComprehendGame::read_input() {
 
 		// Empty line, so toggle picture window visibility
 		g_comprehend->toggleGraphics();
-		g_comprehend->print(Common::convertFromU32String(_("Picture window toggled\n")).c_str());
+		g_comprehend->print("Picture window toggled\n");
 
 		_updateFlags |= UPDATE_GRAPHICS;
 		update_graphics();
diff --git a/engines/glk/glk_api.cpp b/engines/glk/glk_api.cpp
index 9de8aa6b2f..92e824c74c 100644
--- a/engines/glk/glk_api.cpp
+++ b/engines/glk/glk_api.cpp
@@ -60,7 +60,7 @@ GlkAPI::GlkAPI(OSystem *syst, const GlkGameDescription &gameDesc) :
 }
 
 void GlkAPI::glk_exit(void) {
-	glk_put_string(_("[ press any key to exit ]").encode().c_str());
+	glk_put_string("[ press any key to exit ]");
 	_events->waitForPress();
 
 	// Trigger a ScumMVM shutdown of game
diff --git a/engines/glk/zcode/zcode.cpp b/engines/glk/zcode/zcode.cpp
index 5ff22ed723..5d60cf7d60 100644
--- a/engines/glk/zcode/zcode.cpp
+++ b/engines/glk/zcode/zcode.cpp
@@ -123,7 +123,7 @@ Common::Error ZCode::loadGameState(int slot) {
 			|| h_screen_cols != old_screen_cols))
 			erase_window(1);
 	} else {
-		error("%s", ("Error reading save file"));
+		error("Error reading save file");
 	}
 
 	return Common::kNoError;
@@ -141,7 +141,7 @@ Common::Error ZCode::saveGameState(int slot, const Common::String &desc, bool is
 	bool success = q.save(*file, this, desc);
 
 	if (!success)
-		print_string(_("Error writing save file\n").encode().c_str());
+		print_string("Error writing save file\n");
 
 	return Common::kNoError;
 
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index f00c963db9..ddffc3eef9 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -70,7 +70,7 @@ static int16 adjustGraphColor(int16 color) {
 		return color;
 }
 
-int showScummVMDialog(const Common::U32String &message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true) {
+int showScummVMDialog(const Common::U32String &message, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true) {
 	Graphics::TextAlign alignment = alignCenter ? Graphics::kTextAlignCenter : Graphics::kTextAlignLeft;
 	GUI::MessageDialog dialog(message, _("OK"), altButton, alignment);
 	return dialog.runModal();
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index 0cd2e3d226..52b7b7c7fb 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -62,7 +62,7 @@
 namespace Sci {
 #ifdef ENABLE_SCI32
 
-extern int showScummVMDialog(const Common::U32String& message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String& message, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true);
 
 reg_t kBaseSetter32(EngineState *s, int argc, reg_t *argv) {
 	reg_t object = argv[0];
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 815d9416fd..a796624095 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -796,7 +796,7 @@ reg_t kPlatform(EngineState *s, int argc, reg_t *argv) {
 	return NULL_REG;
 }
 
-extern int showScummVMDialog(const Common::U32String& message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String &message, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true);
 
 #ifdef ENABLE_SCI32
 reg_t kPlatform32(EngineState *s, int argc, reg_t *argv) {
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 20692e6095..bc95224b44 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -1239,7 +1239,7 @@ bool gamestate_save(EngineState *s, Common::WriteStream *fh, const Common::Strin
 	return true;
 }
 
-extern int showScummVMDialog(const Common::U32String& message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String& message, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true);
 
 void gamestate_afterRestoreFixUp(EngineState *s, int savegameId) {
 	switch (g_sci->getGameId()) {
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp
index 04289001a8..111da4bc8d 100644
--- a/engines/sci/graphics/video32.cpp
+++ b/engines/sci/graphics/video32.cpp
@@ -65,7 +65,7 @@ bool VideoPlayer::open(const Common::String &fileName) {
 	// KQ7 2.00b videos are compressed in 24bpp Cinepak, so cannot play on a
 	// system with no RGB support
 	if (_decoder->getPixelFormat().bytesPerPixel != 1) {
-		void showScummVMDialog(const Common::U32String &message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
+		void showScummVMDialog(const Common::U32String &message, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true);
 		showScummVMDialog(Common::U32String::format(_("Cannot play back %dbpp video on a system with maximum color depth of 8bpp"), _decoder->getPixelFormat().bpp()));
 		_decoder->close();
 		return false;
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 79bc64ce9a..e6f25432fd 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -813,7 +813,7 @@ void ResourceManager::addScriptChunkSources() {
 #endif
 }
 
-extern int showScummVMDialog(const Common::U32String& message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String &essage, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true);
 
 void ResourceManager::scanNewSources() {
 	_hasBadResources = false;
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index ae4e6b4140..07cb8f3952 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -256,7 +256,7 @@ SciEngine::~SciEngine() {
 	g_sci = 0;
 }
 
-extern int showScummVMDialog(const Common::U32String& message, Common::U32String altButton = Common::U32String(""), bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String &message, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true);
 
 Common::Error SciEngine::run() {
 	_resMan = new ResourceManager();
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index a05b2a24e1..b6ae139f7e 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -1134,19 +1134,26 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co
 	// unknown MD5, or with a medium debug level in case of a known MD5 (for
 	// debugging purposes).
 	if (!findInMD5Table(res.md5.c_str())) {
-		Common::U32String md5Warning;
+		Common::String md5Warning;
+		Common::String additionalInfo;
+		// Common::U32String md5WarningTranslated;
 
-		md5Warning = _("Your game version appears to be unknown. If this is *NOT* a fan-modified\n"
+		md5Warning = ("Your game version appears to be unknown. If this is *NOT* a fan-modified\n"
 		               "version (in particular, not a fan-made translation), please, report the\n"
 		               "following data to the ScummVM team along with the name of the game you tried\n"
 		               "to add and its version, language, etc.:\n");
 
-		md5Warning += Common::String::format("  SCUMM gameid '%s', file '%s', MD5 '%s'\n\n",
+		// md5WarningTranslated = _(md5Warning);
+
+		additionalInfo = Common::String::format("  SCUMM gameid '%s', file '%s', MD5 '%s'\n\n",
 				res.game.gameid,
 				generateFilenameForDetection(res.fp.pattern, res.fp.genMethod, res.game.platform).c_str(),
 				res.md5.c_str());
 
-		g_system->logMessage(LogMessageType::kWarning, md5Warning.encode().c_str());
+		md5Warning += additionalInfo;
+		// md5WarningTranslated += additionalInfo;
+
+		g_system->logMessage(LogMessageType::kWarning, md5Warning.c_str());
 	} else {
 		debug(1, "Using MD5 '%s'", res.md5.c_str());
 	}
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 2d16afb2e6..aee429d796 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -509,7 +509,7 @@ void ConfirmDialog::handleKeyDown(Common::KeyState state) {
 
 #pragma mark -
 
-ValueDisplayDialog::ValueDisplayDialog(const Common::U32String& label, int minVal, int maxVal,
+ValueDisplayDialog::ValueDisplayDialog(const Common::U32String &label, int minVal, int maxVal,
 		int val, uint16 incKey, uint16 decKey)
 	: GUI::Dialog(0, 0, 0, 0),
 	_label(label), _min(minVal), _max(maxVal),
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index e1337b65e4..c9b2e67a9e 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -127,7 +127,7 @@ protected:
  */
 class ValueDisplayDialog : public GUI::Dialog {
 public:
-	ValueDisplayDialog(const Common::U32String& label, int minVal, int maxVal, int val, uint16 incKey, uint16 decKey);
+	ValueDisplayDialog(const Common::U32String &label, int minVal, int maxVal, int val, uint16 incKey, uint16 decKey);
 
 	void open() override;
 	void drawDialog(GUI::DrawLayer layerToDraw) override;
diff --git a/engines/scumm/help.cpp b/engines/scumm/help.cpp
index e30ae6e26c..7371eb5577 100644
--- a/engines/scumm/help.cpp
+++ b/engines/scumm/help.cpp
@@ -22,8 +22,6 @@
 
 
 
-#include "common/str.h"
-#include "common/ustr.h"
 #include "common/util.h"
 
 #include "scumm/help.h"
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index aa2b041a25..1757512d79 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2444,7 +2444,7 @@ void ScummEngine::scummLoop_updateScummVars() {
 void ScummEngine::scummLoop_handleSaveLoad() {
 	if (_saveLoadFlag) {
 		bool success;
-		Common::U32String errMsg("");
+		const char *errMsg = 0;
 
 		if (_game.version == 8 && _saveTemporaryState)
 			VAR(VAR_GAME_LOADED) = 0;
@@ -2453,7 +2453,7 @@ void ScummEngine::scummLoop_handleSaveLoad() {
 		if (_saveLoadFlag == 1) {
 			success = saveState(_saveLoadSlot, _saveTemporaryState, filename);
 			if (!success)
-				errMsg = _("Failed to save game to file:\n\n%s");
+				errMsg = "Failed to save game to file:\n\n%s";
 
 			if (success && _saveTemporaryState && VAR_GAME_LOADED != 0xFF && _game.version <= 7)
 				VAR(VAR_GAME_LOADED) = 201;
@@ -2463,20 +2463,19 @@ void ScummEngine::scummLoop_handleSaveLoad() {
 		} else {
 			success = loadState(_saveLoadSlot, _saveTemporaryState, filename);
 			if (!success)
-				errMsg = _("Failed to load saved game from file:\n\n%s");
+				errMsg = "Failed to load saved game from file:\n\n%s";
 
 			if (success && _saveTemporaryState && VAR_GAME_LOADED != 0xFF)
 				VAR(VAR_GAME_LOADED) = (_game.version == 8) ? 1 : 203;
 		}
 
 		if (!success) {
-			displayMessage(0, errMsg.encode().c_str(), filename.c_str());
+			displayMessage(0, errMsg, filename.c_str());
 		} else if (_saveLoadFlag == 1 && _saveLoadSlot != 0 && !_saveTemporaryState) {
 			// Display "Save successful" message, except for auto saves
-			char buf[256];
-			snprintf(buf, sizeof(buf), _("Successfully saved game in file:\n\n%s").encode().c_str(), filename.c_str());
+			Common::U32String buf = Common::U32String::format(_("Successfully saved game in file:\n\n%s"), filename.c_str());
 
-			GUI::TimedMessageDialog dialog(Common::U32String(buf), 1500);
+			GUI::TimedMessageDialog dialog(buf, 1500);
 			runDialog(dialog);
 		}
 		if (success && _saveLoadFlag != 1)
@@ -2759,7 +2758,10 @@ bool ScummEngine::startManiac() {
 		eventMan->pushEvent(event);
 		return true;
 	} else {
-		displayMessage(0, "%s", _("Usually, Maniac Mansion would start now. But for that to work, the game files for Maniac Mansion have to be in the 'Maniac' directory inside the Tentacle game directory, and the game has to be added to ScummVM.").encode().c_str());
+		Common::U32String buf = Common::U32String::format(
+			_("Usually, Maniac Mansion would start now. But for that to work, the game files for Maniac Mansion have to be in the 'Maniac' directory \
+			inside the Tentacle game directory, and the game has to be added to ScummVM."));
+		GUI::MessageDialog dialog(buf);
 		return false;
 	}
 }
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index 654ca2c4a8..58d6c099ee 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -313,7 +313,7 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const {
 		Common::InSaveFile *in = saveFileMan->openForLoading(*file);
 		if (in) {
 			saveList.push_back(SaveStateDescriptor(slotNum,
-				(slotNum == 0) ? _("Autosave").encode() : savenames[slotNum - 1]));
+				(slotNum == 0) ? _("Autosave") : Common::U32String(savenames[slotNum - 1])));
 			delete in;
 		}
 	}
diff --git a/engines/testbed/sound.cpp b/engines/testbed/sound.cpp
index 1c8c219cc3..998afbf7db 100644
--- a/engines/testbed/sound.cpp
+++ b/engines/testbed/sound.cpp
@@ -76,32 +76,32 @@ void SoundSubsystemDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd,
 
 	switch (cmd) {
 		case kPlayChannel1:
-			_buttonArray[0]->setLabel(Common::convertToU32String("Pause Channel #1"));
+			_buttonArray[0]->setLabel("Pause Channel #1");
 			_buttonArray[0]->setCmd(kPauseChannel1);
 			_mixer->pauseHandle(_h1, false);
 			break;
 		case kPlayChannel2:
-			_buttonArray[1]->setLabel(Common::convertToU32String("Pause Channel #2"));
+			_buttonArray[1]->setLabel("Pause Channel #2");
 			_buttonArray[1]->setCmd(kPauseChannel2);
 			_mixer->pauseHandle(_h2, false);
 			break;
 		case kPlayChannel3:
-			_buttonArray[2]->setLabel(Common::convertToU32String("Pause Channel #3"));
+			_buttonArray[2]->setLabel("Pause Channel #3");
 			_buttonArray[2]->setCmd(kPauseChannel3);
 			_mixer->pauseHandle(_h3, false);
 			break;
 		case kPauseChannel1:
-			_buttonArray[0]->setLabel(Common::convertToU32String("Play Channel #1"));
+			_buttonArray[0]->setLabel("Play Channel #1");
 			_buttonArray[0]->setCmd(kPlayChannel1);
 			_mixer->pauseHandle(_h1, true);
 			break;
 		case kPauseChannel2:
-			_buttonArray[1]->setLabel(Common::convertToU32String("Play Channel #2"));
+			_buttonArray[1]->setLabel("Play Channel #2");
 			_buttonArray[1]->setCmd(kPlayChannel2);
 			_mixer->pauseHandle(_h2, true);
 			break;
 		case kPauseChannel3:
-			_buttonArray[2]->setLabel(Common::convertToU32String("Play Channel #3"));
+			_buttonArray[2]->setLabel("Play Channel #3");
 			_buttonArray[2]->setCmd(kPlayChannel3);
 			_mixer->pauseHandle(_h3, true);
 			break;
diff --git a/engines/ultima/nuvie/nuvie.cpp b/engines/ultima/nuvie/nuvie.cpp
index e9292c4840..98741b729a 100644
--- a/engines/ultima/nuvie/nuvie.cpp
+++ b/engines/ultima/nuvie/nuvie.cpp
@@ -321,7 +321,7 @@ Common::Error NuvieEngine::saveGameState(int slot, const Common::String &desc, b
 
 			// Display that the game was saved
 			MsgScroll *scroll = Game::get_game()->get_scroll();
-			scroll->display_string(_("\nGame Saved\n\n").encode().c_str());
+			scroll->display_string("\nGame Saved\n\n");
 			scroll->display_prompt();
 		}
 


Commit: 56911beea23056ef0b1f0ead7782197e289789cc
    https://github.com/scummvm/scummvm/commit/56911beea23056ef0b1f0ead7782197e289789cc
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Add and use a U32Tokenizer

- Added in common/tokenizer.cpp
- Uses iterators to function

Changed paths:
    backends/graphics/opengl/opengl-graphics.cpp
    common/tokenizer.cpp
    common/tokenizer.h


diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index cd5bcd0141..8af87abcc2 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -797,7 +797,7 @@ void OpenGLGraphicsManager::displayMessageOnOSD(const Common::U32String &msg) {
 void OpenGLGraphicsManager::osdMessageUpdateSurface() {
 	// Split up the lines.
 	Common::Array<Common::U32String> osdLines;
-	Common::StringTokenizer tokenizer(Common::convertFromU32String(_osdMessageNextData), "\n");
+	Common::U32StringTokenizer tokenizer(_osdMessageNextData, "\n");
 	while (!tokenizer.empty()) {
 		osdLines.push_back(tokenizer.nextToken());
 	}
diff --git a/common/tokenizer.cpp b/common/tokenizer.cpp
index 2547f88168..0b0a515d7a 100644
--- a/common/tokenizer.cpp
+++ b/common/tokenizer.cpp
@@ -53,4 +53,52 @@ String StringTokenizer::nextToken() {
 	return String(_str.c_str() + _tokenBegin, _tokenEnd - _tokenBegin);
 }
 
+U32StringTokenizer::U32StringTokenizer(const U32String &str, const String &delimiters) : _str(str), _delimiters(delimiters) {
+	reset();
+}
+
+void U32StringTokenizer::reset() {
+	_tokenBegin = _tokenEnd = _str.begin();
+}
+
+bool U32StringTokenizer::empty() const {
+	// Search for the next token's start (i.e. the next non-delimiter character)
+	for (U32String::const_iterator itr = _tokenEnd; itr != _str.end(); itr++) {
+		if (!_delimiters.contains(*itr)) {
+			return false; // Found a token so the tokenizer is not empty
+		}
+	}
+
+	// Didn't find any more tokens so the tokenizer is empty
+	return true;
+}
+
+U32String U32StringTokenizer::nextToken() {
+	// Skip delimiters when present at the beginning, to point to the next token
+	// For example, the below loop will set _tokenBegin & _tokenEnd to 'H' for the string -> "!!--=Hello World"
+	// And subsequently, skip all delimiters in the beginning of the next word.
+	while (_tokenBegin != _str.end() && _delimiters.contains(*_tokenBegin)) {
+		_tokenBegin++;
+		_tokenEnd++;
+	}
+
+	// Loop and advance _tokenEnd until we find a delimiter at the end of a word/string
+	while (_tokenBegin != _str.end() && _tokenEnd != _str.end()) {
+		if (_delimiters.contains(*_tokenEnd)) {
+			U32String token(_tokenBegin, _tokenEnd);
+			_tokenEnd++;
+			_tokenBegin = _tokenEnd;
+			return token;
+		}
+		_tokenEnd++;
+	}
+
+	// Returning the last word if _tokenBegin iterator isn't at the end.
+	if (_tokenBegin != _str.end())
+		return U32String(_tokenBegin, _tokenEnd);
+	else
+		return U32String();
+}
+
+
 } // End of namespace Common
diff --git a/common/tokenizer.h b/common/tokenizer.h
index dd831f3431..82befbd4af 100644
--- a/common/tokenizer.h
+++ b/common/tokenizer.h
@@ -25,6 +25,7 @@
 
 #include "common/scummsys.h"
 #include "common/str.h"
+#include "common/ustr.h"
 
 namespace Common {
 
@@ -54,6 +55,32 @@ private:
 	uint         _tokenEnd;   ///< Latest found token's end (Valid after a call to nextToken(), zero otherwise)
 };
 
+/**
+ * A simple non-optimized unicode-string tokenizer.
+ *
+ * Example of use:
+ * U32StringTokenizer("Now, this is a test!", " ,!") gives tokens "Now", "this", "is", "a" and "test" using nextToken().
+ * Using non-ascii chars will also work, and is recommended to use this over StringTokenizer if string contains unicode chars.
+ */
+class U32StringTokenizer {
+public:
+	/**
+	 * Creates a UnicodeStringTokenizer.
+	 * @param str The unicode string to be tokenized.
+	 * @param delimiters String containing all the delimiter characters (i.e. the characters to be ignored).
+	 * @note Uses space, horizontal tab, carriage return, newline, form feed and vertical tab as delimiters by default.
+	 */
+	U32StringTokenizer(const U32String &str, const String &delimiters = " \t\r\n\f\v");
+	void reset();       ///< Resets the tokenizer to its initial state, i.e points boten token iterators to the beginning
+	bool empty() const; ///< Returns true if there are no more tokens left in the string, false otherwise
+	U32String nextToken(); ///< Returns the next token from the string (Or an empty string if there are no more tokens)
+
+private:
+	const U32String _str;        ///< The unicode string to be tokenized
+	const String    _delimiters; ///< String containing all the delimiter characters
+	U32String::const_iterator            _tokenBegin; ///< Latest found token's begin iterator (Valid after a call to nextToken())
+	U32String::const_iterator            _tokenEnd;   ///< Latest found token's end iterator (Valid after a call to nextToken())
+};
 } // End of namespace Common
 
 #endif


Commit: 2ca907b4a2e5c062953bb0d352f60c6e508358bd
    https://github.com/scummvm/scummvm/commit/2ca907b4a2e5c062953bb0d352f60c6e508358bd
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use game-list filters with u32

- Add a contains utility function to ustr
- setFilter uses U32String and U32Tokenizers
- Make consequent changes in launcher to allow sending u32strings

Changed paths:
    common/ustr.cpp
    common/ustr.h
    gui/launcher.cpp
    gui/widgets/list.cpp
    gui/widgets/list.h


diff --git a/common/ustr.cpp b/common/ustr.cpp
index 2e412775b2..7055981917 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -229,6 +229,29 @@ bool U32String::contains(value_type x) const {
 	return false;
 }
 
+bool U32String::contains(const U32String &otherString) const {
+	if (empty() || otherString.empty() || _size < otherString.size()) {
+		return false;
+	}
+
+	int size = 0;
+	U32String::const_iterator itr = otherString.begin();
+
+	for (U32String::const_iterator itr2 = begin(); itr != otherString.end() && itr2 != end(); itr2++) {
+		if (*itr == *itr2) {
+			itr++;
+			size++;
+			if (size == otherString.size())
+				return true;
+		} else {
+			size = 0;
+			itr = otherString.begin();
+		}
+	}
+
+	return false;
+}
+
 void U32String::insertChar(value_type c, uint32 p) {
 	assert(p <= _size);
 
diff --git a/common/ustr.h b/common/ustr.h
index f0ff4257e3..4e601d838b 100644
--- a/common/ustr.h
+++ b/common/ustr.h
@@ -150,6 +150,11 @@ public:
 
 	bool contains(value_type x) const;
 
+	/**
+	 * Checks if a given string is present in the internal string or not.
+	 */
+	bool contains(const U32String &otherString) const;
+
 	inline const value_type *c_str() const { return _str; }
 	inline uint32 size() const             { return _size; }
 
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index c48c00faa7..481a78f838 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -323,7 +323,7 @@ void LauncherDialog::updateListing() {
 
 	// Update the filter settings, those are lost when "setList"
 	// is called.
-	_list->setFilter(Common::convertFromU32String(_searchWidget->getEditString()));
+	_list->setFilter(_searchWidget->getEditString());
 }
 
 void LauncherDialog::addGame() {
@@ -673,12 +673,12 @@ void LauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
 		break;
 	case kSearchCmd:
 		// Update the active search filter.
-		_list->setFilter(Common::convertFromU32String(_searchWidget->getEditString()));
+		_list->setFilter(_searchWidget->getEditString());
 		break;
 	case kSearchClearCmd:
 		// Reset the active search filter, thus showing all games again
 		_searchWidget->setEditString(Common::U32String(""));
-		_list->setFilter("");
+		_list->setFilter(Common::U32String(""));
 		break;
 	default:
 		Dialog::handleCommand(sender, cmd, data);
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index b4f91c5765..46074fe998 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -730,12 +730,12 @@ void ListWidget::reflowLayout() {
 	}
 }
 
-void ListWidget::setFilter(const String &filter, bool redraw) {
+void ListWidget::setFilter(const U32String &filter, bool redraw) {
 	// FIXME: This method does not deal correctly with edit mode!
 	// Until we fix that, let's make sure it isn't called while editing takes place
 	assert(!_editMode);
 
-	String filt = filter;
+	U32String filt = filter;
 	filt.toLowercase();
 
 	if (_filter == filt) // Filter was not changed
@@ -751,15 +751,15 @@ void ListWidget::setFilter(const String &filter, bool redraw) {
 		// Restrict the list to everything which contains all words in _filter
 		// as substrings, ignoring case.
 
-		Common::StringTokenizer tok(_filter);
-		String tmp;
+		Common::U32StringTokenizer tok(_filter);
+		U32String tmp;
 		int n = 0;
 
 		_list.clear();
 		_listIndex.clear();
 
 		for (U32StringArray::iterator i = _dataList.begin(); i != _dataList.end(); ++i, ++n) {
-			tmp = Common::convertFromU32String(*i);
+			tmp = *i;
 			tmp.toLowercase();
 			bool matches = true;
 			tok.reset();
diff --git a/gui/widgets/list.h b/gui/widgets/list.h
index 65a0330170..e87fc9fb5b 100644
--- a/gui/widgets/list.h
+++ b/gui/widgets/list.h
@@ -81,7 +81,7 @@ protected:
 	int				_bottomPadding;
 	int				_scrollBarWidth;
 
-	String			_filter;
+	U32String		_filter;
 	bool			_quickSelect;
 	bool			_dictionarySelect;
 
@@ -128,7 +128,7 @@ public:
 	void startEditMode() override;
 	void endEditMode() override;
 
-	void setFilter(const String &filter, bool redraw = true);
+	void setFilter(const U32String &filter, bool redraw = true);
 
 	void handleTickle() override;
 	void handleMouseDown(int x, int y, int button, int clickCount) override;


Commit: 9bf3f73d8a7c2010bac53386e42e60b572e76fec
    https://github.com/scummvm/scummvm/commit/9bf3f73d8a7c2010bac53386e42e60b572e76fec
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use U32Strings for native dialogs

- Make DialogManager showFileBrowser take in u32
- Show filebrowser with u32 in MacOS and GTK

Changed paths:
    backends/dialogs/gtk/gtk-dialogs.cpp
    backends/dialogs/gtk/gtk-dialogs.h
    backends/dialogs/macosx/macosx-dialogs.h
    backends/dialogs/macosx/macosx-dialogs.mm
    common/dialogs.h
    gui/browser.cpp


diff --git a/backends/dialogs/gtk/gtk-dialogs.cpp b/backends/dialogs/gtk/gtk-dialogs.cpp
index 79f4f918a2..61f9b31656 100644
--- a/backends/dialogs/gtk/gtk-dialogs.cpp
+++ b/backends/dialogs/gtk/gtk-dialogs.cpp
@@ -35,25 +35,19 @@
 
 #include <gtk/gtk.h>
 
-Common::DialogManager::DialogResult GtkDialogManager::showFileBrowser(const char *title, Common::FSNode &choice, bool isDirBrowser) {
+Common::DialogManager::DialogResult GtkDialogManager::showFileBrowser(const Common::U32String &title, Common::FSNode &choice, bool isDirBrowser) {
 	if (!gtk_init_check(NULL, NULL))
 		return kDialogError;
 
 	DialogResult result = kDialogCancel;
 
-	// Get current encoding
-	Common::String guiEncoding = "ASCII";
-#ifdef USE_TRANSLATION
-	guiEncoding = TransMan.getCurrentCharset();
-#endif
-	Common::Encoding utf8("utf-8", guiEncoding);
+	Common::U32String choose = _("Choose");
+	Common::U32String cancel = _("Cancel");
 
 	// Convert labels to UTF-8
-	char *utf8Title = utf8.convert(title, strlen(title));
-	Common::String choose = _("Choose");
-	char *utf8Choose = utf8.convert(choose.c_str(), choose.size());
-	Common::String cancel = _("Cancel");
-	char* utf8Cancel = utf8.convert(cancel.c_str(), cancel.size());
+	char *utf8Title = (char *)title.encode().c_str();
+	char *utf8Choose = (char *)choose.encode().c_str();
+	char* utf8Cancel = (char *)cancel.encode().c_str();
 
 	GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
 	if (isDirBrowser) {
diff --git a/backends/dialogs/gtk/gtk-dialogs.h b/backends/dialogs/gtk/gtk-dialogs.h
index 98ad7fa69a..d049eb1b14 100644
--- a/backends/dialogs/gtk/gtk-dialogs.h
+++ b/backends/dialogs/gtk/gtk-dialogs.h
@@ -30,7 +30,7 @@
 
 class GtkDialogManager : public Common::DialogManager {
 public:
-	virtual DialogResult showFileBrowser(const char *title, Common::FSNode &choice, bool isDirBrowser);
+	virtual DialogResult showFileBrowser(const Common::U32String &title, Common::FSNode &choice, bool isDirBrowser);
 };
 
 #endif
diff --git a/backends/dialogs/macosx/macosx-dialogs.h b/backends/dialogs/macosx/macosx-dialogs.h
index 351563e665..7bb9b78c26 100644
--- a/backends/dialogs/macosx/macosx-dialogs.h
+++ b/backends/dialogs/macosx/macosx-dialogs.h
@@ -27,10 +27,11 @@
 
 #include "common/fs.h"
 #include "common/dialogs.h"
+#include "common/ustr.h"
 
 class MacOSXDialogManager : public Common::DialogManager {
 public:
-	virtual DialogResult showFileBrowser(const char *title, Common::FSNode &choice, bool isDirBrowser);
+	virtual DialogResult showFileBrowser(const Common::U32String &title, Common::FSNode &choice, bool isDirBrowser);
 };
 
 #endif
diff --git a/backends/dialogs/macosx/macosx-dialogs.mm b/backends/dialogs/macosx/macosx-dialogs.mm
index 2edc609146..5cd7e03ec3 100644
--- a/backends/dialogs/macosx/macosx-dialogs.mm
+++ b/backends/dialogs/macosx/macosx-dialogs.mm
@@ -76,7 +76,7 @@
 		[showHiddenFilesButton setButtonType:NSSwitchButton];
 
 #ifdef USE_TRANSLATION
-		CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str(), kCFStringEncodingASCII);
+		CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str() == "UTF-32" ? "UTF-8" : "ASCII", kCFStringEncodingASCII);
 		CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding(encStr);
 		CFRelease(encStr);
 #else
@@ -128,13 +128,13 @@
 
 @end
 
-Common::DialogManager::DialogResult MacOSXDialogManager::showFileBrowser(const char *title, Common::FSNode &choice, bool isDirBrowser) {
+Common::DialogManager::DialogResult MacOSXDialogManager::showFileBrowser(const Common::U32String &title, Common::FSNode &choice, bool isDirBrowser) {
 
 	DialogResult result = kDialogCancel;
 
 	// Get current encoding
 #ifdef USE_TRANSLATION
-	CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str(), kCFStringEncodingASCII);
+	CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str() == "UTF-32" ? "UTF-8" : "ASCII", kCFStringEncodingASCII);
 	CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding(encStr);
 	CFRelease(encStr);
 #else
@@ -142,7 +142,7 @@ Common::DialogManager::DialogResult MacOSXDialogManager::showFileBrowser(const c
 #endif
 
 	// Convert labels to NSString
-	CFStringRef titleRef = CFStringCreateWithCString(0, title, stringEncoding);
+	CFStringRef titleRef = CFStringCreateWithCString(0, title.encode().c_str(), stringEncoding);
 	CFStringRef chooseRef = CFStringCreateWithCString(0, _("Choose").encode().c_str(), stringEncoding);
 
 	beginDialog();
diff --git a/common/dialogs.h b/common/dialogs.h
index 9cc440af52..fd165e9ee2 100644
--- a/common/dialogs.h
+++ b/common/dialogs.h
@@ -58,7 +58,7 @@ public:
 	 * @param isDirBrowser Restrict selection to directories
 	 * @return The dialog result
 	 */
-	virtual DialogResult showFileBrowser(const char *title, FSNode &choice, bool isDirBrowser = false) { return kDialogError; }
+	virtual DialogResult showFileBrowser(const Common::U32String &title, FSNode &choice, bool isDirBrowser = false) { return kDialogError; }
 
 protected:
 	bool _wasFullscreen;
diff --git a/gui/browser.cpp b/gui/browser.cpp
index b77bff8300..401b1d0468 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -89,7 +89,7 @@ int BrowserDialog::runModal() {
 	Common::DialogManager *dialogManager = g_system->getDialogManager();
 	if (dialogManager) {
 		if (ConfMan.getBool("gui_browser_native", Common::ConfigManager::kApplicationDomain)) {
-			Common::DialogManager::DialogResult result = dialogManager->showFileBrowser(_title.encode().c_str(), _choice, _isDirBrowser);
+			Common::DialogManager::DialogResult result = dialogManager->showFileBrowser(_title, _choice, _isDirBrowser);
 			if (result != Common::DialogManager::kDialogError) {
 				return result;
 			}


Commit: 93cb408c055eb10a2e2f07b1548d0658e388354a
    https://github.com/scummvm/scummvm/commit/93cb408c055eb10a2e2f07b1548d0658e388354a
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
BACKENDS: WIN32: Add UTF8ToUnicode for Win32wrapper

- The new changes for converting GUI to U32 will need these.
- Provide missing notes for codepage params in other wrapper functions

Changed paths:
    backends/platform/sdl/win32/win32_wrapper.cpp
    backends/platform/sdl/win32/win32_wrapper.h


diff --git a/backends/platform/sdl/win32/win32_wrapper.cpp b/backends/platform/sdl/win32/win32_wrapper.cpp
index 31663f1b57..4a011881fd 100644
--- a/backends/platform/sdl/win32/win32_wrapper.cpp
+++ b/backends/platform/sdl/win32/win32_wrapper.cpp
@@ -105,6 +105,18 @@ char *unicodeToAnsi(const wchar_t *s, uint codePage) {
 	return NULL;
 }
 
+wchar_t *UTF8ToUnicode(const char *s) {
+	DWORD size = MultiByteToWideChar(CP_UTF8, 0, s, -1, NULL, 0);
+
+	if (size > 0) {
+		LPWSTR result = new WCHAR[size];
+		if (MultiByteToWideChar(CP_UTF8, 0, s, -1, result, size) != 0)
+			return result;
+	}
+
+	return NULL;
+}
+
 uint getCurrentCharset() {
 #ifdef USE_TRANSLATION
 	Common::String charset = TransMan.getCurrentCharset();
diff --git a/backends/platform/sdl/win32/win32_wrapper.h b/backends/platform/sdl/win32/win32_wrapper.h
index 9fa1a16210..aa7831d835 100644
--- a/backends/platform/sdl/win32/win32_wrapper.h
+++ b/backends/platform/sdl/win32/win32_wrapper.h
@@ -43,6 +43,7 @@ bool confirmWindowsVersion(int majorVersion, int minorVersion);
  * Used to interact with Win32 Unicode APIs with no ANSI fallback.
  *
  * @param s Source string
+ * @param c Code Page, by default is CP_ACP (default Windows ANSI code page)
  * @return Converted string
  *
  * @note Return value must be freed by the caller.
@@ -53,12 +54,24 @@ wchar_t *ansiToUnicode(const char *s, uint codePage = CP_ACP);
  * Used to interact with Win32 Unicode APIs with no ANSI fallback.
  *
  * @param s Source string
+ * @param c Code Page, by default is CP_ACP (default Windows ANSI code page)
  * @return Converted string
  *
  * @note Return value must be freed by the caller.
  */
 char *unicodeToAnsi(const wchar_t *s, uint codePage = CP_ACP);
 
+/**
+ * Converts a C string encoded in UTF8-multibyte char into a Windows wide-character string.
+ * Used to interact with Win32 Unicode APIs with no ANSI fallback.
+ *
+ * @param s Source string, encoded in UTF8
+ * @return Converted string
+ *
+ * @note Return value must be freed by the caller.
+ */
+wchar_t *UTF8ToUnicode(const char *s);
+
 uint getCurrentCharset();
 
 }


Commit: f95762881ea45d772bfd572f096ec925f8959248
    https://github.com/scummvm/scummvm/commit/f95762881ea45d772bfd572f096ec925f8959248
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use unicode strings for native Windows dialogs

These make use of newly added win-wrapper UTF8ToUnicode.

Changed paths:
    backends/dialogs/win32/win32-dialogs.cpp
    backends/dialogs/win32/win32-dialogs.h


diff --git a/backends/dialogs/win32/win32-dialogs.cpp b/backends/dialogs/win32/win32-dialogs.cpp
index 36c5eb6673..49546182c4 100644
--- a/backends/dialogs/win32/win32-dialogs.cpp
+++ b/backends/dialogs/win32/win32-dialogs.cpp
@@ -100,7 +100,7 @@ HRESULT getShellPath(IShellItem *item, Common::String &path) {
 	return hr;
 }
 
-Common::DialogManager::DialogResult Win32DialogManager::showFileBrowser(const char *title, Common::FSNode &choice, bool isDirBrowser) {
+Common::DialogManager::DialogResult Win32DialogManager::showFileBrowser(const Common::U32String &title, Common::FSNode &choice, bool isDirBrowser) {
 	DialogResult result = kDialogError;
 
 	// Do nothing if not running on Windows Vista or later
@@ -130,14 +130,15 @@ Common::DialogManager::DialogResult Win32DialogManager::showFileBrowser(const ch
 			hr = dialog->SetOptions(dwOptions);
 		}
 
-		LPWSTR str = Win32::ansiToUnicode(title, Win32::getCurrentCharset());
-		hr = dialog->SetTitle(str);
-		free(str);
+		LPWSTR dialogTitle = Win32::UTF8ToUnicode(title.encode().c_str());
+		hr = dialog->SetTitle(dialogTitle);
+		free(dialogTitle);
 
-		str = Win32::ansiToUnicode(Common::convertFromU32String(_("Choose")).c_str(), Win32::getCurrentCharset());
-		hr = dialog->SetOkButtonLabel(str);
-		free(str);
+		LPWSTR okTitle = Win32::UTF8ToUnicode(_("Choose").encode().c_str());
+		hr = dialog->SetOkButtonLabel(okTitle);
+		free(okTitle);
 
+		LPWSTR str;
 		if (ConfMan.hasKey("browser_lastpath")) {
 			str = Win32::ansiToUnicode(ConfMan.get("browser_lastpath").c_str());
 			IShellItem *item = NULL;
diff --git a/backends/dialogs/win32/win32-dialogs.h b/backends/dialogs/win32/win32-dialogs.h
index 32454bd67f..8b527b9e54 100644
--- a/backends/dialogs/win32/win32-dialogs.h
+++ b/backends/dialogs/win32/win32-dialogs.h
@@ -27,6 +27,7 @@
 
 #include "common/fs.h"
 #include "common/dialogs.h"
+#include "common/ustr.h"
 
 class SdlWindow_Win32;
 
@@ -34,7 +35,7 @@ class Win32DialogManager : public Common::DialogManager {
 public:
 	Win32DialogManager(SdlWindow_Win32 *window);
 	virtual ~Win32DialogManager();
-	virtual DialogResult showFileBrowser(const char *title, Common::FSNode &choice, bool isDirBrowser);
+	virtual DialogResult showFileBrowser(const Common::U32String &title, Common::FSNode &choice, bool isDirBrowser);
 
 private:
 	SdlWindow_Win32 *_window;


Commit: 01176e43f71d495c609fbcc83beda54673069ff2
    https://github.com/scummvm/scummvm/commit/01176e43f71d495c609fbcc83beda54673069ff2
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use unicode based generateGameReport correctly in all places

- UnknownGameDialog: Use u32 for gameReport dependant functions

Changed paths:
    base/commandLine.cpp
    gui/launcher.cpp
    gui/massadd.cpp
    gui/unknown-game-dialog.cpp
    gui/unknown-game-dialog.h


diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 1607319c58..c52f280a31 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -980,8 +980,8 @@ static DetectedGames getGameList(const Common::FSNode &dir) {
 	DetectionResults detectionResults = EngineMan.detectGames(files);
 
 	if (detectionResults.foundUnknownGames()) {
-		Common::String report = detectionResults.generateUnknownGameReport(false, 80);
-		g_system->logMessage(LogMessageType::kInfo, report.c_str());
+		Common::U32String report = detectionResults.generateUnknownGameReport(false, 80);
+		g_system->logMessage(LogMessageType::kInfo, report.encode().c_str());
 	}
 
 	return detectionResults.listRecognizedGames();
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 481a78f838..6abb832570 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -544,8 +544,8 @@ bool LauncherDialog::doGameDetection(const Common::String &path) {
 	DetectionResults detectionResults = EngineMan.detectGames(files);
 
 	if (detectionResults.foundUnknownGames()) {
-		Common::String report = detectionResults.generateUnknownGameReport(false, 80);
-		g_system->logMessage(LogMessageType::kInfo, report.c_str());
+		Common::U32String report = detectionResults.generateUnknownGameReport(false, 80);
+		g_system->logMessage(LogMessageType::kInfo, report.encode().c_str());
 	}
 
 	Common::Array<DetectedGame> candidates = detectionResults.listDetectedGames();
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 956f5f24a6..e3ade58e95 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -187,8 +187,8 @@ void MassAddDialog::handleTickle() {
 		DetectionResults detectionResults = EngineMan.detectGames(files);
 
 		if (detectionResults.foundUnknownGames()) {
-			Common::String report = detectionResults.generateUnknownGameReport(false, 80);
-			g_system->logMessage(LogMessageType::kInfo, report.c_str());
+			Common::U32String report = detectionResults.generateUnknownGameReport(false, 80);
+			g_system->logMessage(LogMessageType::kInfo, report.encode().c_str());
 		}
 
 		// Just add all detected games / game variants. If we get more than one,
diff --git a/gui/unknown-game-dialog.cpp b/gui/unknown-game-dialog.cpp
index ec434820b6..3e2b8e9265 100644
--- a/gui/unknown-game-dialog.cpp
+++ b/gui/unknown-game-dialog.cpp
@@ -119,8 +119,8 @@ void UnknownGameDialog::rebuild() {
 	}
 }
 
-Common::String UnknownGameDialog::encodeUrlString(const Common::String &string) {
-	Common::String encoded;
+Common::U32String UnknownGameDialog::encodeUrlString(const Common::U32String &string) {
+	Common::U32String encoded;
 	for (uint i = 0 ; i < string.size() ; ++i) {
 		char c = string[i];
 		if ((c >= 'a' && c <= 'z') || (c >= 'A'  && c <= 'Z') || (c >= '0' && c <= '9') ||
@@ -132,24 +132,27 @@ Common::String UnknownGameDialog::encodeUrlString(const Common::String &string)
 	return encoded;
 }
 
-Common::String UnknownGameDialog::generateBugtrackerURL() {
-	Common::String report = generateUnknownGameReport(_detectedGame, false, false);
+Common::U32String UnknownGameDialog::generateBugtrackerURL() {
+	Common::U32String report = generateUnknownGameReport(_detectedGame, false, false);
 	report = encodeUrlString(report);
 
 	Common::String engineId = encodeUrlString(_detectedGame.engineId);
 
-	return Common::String::format(
+	Common::String preFinalReport = Common::String::format(
 		"https://www.scummvm.org/unknowngame?"
-		"engine=%s"
-		"&description=%s",
-		engineId.c_str(),
-		report.c_str());
+		"engine=%s",
+		engineId.c_str());
+
+	Common::U32String repDesc("&description=");
+	repDesc += report;
+
+	return Common::U32String(preFinalReport) + repDesc;
 }
 
 void UnknownGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
 	switch(cmd) {
 	case kCopyToClipboard: {
-		Common::String report = generateUnknownGameReport(_detectedGame, false, false);
+		Common::U32String report = generateUnknownGameReport(_detectedGame, false, false);
 
 		if (g_system->setTextInClipboard(report)) {
 			g_system->displayMessageOnOSD(
diff --git a/gui/unknown-game-dialog.h b/gui/unknown-game-dialog.h
index 24e4179bf4..7f9e99bd5b 100644
--- a/gui/unknown-game-dialog.h
+++ b/gui/unknown-game-dialog.h
@@ -45,8 +45,8 @@ private:
 	void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
 	void reflowLayout() override;
 
-	Common::String generateBugtrackerURL();
-	static Common::String encodeUrlString(const Common::String &string);
+	Common::U32String generateBugtrackerURL();
+	static Common::U32String encodeUrlString(const Common::U32String &string);
 
 	const DetectedGame &_detectedGame;
 	ScrollContainerWidget *_textContainer;


Commit: 95aae1252708bf5b03b4f2c3b6d473a502aa630b
    https://github.com/scummvm/scummvm/commit/95aae1252708bf5b03b4f2c3b6d473a502aa630b
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: ULTIMA: Use u32 strings for keymap description

Changed paths:
    engines/ultima/ultima8/meta_engine.cpp


diff --git a/engines/ultima/ultima8/meta_engine.cpp b/engines/ultima/ultima8/meta_engine.cpp
index 03026e36d7..0e27560cd2 100644
--- a/engines/ultima/ultima8/meta_engine.cpp
+++ b/engines/ultima/ultima8/meta_engine.cpp
@@ -24,6 +24,7 @@
 #include "ultima/ultima8/misc/debugger.h"
 #include "ultima/ultima8/ultima8.h"
 #include "common/translation.h"
+#include "common/ustr.h"
 #include "backends/keymapper/action.h"
 
 namespace Ultima {
@@ -119,7 +120,7 @@ Common::KeymapArray MetaEngine::initKeymaps(const Common::String &gameId, bool i
 	Common::KeymapArray keymapArray;
 
 	// Core keymaps
-	const char *desc = (gameId == "ultima8" ? _("Ultima VIII") : _("Crusader"));
+	Common::U32String desc = (gameId == "ultima8" ? _("Ultima VIII") : _("Crusader"));
 
 	Common::Keymap *keyMap = new Common::Keymap(Common::Keymap::kKeymapTypeGame, gameId, desc);
 	keymapArray.push_back(keyMap);


Commit: 9737b0d3008e6781e847fbef977ab7d219a2cd53
    https://github.com/scummvm/scummvm/commit/9737b0d3008e6781e847fbef977ab7d219a2cd53
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
I18N: Add missing EOL in create_translations error message

Changed paths:
    devtools/create_translations/create_translations.cpp


diff --git a/devtools/create_translations/create_translations.cpp b/devtools/create_translations/create_translations.cpp
index c0e87553a3..685eb21c2b 100644
--- a/devtools/create_translations/create_translations.cpp
+++ b/devtools/create_translations/create_translations.cpp
@@ -124,7 +124,7 @@ int main(int argc, char *argv[]) {
 
 	for (int i = 0; i < numLangs; i++) {
 		if (!translations[i]->useUTF8()) {
-			fprintf(stderr, "ERROR: Po Language file for: \"%s\", named as \"%s\" is not encoded in UTF-8", translations[i]->languageName(), translations[i]->language());
+			fprintf(stderr, "ERROR: Po Language file for: \"%s\", named as \"%s\" is not encoded in UTF-8\n", translations[i]->languageName(), translations[i]->language());
 			for (size_t j = 0; j < translations.size(); ++j)
 				delete translations[j];
 


Commit: 1e5788d048e88c850e75b8379efc9438bf0eebcd
    https://github.com/scummvm/scummvm/commit/1e5788d048e88c850e75b8379efc9438bf0eebcd
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
I18N: Improve utf-8 check in create_translations

Changed paths:
    devtools/create_translations/po_parser.cpp


diff --git a/devtools/create_translations/po_parser.cpp b/devtools/create_translations/po_parser.cpp
index ba23f2c5d5..0bacd00ebd 100644
--- a/devtools/create_translations/po_parser.cpp
+++ b/devtools/create_translations/po_parser.cpp
@@ -142,7 +142,7 @@ void PoMessageEntryList::addMessageEntry(const char *translation, const char *me
 			_langNameAlt = str;
 		}
 		str = parseLine(translation, "charset=");
-		if (str[0] != 'U' || str[1] != 'T' || str[2] != 'F' || str[3] != '-' || str[4] != '8') {
+		if (strcmp(str, "utf-8") != 0 && strcmp(str, "UTF-8") != 0) {
 			_useUTF8 = false;
 		}
 		return;


Commit: 0ca5a40d85c7082473138cf6e7328fef76269983
    https://github.com/scummvm/scummvm/commit/0ca5a40d85c7082473138cf6e7328fef76269983
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
TTS: ALL: Improve u32-ity

- Allow the base class to take in a string with custom charset, convert to U32 and pass it along.
- Remove redudandant functions in all tts-subsystems
- Remove unnecessary "charset" argument, as U32Strings imply that we are using a UTF-32 charset
- Adjust relative code appropriately according to the above point.

Changed paths:
    backends/text-to-speech/linux/linux-text-to-speech.cpp
    backends/text-to-speech/linux/linux-text-to-speech.h
    backends/text-to-speech/macosx/macosx-text-to-speech.h
    backends/text-to-speech/macosx/macosx-text-to-speech.mm
    backends/text-to-speech/windows/windows-text-to-speech.cpp
    backends/text-to-speech/windows/windows-text-to-speech.h
    common/text-to-speech.h


diff --git a/backends/text-to-speech/linux/linux-text-to-speech.cpp b/backends/text-to-speech/linux/linux-text-to-speech.cpp
index 8825296ee7..5751fced65 100644
--- a/backends/text-to-speech/linux/linux-text-to-speech.cpp
+++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp
@@ -177,7 +177,7 @@ void SpeechDispatcherManager::updateState(SpeechDispatcherManager::SpeechEvent e
 	}
 }
 
-bool SpeechDispatcherManager::say(const Common::U32String &str, Action action, Common::String charset) {
+bool SpeechDispatcherManager::say(const Common::U32String &str, Action action) {
 
 	pthread_mutex_lock(&_speechMutex);
 	// reinitialize if needed
@@ -226,10 +226,6 @@ bool SpeechDispatcherManager::say(const Common::U32String &str, Action action, C
 	return false;
 }
 
-bool SpeechDispatcherManager::say(const Common::String &str, Action action, Common::String charset) {
-	return say(Common::U32String(str), action, charset);
-}
-
 bool SpeechDispatcherManager::stop() {
 	if (_speechState == READY || _speechState == BROKEN)
 		return true;
diff --git a/backends/text-to-speech/linux/linux-text-to-speech.h b/backends/text-to-speech/linux/linux-text-to-speech.h
index 906d0ada8f..069229f0e7 100644
--- a/backends/text-to-speech/linux/linux-text-to-speech.h
+++ b/backends/text-to-speech/linux/linux-text-to-speech.h
@@ -60,8 +60,7 @@ public:
 	SpeechDispatcherManager();
 	virtual ~SpeechDispatcherManager() override;
 
-	virtual bool say(const Common::U32String &str, Action action, Common::String charset = "") override;
-	virtual bool say(const Common::String &str, Action action, Common::String charset = "") override;
+	virtual bool say(const Common::U32String &str, Action action) override;
 
 	virtual bool stop() override;
 	virtual bool pause() override;
diff --git a/backends/text-to-speech/macosx/macosx-text-to-speech.h b/backends/text-to-speech/macosx/macosx-text-to-speech.h
index 35bb723f7d..b13e146406 100644
--- a/backends/text-to-speech/macosx/macosx-text-to-speech.h
+++ b/backends/text-to-speech/macosx/macosx-text-to-speech.h
@@ -36,8 +36,7 @@ public:
 	MacOSXTextToSpeechManager();
 	virtual ~MacOSXTextToSpeechManager() override;
 
-	virtual bool say(const Common::U32String &str, Action action, Common::String charset = "") override;
-	virtual bool say(const Common::String &str, Action action, Common::String charset = "") override;
+	virtual bool say(const Common::U32String &str, Action action) override;
 
 	virtual bool stop() override;
 	virtual bool pause() override;
@@ -66,12 +65,7 @@ public:
 private:
 	virtual void updateVoices() override;
 
-	struct SpeechText {
-		Common::String text;
-		Common::String encoding;
-		SpeechText(const Common::String &txt, const Common::String &enc) : text(txt), encoding(enc) {}
-	};
-	Common::Queue<SpeechText> _messageQueue;
+	Common::Queue<Common::String> _messageQueue;
 	Common::String _currentSpeech;
 	bool _paused;
 };
diff --git a/backends/text-to-speech/macosx/macosx-text-to-speech.mm b/backends/text-to-speech/macosx/macosx-text-to-speech.mm
index ff20539088..aa91c4dba5 100644
--- a/backends/text-to-speech/macosx/macosx-text-to-speech.mm
+++ b/backends/text-to-speech/macosx/macosx-text-to-speech.mm
@@ -81,8 +81,8 @@ MacOSXTextToSpeechManager::~MacOSXTextToSpeechManager() {
 	[synthesizerDelegate release];
 }
 
-bool MacOSXTextToSpeechManager::say(const Common::U32String &text, Action action, Common::String encoding) {
-	Common::String strToSpeak = text.encode();
+bool MacOSXTextToSpeechManager::say(const Common::U32String &text, Action action) {
+	Common::String textToSpeak = text.encode();
 	if (isSpeaking()) {
 		// Interruptions are done on word boundaries for nice transitions.
 		// Should we interrupt immediately?
@@ -95,52 +95,39 @@ bool MacOSXTextToSpeechManager::say(const Common::U32String &text, Action action
 			// If the new speech is the one being currently said, continue that speech but clear the queue.
 			// And otherwise both clear the queue and interrupt the current speech.
 			_messageQueue.clear();
-			if (_currentSpeech == strToSpeak)
+			if (_currentSpeech == textToSpeak)
 				return true;
 			[synthesizer stopSpeakingAtBoundary:NSSpeechWordBoundary];
 		} else if (action == QUEUE_NO_REPEAT) {
 			if (!_messageQueue.empty()) {
-				if (_messageQueue.back().text == strToSpeak)
+				if (_messageQueue.back() == textToSpeak)
 					return true;
-			} else if (_currentSpeech == strToSpeak)
+			} else if (_currentSpeech == textToSpeak)
 				return true;
 		}
 	}
 
-	if (encoding.empty()) {
-#ifdef USE_TRANSLATION
-		encoding = TransMan.getCurrentCharset();
-#endif
-	}
-
-	_messageQueue.push(SpeechText(strToSpeak, encoding));
+	_messageQueue.push(textToSpeak);
 	if (!isSpeaking())
 		startNextSpeech();
 	return true;
 }
 
-bool MacOSXTextToSpeechManager::say(const Common::String &text, Action action, Common::String encoding) {
-	return say(Common::U32String(text), action, encoding);
-}
-
 bool MacOSXTextToSpeechManager::startNextSpeech() {
 	_currentSpeech.clear();
 	if (_messageQueue.empty())
 		return false;
-	SpeechText text = _messageQueue.pop();
+
+	Common::String textToSpeak = _messageQueue.pop();
+
 	// Get current encoding
-	CFStringEncoding stringEncoding = kCFStringEncodingASCII;
-	if (!text.encoding.empty()) {
-		CFStringRef encStr = CFStringCreateWithCString(NULL, text.encoding.c_str(), kCFStringEncodingASCII);
-		stringEncoding = CFStringConvertIANACharSetNameToEncoding(encStr);
-		CFRelease(encStr);
-	}
+	CFStringEncoding stringEncoding = kCFStringEncodingUTF8;
 
-	CFStringRef textNSString = CFStringCreateWithCString(NULL, text.text.c_str(), stringEncoding);
+	CFStringRef textNSString = CFStringCreateWithCString(NULL, textToSpeak.c_str(), stringEncoding);
 	bool status = [synthesizer startSpeakingString:(NSString *)textNSString];
 	CFRelease(textNSString);
 	if (status)
-		_currentSpeech = text.text;
+		_currentSpeech = textToSpeak;
 
 	return status;
 }
diff --git a/backends/text-to-speech/windows/windows-text-to-speech.cpp b/backends/text-to-speech/windows/windows-text-to-speech.cpp
index 80947cdfc4..c534544067 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.cpp
+++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp
@@ -174,7 +174,7 @@ DWORD WINAPI startSpeech(LPVOID parameters) {
 	return 0;
 }
 
-bool WindowsTextToSpeechManager::say(const Common::U32String &str, Action action, Common::String charset) {
+bool WindowsTextToSpeechManager::say(const Common::U32String &str, Action action) {
 	if (_speechState == BROKEN || _speechState == NO_VOICE) {
 		warning("The text to speech cannot speak in this state");
 		return true;
@@ -183,15 +183,8 @@ bool WindowsTextToSpeechManager::say(const Common::U32String &str, Action action
 	if (isSpeaking() && action == DROP)
 		return true;
 
-	if (charset.empty()) {
-#ifdef USE_TRANSLATION
-		charset = TransMan.getCurrentCharset();
-#else
-		charset = "ASCII";
-#endif
-	}
-
 	Common::String strToSpeak = str.encode();
+	Common::String charset = "UTF-8";
 
 	// We have to set the pitch by prepending xml code at the start of the said string;
 	Common::String pitch = Common::String::format("<pitch absmiddle=\"%d\">", _ttsState->_pitch / 10);
@@ -246,10 +239,6 @@ bool WindowsTextToSpeechManager::say(const Common::U32String &str, Action action
 	return false;
 }
 
-bool WindowsTextToSpeechManager::say(const Common::String &str, Action action, Common::String charset) {
-	return say(Common::U32String(str), action, charset);
-}
-
 bool WindowsTextToSpeechManager::stop() {
 	if (_speechState == BROKEN || _speechState == NO_VOICE)
 		return true;
diff --git a/backends/text-to-speech/windows/windows-text-to-speech.h b/backends/text-to-speech/windows/windows-text-to-speech.h
index 00dabb7fe6..9005142215 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.h
+++ b/backends/text-to-speech/windows/windows-text-to-speech.h
@@ -52,8 +52,7 @@ public:
 	WindowsTextToSpeechManager();
 	virtual ~WindowsTextToSpeechManager() override;
 
-	virtual bool say(const Common::U32String &str, Action action, Common::String charset = "") override;
-	virtual bool say(const Common::String &str, Action action, Common::String charset = "") override;
+	virtual bool say(const Common::U32String &str, Action action) override;
 
 	virtual bool stop() override;
 	virtual bool pause() override;
diff --git a/common/text-to-speech.h b/common/text-to-speech.h
index 2e39115242..c85811d22c 100644
--- a/common/text-to-speech.h
+++ b/common/text-to-speech.h
@@ -24,6 +24,7 @@
 #define BACKENDS_TEXT_TO_SPEECH_ABSTRACT_H
 
 #include "common/scummsys.h"
+#include "common/encoding.h"
 
 #if defined(USE_TTS)
 
@@ -155,11 +156,24 @@ public:
 	 * Interrupts what's being said and says the given string
 	 *
 	 * @param str The string to say
-	 * @param charset The encoding of the string. If empty this is assumed to be the
-	 *        encoding used for the GUI.
 	 */
-	bool say(const U32String &str, String charset = "") { return say(str, INTERRUPT_NO_REPEAT, charset); }
-	bool say(const String &str, String charset = "") { return say(U32String(str), charset); }
+	bool say(const U32String &str) { return say(str, INTERRUPT_NO_REPEAT); }
+
+	/**
+	 * Interrupts what's being said and says the given string
+	 *
+	 * @param str The string to say
+	 * @param charset The encoding of the string. It will be converted to UTF-32.
+	 *	              It will use UTF-8 by default.
+	 */
+	bool say(const String &str, String charset = "UTF-8") {
+		Encoding speakWithCustomCharset("UTF-32", charset);
+		char *res = speakWithCustomCharset.convert(str.c_str(), str.size());
+		U32String textToSpeak(res);
+		free(res);
+
+		return say(textToSpeak, INTERRUPT_NO_REPEAT);
+	}
 
 	/**
 	 * Says the given string
@@ -176,11 +190,21 @@ public:
 	 *			the last string in the queue (or the string, that is currently
 	 *			being said if the queue is empty)
 	 *		DROP - does nothing if there is anything being said at the moment
-	 * @param charset The encoding of the string. If empty this is assumed to be the
-	 *        encoding used for the GUI.
 	 */
-	virtual bool say(const U32String &str, Action action, String charset = "") { return false; }
-	virtual bool say(const String &str, Action action, String charset = "") { return false; }
+	virtual bool say(const U32String &str, Action action) { return false; }
+
+	/**
+	 * Says the given string, but strings can have a custom charset here.
+	 * It will convert to UTF-32 before passing along to the intended method.
+	 */
+	bool say(const String &str, Action action, String charset = "UTF-8") {
+		Encoding speakWithCustomCharset("UTF-32", charset);
+		char *res = speakWithCustomCharset.convert(str.c_str(), str.size());
+		U32String textToSpeak(res);
+		free(res);
+
+		return say(textToSpeak, action);
+	}
 
 	/**
 	 * Stops the speech


Commit: f9b05f5e5a219a85e339862abf6b74fb45f6b02c
    https://github.com/scummvm/scummvm/commit/f9b05f5e5a219a85e339862abf6b74fb45f6b02c
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
BACKENDS: DIALOGS: MACOS: Improve readability and remove redundant code.

Changed paths:
    backends/dialogs/macosx/macosx-dialogs.mm


diff --git a/backends/dialogs/macosx/macosx-dialogs.mm b/backends/dialogs/macosx/macosx-dialogs.mm
index 5cd7e03ec3..c33ee0dbad 100644
--- a/backends/dialogs/macosx/macosx-dialogs.mm
+++ b/backends/dialogs/macosx/macosx-dialogs.mm
@@ -75,14 +75,7 @@
 		showHiddenFilesButton = [[NSButton alloc] init];
 		[showHiddenFilesButton setButtonType:NSSwitchButton];
 
-#ifdef USE_TRANSLATION
-		CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str() == "UTF-32" ? "UTF-8" : "ASCII", kCFStringEncodingASCII);
-		CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding(encStr);
-		CFRelease(encStr);
-#else
-		CFStringEncoding stringEncoding = kCFStringEncodingASCII;
-#endif
-		CFStringRef hiddenFilesString = CFStringCreateWithCString(0, _("Show hidden files").encode().c_str(), stringEncoding);
+		CFStringRef hiddenFilesString = CFStringCreateWithCString(0, _("Show hidden files").encode().c_str(), kCFStringEncodingUTF8);
 		[showHiddenFilesButton setTitle:(NSString*)hiddenFilesString];
 		CFRelease(hiddenFilesString);
 
@@ -129,17 +122,10 @@
 @end
 
 Common::DialogManager::DialogResult MacOSXDialogManager::showFileBrowser(const Common::U32String &title, Common::FSNode &choice, bool isDirBrowser) {
-
 	DialogResult result = kDialogCancel;
 
 	// Get current encoding
-#ifdef USE_TRANSLATION
-	CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str() == "UTF-32" ? "UTF-8" : "ASCII", kCFStringEncodingASCII);
-	CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding(encStr);
-	CFRelease(encStr);
-#else
-	CFStringEncoding stringEncoding = kCFStringEncodingASCII;
-#endif
+	CFStringEncoding stringEncoding = kCFStringEncodingUTF8;
 
 	// Convert labels to NSString
 	CFStringRef titleRef = CFStringCreateWithCString(0, title.encode().c_str(), stringEncoding);


Commit: 58203e09fdb18339c749737088ecd409f01f3f3b
    https://github.com/scummvm/scummvm/commit/58203e09fdb18339c749737088ecd409f01f3f3b
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
COMMON: Fix encoding conversion using iconv

It was not always setting to 0 all the newly allocated bytes,
and if you were unlucky this could result in additional spurious
characters at the end of the converted string.

Changed paths:
    common/encoding.cpp


diff --git a/common/encoding.cpp b/common/encoding.cpp
index 6bd8ad9da9..0b7fbab899 100644
--- a/common/encoding.cpp
+++ b/common/encoding.cpp
@@ -235,7 +235,7 @@ char *Encoding::convertIconv(const char *to, const char *from, const char *strin
 				}
 				dst = buffer + (dst - oldString);
 				outSize = stringSize - (dst - buffer);
-				memset(dst, 0, stringSize / 2);
+				memset(dst, 0, outSize);
 			} else {
 				error = true;
 				break;


Commit: 733df0bfa1ab54cdafaa457c41f58bbff24aaf91
    https://github.com/scummvm/scummvm/commit/733df0bfa1ab54cdafaa457c41f58bbff24aaf91
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
MACOSX: Fix getting text from clipboard

Changed paths:
    backends/platform/sdl/macosx/macosx_wrapper.mm


diff --git a/backends/platform/sdl/macosx/macosx_wrapper.mm b/backends/platform/sdl/macosx/macosx_wrapper.mm
index 7de2089c5d..18af84da58 100644
--- a/backends/platform/sdl/macosx/macosx_wrapper.mm
+++ b/backends/platform/sdl/macosx/macosx_wrapper.mm
@@ -56,7 +56,7 @@ Common::U32String getTextFromClipboardMacOSX() {
 #endif
 	NSUInteger textLength = [str length];
 	uint32 *text = new uint32[textLength];
-	if (![str getBytes:text maxLength:4*textLength usedLength:NULL encoding: stringEncoding options:0 range:NSMakeRange(0, textLength-1) remainingRange:NULL]) {
+	if (![str getBytes:text maxLength:4*textLength usedLength:NULL encoding: stringEncoding options:0 range:NSMakeRange(0, textLength) remainingRange:NULL]) {
 		delete[] text;
 		return Common::U32String();
 	}


Commit: 94035cf7aa50242780015b2a38791cc009390dfb
    https://github.com/scummvm/scummvm/commit/94035cf7aa50242780015b2a38791cc009390dfb
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
COMMON: Fix creating a String from a U32String

There were memory issues due to class member variables not initialized
by the constructor.

Changed paths:
    common/str.cpp


diff --git a/common/str.cpp b/common/str.cpp
index 8dff96763f..acf579e550 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -125,7 +125,9 @@ String::String(char c)
 	_size = (c == 0) ? 0 : 1;
 }
 
-String::String(const U32String &str) {
+String::String(const U32String &str)
+	: _size(0), _str(_storage) {
+	_storage[0] = 0;
 	*this = String(str.encode());
 }
 


Commit: dc977ffd85d3eb1436152e33c59a7b5b743f8e2f
    https://github.com/scummvm/scummvm/commit/dc977ffd85d3eb1436152e33c59a7b5b743f8e2f
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GLK: Avoid back and forth conversion between UTF-32 and UTF-8 for TTS

Changed paths:
    engines/glk/speech.cpp


diff --git a/engines/glk/speech.cpp b/engines/glk/speech.cpp
index 70648a399c..dacb0a3b91 100644
--- a/engines/glk/speech.cpp
+++ b/engines/glk/speech.cpp
@@ -121,11 +121,8 @@ void SpeechManager::speak(const Common::U32String &text, Speech *speechSource) {
 			//speechAction = Common::TextToSpeechManager::INTERRUPT;
 			_lastSpeechSource = speechSource;
 		}
-		// Curently the TextToSpeechManager takes a String, which does not properly support
-		// UTF-32. So convert to UTF-8.
-		Common::String textUtf8 = text.encode();
-		debugC(kDebugSpeech, "Speaking: \"%s\"", textUtf8.c_str());
-		_ttsMan->say(textUtf8, speechAction, "utf-8");
+		//debugC(kDebugSpeech, "Speaking: \"%s\"", text.encode().c_str());
+		_ttsMan->say(text, speechAction);
 	}
 #endif
 }


Commit: 66342fb89c0fd20b18726a34e5265e7ee1d0f3ac
    https://github.com/scummvm/scummvm/commit/66342fb89c0fd20b18726a34e5265e7ee1d0f3ac
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
TTS: Fix conversion to UTF-32 for text to speak

Changed paths:
    common/text-to-speech.h


diff --git a/common/text-to-speech.h b/common/text-to-speech.h
index c85811d22c..2769575af8 100644
--- a/common/text-to-speech.h
+++ b/common/text-to-speech.h
@@ -169,7 +169,7 @@ public:
 	bool say(const String &str, String charset = "UTF-8") {
 		Encoding speakWithCustomCharset("UTF-32", charset);
 		char *res = speakWithCustomCharset.convert(str.c_str(), str.size());
-		U32String textToSpeak(res);
+		U32String textToSpeak(reinterpret_cast<uint32*>(res));
 		free(res);
 
 		return say(textToSpeak, INTERRUPT_NO_REPEAT);


Commit: 35386aab4ce8c778f73dc610fbaf7236560ba400
    https://github.com/scummvm/scummvm/commit/35386aab4ce8c778f73dc610fbaf7236560ba400
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
TTS: Remove more redundant code

Changed paths:
    common/text-to-speech.h


diff --git a/common/text-to-speech.h b/common/text-to-speech.h
index 2769575af8..e158864225 100644
--- a/common/text-to-speech.h
+++ b/common/text-to-speech.h
@@ -152,29 +152,6 @@ public:
 	TextToSpeechManager();
 	virtual ~TextToSpeechManager() {}
 
-	/**
-	 * Interrupts what's being said and says the given string
-	 *
-	 * @param str The string to say
-	 */
-	bool say(const U32String &str) { return say(str, INTERRUPT_NO_REPEAT); }
-
-	/**
-	 * Interrupts what's being said and says the given string
-	 *
-	 * @param str The string to say
-	 * @param charset The encoding of the string. It will be converted to UTF-32.
-	 *	              It will use UTF-8 by default.
-	 */
-	bool say(const String &str, String charset = "UTF-8") {
-		Encoding speakWithCustomCharset("UTF-32", charset);
-		char *res = speakWithCustomCharset.convert(str.c_str(), str.size());
-		U32String textToSpeak(reinterpret_cast<uint32*>(res));
-		free(res);
-
-		return say(textToSpeak, INTERRUPT_NO_REPEAT);
-	}
-
 	/**
 	 * Says the given string
 	 *
@@ -200,12 +177,30 @@ public:
 	bool say(const String &str, Action action, String charset = "UTF-8") {
 		Encoding speakWithCustomCharset("UTF-32", charset);
 		char *res = speakWithCustomCharset.convert(str.c_str(), str.size());
-		U32String textToSpeak(res);
+		U32String textToSpeak(reinterpret_cast<uint32*>(res));
 		free(res);
 
 		return say(textToSpeak, action);
 	}
 
+	/**
+	 * Interrupts what's being said and says the given string
+	 *
+	 * @param str The string to say
+	 */
+	bool say(const U32String &str) { return say(str, INTERRUPT_NO_REPEAT); }
+
+	/**
+	 * Interrupts what's being said and says the given string
+	 *
+	 * @param str The string to say
+	 * @param charset The encoding of the string. It will be converted to UTF-32.
+	 *	              It will use UTF-8 by default.
+	 */
+	bool say(const String &str, String charset = "UTF-8") {
+		return say(str, INTERRUPT_NO_REPEAT, charset);
+	}
+
 	/**
 	 * Stops the speech
 	 */


Commit: f0ad817716c55906583ff917737c58dfd13f15e0
    https://github.com/scummvm/scummvm/commit/f0ad817716c55906583ff917737c58dfd13f15e0
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
SDL: Fix clipboard fetching internally

- This doesn't mean that it displays properly in the GUI, but it does return the proper value from getTextFromClipboard.

Changed paths:
    backends/platform/sdl/sdl.cpp


diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 2fe9692986..fc3785832e 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -499,18 +499,9 @@ Common::U32String OSystem_SDL::getTextFromClipboard() {
 	if (!hasTextInClipboard()) return Common::U32String("");
 
 	char *text = SDL_GetClipboardText();
-	// The string returned by SDL is in UTF-8. Convert to the
-	// current TranslationManager encoding or ISO-8859-1.
-#ifdef USE_TRANSLATION
-	char *conv_text = SDL_iconv_string(TransMan.getCurrentCharset().c_str(), "UTF-8", text, SDL_strlen(text) + 1);
-#else
-	char *conv_text = SDL_iconv_string("ISO-8859-1", "UTF-8", text, SDL_strlen(text) + 1);
-#endif
-	if (conv_text) {
-		SDL_free(text);
-		text = conv_text;
-	}
-	Common::U32String strText(text);
+
+	Common::String utf8Text(text);
+	Common::U32String strText = utf8Text.decode();
 	SDL_free(text);
 
 	return strText;


Commit: a9c5e930f05683e551c675b7be98dce22cc58e4d
    https://github.com/scummvm/scummvm/commit/a9c5e930f05683e551c675b7be98dce22cc58e4d
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
ANDROID: Make clipboards work with U32Strings.

Changed paths:
    backends/platform/android/android.cpp
    backends/platform/android/android.h
    backends/platform/android/jni-android.cpp
    backends/platform/android/jni-android.h


diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index ab52125a81..2cc1771033 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -537,11 +537,11 @@ bool OSystem_Android::hasTextInClipboard() {
 	return JNI::hasTextInClipboard();
 }
 
-Common::String OSystem_Android::getTextFromClipboard() {
+Common::U32String OSystem_Android::getTextFromClipboard() {
 	return JNI::getTextFromClipboard();
 }
 
-bool OSystem_Android::setTextInClipboard(const Common::String &text) {
+bool OSystem_Android::setTextInClipboard(const Common::U32String &text) {
 	return JNI::setTextInClipboard(text);
 }
 
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index 050efd804e..7f728e5275 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -29,6 +29,7 @@
 #include "common/fs.h"
 #include "common/archive.h"
 #include "common/mutex.h"
+#include "common/ustr.h"
 #include "audio/mixer_intern.h"
 #include "backends/modular-backend.h"
 #include "backends/plugins/posix/posix-provider.h"
@@ -133,8 +134,8 @@ public:
 											int priority = 0);
 	virtual bool openUrl(const Common::String &url);
 	virtual bool hasTextInClipboard();
-	virtual Common::String getTextFromClipboard();
-	virtual bool setTextInClipboard(const Common::String &text);
+	virtual Common::U32String getTextFromClipboard();
+	virtual bool setTextInClipboard(const Common::U32String &text);
 	virtual bool isConnectionLimited();
 	virtual Common::String getSystemLanguage() const;
 	virtual char *convertEncoding(const char *to, const char *from, const char *string, size_t length);
diff --git a/backends/platform/android/jni-android.cpp b/backends/platform/android/jni-android.cpp
index 225cb4c2a1..321ee67798 100644
--- a/backends/platform/android/jni-android.cpp
+++ b/backends/platform/android/jni-android.cpp
@@ -283,7 +283,7 @@ bool JNI::hasTextInClipboard() {
 	return hasText;
 }
 
-Common::String JNI::getTextFromClipboard() {
+Common::U32String JNI::getTextFromClipboard() {
 	JNIEnv *env = JNI::getEnv();
 
 	jstring javaText = (jstring)env->CallObjectMethod(_jobj, _MID_getTextFromClipboard);
@@ -294,18 +294,22 @@ Common::String JNI::getTextFromClipboard() {
 		env->ExceptionDescribe();
 		env->ExceptionClear();
 
-		return Common::String();
+		return Common::U32String();
 	}
 
-	Common::String text = convertFromJString(env, javaText, getCurrentCharset());
+	Common::String text = convertFromJString(env, javaText, "UTF-8");
 	env->DeleteLocalRef(javaText);
 
-	return text;
+	if (getCurrentCharset() == "UTF-32") {
+		return text.decode();
+	}
+
+	return Common::U32String(text);
 }
 
-bool JNI::setTextInClipboard(const Common::String &text) {
+bool JNI::setTextInClipboard(const Common::U32String &text) {
 	JNIEnv *env = JNI::getEnv();
-	jstring javaText = convertToJString(env, text, getCurrentCharset());
+	jstring javaText = convertToJString(env, text.encode(), "UTF-8");
 
 	bool success = env->CallBooleanMethod(_jobj, _MID_setTextInClipboard, javaText);
 
diff --git a/backends/platform/android/jni-android.h b/backends/platform/android/jni-android.h
index c9e7999529..db80a61ea0 100644
--- a/backends/platform/android/jni-android.h
+++ b/backends/platform/android/jni-android.h
@@ -31,6 +31,7 @@
 #include "common/fs.h"
 #include "common/archive.h"
 #include "common/array.h"
+#include "common/ustr.h"
 #include "engines/engine.h"
 
 class OSystem_Android;
@@ -62,8 +63,8 @@ public:
 	static void displayMessageOnOSD(const Common::String &msg);
 	static bool openUrl(const Common::String &url);
 	static bool hasTextInClipboard();
-	static Common::String getTextFromClipboard();
-	static bool setTextInClipboard(const Common::String &text);
+	static Common::U32String getTextFromClipboard();
+	static bool setTextInClipboard(const Common::U32String &text);
 	static bool isConnectionLimited();
 	static void showVirtualKeyboard(bool enable);
 	static void showKeyboardControl(bool enable);


Commit: a54b5826ea8cf9475e230623ae89608033824bc2
    https://github.com/scummvm/scummvm/commit/a54b5826ea8cf9475e230623ae89608033824bc2
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
UPDATES: Fix compilation with U32 strings

Changed paths:
    backends/updates/macosx/macosx-updates.mm
    common/updates.cpp
    common/updates.h
    gui/updates-dialog.cpp


diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm
index bf524e5704..01e6eddbd3 100644
--- a/backends/updates/macosx/macosx-updates.mm
+++ b/backends/updates/macosx/macosx-updates.mm
@@ -70,13 +70,8 @@ MacOSXUpdateManager::MacOSXUpdateManager() {
 	// Set appcast URL
 	[sparkleUpdater setFeedURL:[NSURL URLWithString:feedbackURL]];
 
-	// Get current encoding
-	CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str(), kCFStringEncodingASCII);
-	CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding(encStr);
-	CFRelease(encStr);
-
 	// Add "Check for Updates..." menu item
-	CFStringRef title = CFStringCreateWithCString(NULL, _("Check for Updates..."), stringEncoding);
+	CFStringRef title = CFStringCreateWithCString(NULL, _("Check for Updates...").encode().c_str(), kCFStringEncodingUTF8);
 	NSMenuItem *updateMenuItem = [applicationMenu insertItemWithTitle:(NSString *)title action:@selector(checkForUpdates:) keyEquivalent:@"" atIndex:1];
 	CFRelease(title);
 
diff --git a/common/updates.cpp b/common/updates.cpp
index 4e4ed53b8f..83ac5663b4 100644
--- a/common/updates.cpp
+++ b/common/updates.cpp
@@ -50,7 +50,7 @@ int UpdateManager::normalizeInterval(int interval) {
 	return val[-1]; // Return maximal acceptable value
 }
 
-const char *UpdateManager::updateIntervalToString(int interval) {
+Common::U32String UpdateManager::updateIntervalToString(int interval) {
 	switch (interval) {
 	case kUpdateIntervalNotSupported:
 		return _("Never");
diff --git a/common/updates.h b/common/updates.h
index 812aac718e..1f1c190304 100644
--- a/common/updates.h
+++ b/common/updates.h
@@ -114,9 +114,9 @@ public:
 	 * Returns string representation of a given interval.
 	 *
 	 * @param  interval    The interval.
-	 * @return  pointer to localized string of given interval.
+	 * @return Localized string of given interval as a U32String.
 	 */
-	static const char *updateIntervalToString(int interval);
+	static Common::U32String updateIntervalToString(int interval);
 
 	/**
 	 * Rounds up the given interval to acceptable value.
diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
index c6a536e709..108ce416fb 100644
--- a/gui/updates-dialog.cpp
+++ b/gui/updates-dialog.cpp
@@ -45,18 +45,18 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 	int buttonWidth = g_gui.xmlEval()->getVar("Globals.Button.Width", 0);
 	int buttonHeight = g_gui.xmlEval()->getVar("Globals.Button.Height", 0);
 
-	const char *message = _(
+	Common::U32String message = _(
 		"ScummVM now supports automatic check for updates\n"
 		"which requires access to the Internet. Would you\n"
 		"like to enable this feature?");
-	const char *message2 = _("You can change this setting later in the Misc tab\n"
+	Common::U32String message2 = _("You can change this setting later in the Misc tab\n"
 		"in the Options dialog.");
 
 	// First, determine the size the dialog needs. For this we have to break
 	// down the string into lines, and taking the maximum of their widths.
 	// Using this, and accounting for the space the button(s) need, we can set
 	// the real size of the dialog
-	Common::Array<Common::String> lines, lines2;
+	Common::Array<Common::U32String> lines, lines2;
 	int maxlineWidth = g_gui.getFont().wordWrapText(message, screenW - 2 * 20, lines);
 	int maxlineWidth2 = g_gui.getFont().wordWrapText(message2, screenW - 2 * 20, lines2);
 
@@ -83,7 +83,7 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 
 	y += kLineHeight;
 
-	const char *updMessage = _("Update check:");
+	Common::U32String updMessage = _("Update check:");
 
 	int updatelineWidth = g_gui.getFont().getStringWidth(updMessage) + 5;
 


Commit: 1950e38154bd312ef4954c9b1ee1d54c86f7e232
    https://github.com/scummvm/scummvm/commit/1950e38154bd312ef4954c9b1ee1d54c86f7e232
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
ANDROID: Support OSD Messages for U32.

Changed paths:
    backends/platform/android/graphics.cpp
    backends/platform/android/graphics.h
    backends/platform/android/jni-android.cpp
    backends/platform/android/jni-android.h


diff --git a/backends/platform/android/graphics.cpp b/backends/platform/android/graphics.cpp
index 041293544d..35339216e0 100644
--- a/backends/platform/android/graphics.cpp
+++ b/backends/platform/android/graphics.cpp
@@ -97,8 +97,8 @@ void AndroidGraphicsManager::updateScreen() {
 	OpenGLGraphicsManager::updateScreen();
 }
 
-void AndroidGraphicsManager::displayMessageOnOSD(const char *msg) {
-	ENTER("%s", msg);
+void AndroidGraphicsManager::displayMessageOnOSD(const Common::U32String &msg) {
+	ENTER("%s", msg.encode().c_str());
 
 	JNI::displayMessageOnOSD(msg);
 }
diff --git a/backends/platform/android/graphics.h b/backends/platform/android/graphics.h
index 1b29b036b1..b8fefad175 100644
--- a/backends/platform/android/graphics.h
+++ b/backends/platform/android/graphics.h
@@ -36,7 +36,7 @@ public:
 
 	void updateScreen();
 
-	void displayMessageOnOSD(const char *msg);
+	void displayMessageOnOSD(const Common::U32String &msg);
 
 	bool notifyMousePosition(Common::Point &mouse);
 	Common::Point getMousePosition() { return Common::Point(_cursorX, _cursorY); }
diff --git a/backends/platform/android/jni-android.cpp b/backends/platform/android/jni-android.cpp
index 321ee67798..fc34070664 100644
--- a/backends/platform/android/jni-android.cpp
+++ b/backends/platform/android/jni-android.cpp
@@ -226,11 +226,11 @@ void JNI::getDPI(float *values) {
 	env->DeleteLocalRef(array);
 }
 
-void JNI::displayMessageOnOSD(const Common::String &msg) {
+void JNI::displayMessageOnOSD(const Common::U32String &msg) {
 	// called from common/osd_message_queue, method: OSDMessageQueue::pollEvent()
 	JNIEnv *env = JNI::getEnv();
 
-	jstring java_msg = convertToJString(env, msg, getCurrentCharset());
+	jstring java_msg = convertToJString(env, msg.encode(), "UTF-8");
 	if (java_msg == nullptr) {
 		// Show a placeholder indicative of the translation error instead of silent failing
 		java_msg = env->NewStringUTF("?");
diff --git a/backends/platform/android/jni-android.h b/backends/platform/android/jni-android.h
index db80a61ea0..a861c2aa15 100644
--- a/backends/platform/android/jni-android.h
+++ b/backends/platform/android/jni-android.h
@@ -60,7 +60,7 @@ public:
 
 	static void setWindowCaption(const Common::String &caption);
 	static void getDPI(float *values);
-	static void displayMessageOnOSD(const Common::String &msg);
+	static void displayMessageOnOSD(const Common::U32String &msg);
 	static bool openUrl(const Common::String &url);
 	static bool hasTextInClipboard();
 	static Common::U32String getTextFromClipboard();


Commit: 3c79c2a5193aca38f1477aa60ad5383d4f56b5fa
    https://github.com/scummvm/scummvm/commit/3c79c2a5193aca38f1477aa60ad5383d4f56b5fa
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Fix incorrect format specifier for aspect ratio message.

Changed paths:
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp


diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 1797e5d364..86e8a0f102 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2503,7 +2503,7 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 			                                 _hwScreen->w, _hwScreen->h
 			);
 		else
-			message = Common::U32String::format(_("Disabled aspect ratio correction") + Common::U32String("%s\n%d x %d -> %d x %d"),
+			message = Common::U32String::format(_("Disabled aspect ratio correction") + Common::U32String("\n%d x %d -> %d x %d"),
 			                                 _videoMode.screenWidth, _videoMode.screenHeight,
 			                                 _hwScreen->w, _hwScreen->h
 			);


Commit: 388473656e319c3f91cd4079cf67cb1750b64f57
    https://github.com/scummvm/scummvm/commit/388473656e319c3f91cd4079cf67cb1750b64f57
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Add contains utility for string, which takes in a uint.

Changed paths:
    common/str.cpp
    common/str.h


diff --git a/common/str.cpp b/common/str.cpp
index acf579e550..4429dfe856 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -428,6 +428,15 @@ bool String::contains(char x) const {
 	return strchr(c_str(), x) != nullptr;
 }
 
+bool String::contains(uint32 x) const {
+	for (String::const_iterator itr = begin(); itr != end(); itr++) {
+		if (uint32(*itr) == x) {
+			return true;
+		}
+	}
+	return false;
+}
+
 uint64 String::asUint64() const {
 	uint64 result = 0;
 	for (uint32 i = 0; i < _size; ++i) {
diff --git a/common/str.h b/common/str.h
index 72f872684b..79c19ce12e 100644
--- a/common/str.h
+++ b/common/str.h
@@ -177,6 +177,7 @@ public:
 	bool contains(const String &x) const;
 	bool contains(const char *x) const;
 	bool contains(char x) const;
+	bool contains(uint32 x) const;
 
 	/** Return uint64 corrensponding to String's contents. */
 	uint64 asUint64() const;


Commit: 3fc336300fda68e2216ba0d162b70fa16229cb3a
    https://github.com/scummvm/scummvm/commit/3fc336300fda68e2216ba0d162b70fa16229cb3a
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
3DS: Use U32Strings for displaying OSD Messages

Changed paths:
    backends/platform/3ds/osystem-graphics.cpp
    backends/platform/3ds/osystem.h


diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp
index 9049a149bd..7c11acd67b 100644
--- a/backends/platform/3ds/osystem-graphics.cpp
+++ b/backends/platform/3ds/osystem-graphics.cpp
@@ -641,7 +641,7 @@ void OSystem_3DS::copyRectToOverlay(const void *buf, int pitch, int x,
 	_overlay.markDirty();
 }
 
-void OSystem_3DS::displayMessageOnOSD(const char *msg) {
+void OSystem_3DS::displayMessageOnOSD(const Common::U32String &msg) {
 	// The font we are going to use:
 	const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont);
 	if (!font) {
@@ -650,15 +650,17 @@ void OSystem_3DS::displayMessageOnOSD(const char *msg) {
 	}
 
 	// Split the message into separate lines.
-	Common::Array<Common::String> lines;
-	const char *ptr;
-	for (ptr = msg; *ptr; ++ptr) {
-		if (*ptr == '\n') {
-			lines.push_back(Common::String(msg, ptr - msg));
-			msg = ptr + 1;
+	Common::Array<Common::U32String> lines;
+	Common::U32String::const_iterator strLineItrBegin = msg.begin();
+
+	for (Common::U32String::const_iterator itr = msg.begin(); itr != msg.end(); itr++) {
+		if (*itr == '\n') {
+			lines.push_back(Common::U32String(strLineItrBegin, itr));
+			strLineItrBegin = itr + 1;
 		}
 	}
-	lines.push_back(Common::String(msg, ptr - msg));
+	if (strLineItrBegin != msg.end())
+		lines.push_back(Common::U32String(strLineItrBegin, msg.end()));
 
 	// Determine a rect which would contain the message string (clipped to the
 	// screen dimensions).
diff --git a/backends/platform/3ds/osystem.h b/backends/platform/3ds/osystem.h
index b17f744ffb..5f9570c1ee 100644
--- a/backends/platform/3ds/osystem.h
+++ b/backends/platform/3ds/osystem.h
@@ -34,6 +34,7 @@
 #include "backends/platform/3ds/sprite.h"
 #include "common/rect.h"
 #include "common/queue.h"
+#include "common/ustr.h"
 #include "engines/engine.h"
 
 #define TICKS_PER_MSEC 268123
@@ -165,7 +166,7 @@ public:
 	                       int h);
 	virtual int16 getOverlayHeight();
 	virtual int16 getOverlayWidth();
-	void displayMessageOnOSD(const char *msg) override;
+	void displayMessageOnOSD(const Common::U32String &msg) override;
 	void displayActivityIconOnOSD(const Graphics::Surface *icon) override;
 
 	bool showMouse(bool visible);


Commit: a647812bfb63b3ed189f1612fef61a9b3b266abe
    https://github.com/scummvm/scummvm/commit/a647812bfb63b3ed189f1612fef61a9b3b266abe
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
iOS: Use U32 for clipboards.

Changed paths:
    backends/platform/ios7/ios7_osys_main.h
    backends/platform/ios7/ios7_osys_misc.mm


diff --git a/backends/platform/ios7/ios7_osys_main.h b/backends/platform/ios7/ios7_osys_main.h
index 6319ef5ce3..ff652efeb8 100644
--- a/backends/platform/ios7/ios7_osys_main.h
+++ b/backends/platform/ios7/ios7_osys_main.h
@@ -28,6 +28,7 @@
 #include "backends/base-backend.h"
 #include "common/events.h"
 #include "common/str.h"
+#include "common/ustr.h"
 #include "audio/mixer_intern.h"
 #include "backends/fs/posix/posix-fs-factory.h"
 #include "graphics/colormasks.h"
@@ -207,8 +208,8 @@ public:
 	virtual void fatalError() override;
 
 	virtual bool hasTextInClipboard();
-	virtual Common::String getTextFromClipboard();
-	virtual bool setTextInClipboard(const Common::String &text);
+	virtual Common::U32String getTextFromClipboard();
+	virtual bool setTextInClipboard(const Common::U32String &text);
 
 	virtual bool openUrl(const Common::String &url);
 
diff --git a/backends/platform/ios7/ios7_osys_misc.mm b/backends/platform/ios7/ios7_osys_misc.mm
index 1f9232c12e..e55a64f095 100644
--- a/backends/platform/ios7/ios7_osys_misc.mm
+++ b/backends/platform/ios7/ios7_osys_misc.mm
@@ -48,37 +48,45 @@ bool OSystem_iOS7::hasTextInClipboard() {
 	return [[UIPasteboard generalPasteboard] containsPasteboardTypes:UIPasteboardTypeListString];
 }
 
-Common::String OSystem_iOS7::getTextFromClipboard() {
+Common::U32String OSystem_iOS7::getTextFromClipboard() {
 	if (!hasTextInClipboard())
-		return Common::String();
+		return Common::U32String();
 
 	UIPasteboard *pb = [UIPasteboard generalPasteboard];
 	NSString *str = pb.string;
 	if (str == nil)
-		return Common::String();
+		return Common::U32String();
 
 	// If translations are supported, use the current TranslationManager charset and otherwise
 	// use ASCII. If the string cannot be represented using the requested encoding we get a null
 	// pointer below, which is fine as ScummVM would not know what to do with the string anyway.
-#ifdef USE_TRANSLATION
-	NSString* encStr = [NSString stringWithCString:TransMan.getCurrentCharset().c_str() encoding:NSASCIIStringEncoding];
-	NSStringEncoding encoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)encStr));
+#ifdef SCUMM_LITTLE_ENDIAN
+	NSStringEncoding stringEncoding = NSUTF32LittleEndianStringEncoding;
 #else
-	NSStringEncoding encoding = NSISOLatin1StringEncoding;
+	NSStringEncoding stringEncoding = NSUTF32BigEndianStringEncoding;
 #endif
-	return Common::String([str cStringUsingEncoding:encoding]);
+	NSUInteger textLength = [str length];
+	uint32 *text = new uint32[textLength];
+
+	if (![str getBytes:text maxLength:4*textLength usedLength:NULL encoding: stringEncoding options:0 range:NSMakeRange(0, textLength) remainingRange:NULL]) {
+		delete[] text;
+		return Common::U32String();
+	}
+
+	Common::U32String u32String(text, textLength);
+	delete[] text;
+
+	return u32String;
 }
 
-bool OSystem_iOS7::setTextInClipboard(const Common::String &text) {
-#ifdef USE_TRANSLATION
-	NSString* encStr = [NSString stringWithCString:TransMan.getCurrentCharset().c_str() encoding:NSASCIIStringEncoding];
-	NSStringEncoding encoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)encStr));
+bool OSystem_iOS7::setTextInClipboard(const Common::U32String &text) {
+#ifdef SCUMM_LITTLE_ENDIAN
+	NSStringEncoding stringEncoding = NSUTF32LittleEndianStringEncoding;
 #else
-	NSStringEncoding encoding = NSISOLatin1StringEncoding;
+	NSStringEncoding stringEncoding = NSUTF32BigEndianStringEncoding;
 #endif
 	UIPasteboard *pb = [UIPasteboard generalPasteboard];
-	[pb setString:[NSString stringWithCString:text.c_str() encoding:encoding]];
-	return true;
+	return [pb setString:[[NSString alloc] initWithBytes:text.c_str() length:4*text.size() encoding: stringEncoding] forType:NSStringPboardType];
 }
 
 bool OSystem_iOS7::openUrl(const Common::String &url) {


Commit: 1d85a3d8e1b6034055d655fa70f8b0d3d0b627a5
    https://github.com/scummvm/scummvm/commit/1d85a3d8e1b6034055d655fa70f8b0d3d0b627a5
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Fix incorrect type for single char in U32::vformat

Changed paths:
    common/ustr.cpp


diff --git a/common/ustr.cpp b/common/ustr.cpp
index 7055981917..11e560220b 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -604,7 +604,7 @@ int U32String::vformat(U32String::const_iterator fmt, const U32String::const_ite
 	int int_temp;
 	char *string_temp;
 
-	char ch;
+	value_type ch;
 	int length = 0;
 	int len = 0;
 	int pos = 0;


Commit: 6fa5d7ee2f37d9c397682610b6abd31f21186651
    https://github.com/scummvm/scummvm/commit/6fa5d7ee2f37d9c397682610b6abd31f21186651
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
CRYOMNI3D: Assign char outside if condition to avoid ambiguity with new contains utility

Changed paths:
    engines/cryomni3d/versailles/logic.cpp


diff --git a/engines/cryomni3d/versailles/logic.cpp b/engines/cryomni3d/versailles/logic.cpp
index d3d1cb1e75..0d4ca9cf3d 100644
--- a/engines/cryomni3d/versailles/logic.cpp
+++ b/engines/cryomni3d/versailles/logic.cpp
@@ -2417,9 +2417,10 @@ bool CryOmni3DEngine_Versailles::handleEpigraph(ZonFixedImage *fimg) {
 				if (password.size() >= kEpigraphMaxLetters) {
 					continue;
 				}
+				char keyCodeCheck = keyCode - Common::KEYCODE_a + 'A';
 				if (keyCode >= Common::KEYCODE_a &&
 				        keyCode <= Common::KEYCODE_z &&
-				        _epigraphContent.contains(keyCode - Common::KEYCODE_a + 'A')) {
+				        _epigraphContent.contains(keyCodeCheck)) {
 					password += keyCode - Common::KEYCODE_a + 'A';
 				} else {
 					continue;


Commit: 140eddf90a56c15f764accf6366c802070f3bfd3
    https://github.com/scummvm/scummvm/commit/140eddf90a56c15f764accf6366c802070f3bfd3
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Allow vformat to take in a pointer to a translated string

- Fix signed/unsigned comparision in U32String::contains(U32String)

Changed paths:
    common/ustr.cpp
    common/ustr.h


diff --git a/common/ustr.cpp b/common/ustr.cpp
index 11e560220b..5c62cef513 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -234,7 +234,7 @@ bool U32String::contains(const U32String &otherString) const {
 		return false;
 	}
 
-	int size = 0;
+	uint32 size = 0;
 	U32String::const_iterator itr = otherString.begin();
 
 	for (U32String::const_iterator itr2 = begin(); itr != otherString.end() && itr2 != end(); itr2++) {
@@ -268,6 +268,12 @@ void U32String::insertString(String s, uint32 p) {
 	}
 }
 
+void U32String::insertString(uint *s, uint32 p) {
+	while (*s != '\0') {
+		U32String::insertChar(*s++, p++);
+	}
+}
+
 void U32String::deleteChar(uint32 p) {
 	assert(p < _size);
 
@@ -605,9 +611,11 @@ int U32String::vformat(U32String::const_iterator fmt, const U32String::const_ite
 	char *string_temp;
 
 	value_type ch;
+	value_type *u32string_temp;
 	int length = 0;
 	int len = 0;
 	int pos = 0;
+	int tempPos = 0;
 
 	char buffer[512];
 
@@ -615,6 +623,16 @@ int U32String::vformat(U32String::const_iterator fmt, const U32String::const_ite
 		ch = *fmt++;
 		if (ch == '%') {
 			switch (ch = *fmt++) {
+			case 'S':
+				u32string_temp = va_arg(args, uint *);
+
+				tempPos = output.size();
+				output.insertString(u32string_temp, pos);
+				len = output.size() - tempPos;
+				length += len;
+
+				pos += len - 1;
+				break;
 			case 's':
 				string_temp = va_arg(args, char *);
 				len = strlen(string_temp);
diff --git a/common/ustr.h b/common/ustr.h
index 4e601d838b..a12cb31d8a 100644
--- a/common/ustr.h
+++ b/common/ustr.h
@@ -173,6 +173,7 @@ public:
 	/** Insert character c before position p. */
 	void insertChar(value_type c, uint32 p);
 	void insertString(String s, uint32 p);
+	void insertString(uint *s, uint32 p);
 
 	/**
 	 * Removes the value at position p from the string.


Commit: d48453693c907573c6c0e1719489131d1ff4f9d6
    https://github.com/scummvm/scummvm/commit/d48453693c907573c6c0e1719489131d1ff4f9d6
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Use translated strings as arguments for formatting function usage.

Changed paths:
    backends/graphics/openglsdl/openglsdl-graphics.cpp
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    common/achievements.cpp


diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 79113a35f8..30e1807fa9 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -659,7 +659,10 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 		endGFXTransaction();
 
 #ifdef USE_OSD
-		Common::U32String message = _("Stretch mode") + Common::U32String(": ") + _(stretchModes[index].description);
+		Common::U32String message = Common::U32String::format(Common::U32String("%S: %S"),
+			_("Stretch mode").c_str(),
+			_(stretchModes[index].description).c_str()
+		);
 		displayMessageOnOSD(message);
 #endif
 
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 86e8a0f102..ef87ee550d 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2465,7 +2465,8 @@ void SurfaceSdlGraphicsManager::handleScalerHotkeys(int scalefactor, int scalerT
 		}
 		if (newScalerName) {
 			const Common::U32String message = Common::U32String::format(
-				_("Active graphics filter:") + Common::U32String("%s\n%d x %d -> %d x %d"),
+				Common::U32String("%S %s\n%d x %d -> %d x %d"),
+				_("Active graphics filter:").c_str(),
 				newScalerName,
 				_videoMode.screenWidth, _videoMode.screenHeight,
 				_hwScreen->w, _hwScreen->h);
@@ -2498,12 +2499,14 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 #ifdef USE_OSD
 		Common::U32String message;
 		if (_videoMode.aspectRatioCorrection)
-			message = Common::U32String::format(_("Enabled aspect ratio correction") + Common::U32String("\n%d x %d -> %d x %d"),
+			message = Common::U32String::format(Common::U32String("%S\n%d x %d -> %d x %d"),
+											 _("Enabled aspect ratio correction").c_str(),
 			                                 _videoMode.screenWidth, _videoMode.screenHeight,
 			                                 _hwScreen->w, _hwScreen->h
 			);
 		else
-			message = Common::U32String::format(_("Disabled aspect ratio correction") + Common::U32String("\n%d x %d -> %d x %d"),
+			message = Common::U32String::format(Common::U32String("%S\n%d x %d -> %d x %d"),
+											 _("Disabled aspect ratio correction").c_str(),
 			                                 _videoMode.screenWidth, _videoMode.screenHeight,
 			                                 _hwScreen->w, _hwScreen->h
 			);
@@ -2549,7 +2552,10 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 		endGFXTransaction();
 
 #ifdef USE_OSD
-		Common::U32String message = _("Stretch mode") + Common::U32String(": ") + _(s_supportedStretchModes[index].description);
+		Common::U32String message = Common::U32String::format(Common::U32String("%S: %S"),
+														_("Stretch mode").c_str(),
+														_(s_supportedStretchModes[index].description).c_str()
+									);
 		displayMessageOnOSD(message);
 #endif
 		_forceRedraw = true;
diff --git a/common/achievements.cpp b/common/achievements.cpp
index 20663a3f6f..1aee276917 100644
--- a/common/achievements.cpp
+++ b/common/achievements.cpp
@@ -89,7 +89,10 @@ bool AchievementsManager::setAchievement(const String &id, const String &display
 
 	if (!displayedMessage.empty() && g_system) {
 		U32String msg;
-		msg = _("Achievement unlocked!") + Common::U32String("\n") + Common::U32String(displayedMessage);
+		msg = Common::U32String::format(Common::U32String("%S\n%S"),
+			_("Achievement unlocked!").c_str(),
+			Common::U32String(displayedMessage).c_str()
+		);
 		g_system->displayMessageOnOSD(msg);
 	}
 


Commit: caa8a5d7bbbcd165f7be6b139dc023bb9f68f4e6
    https://github.com/scummvm/scummvm/commit/caa8a5d7bbbcd165f7be6b139dc023bb9f68f4e6
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
MACOSX: Fix memory leak in copy to clipboard

Changed paths:
    backends/platform/sdl/macosx/macosx_wrapper.mm


diff --git a/backends/platform/sdl/macosx/macosx_wrapper.mm b/backends/platform/sdl/macosx/macosx_wrapper.mm
index 18af84da58..c30ebe89ba 100644
--- a/backends/platform/sdl/macosx/macosx_wrapper.mm
+++ b/backends/platform/sdl/macosx/macosx_wrapper.mm
@@ -75,7 +75,10 @@ bool setTextInClipboardMacOSX(const Common::U32String &text) {
 #else
 	NSStringEncoding stringEncoding = NSUTF32BigEndianStringEncoding;
 #endif
-	return [pb setString:[[NSString alloc] initWithBytes:text.c_str() length:4*text.size() encoding: stringEncoding] forType:NSStringPboardType];
+	NSString *nsstring = [[NSString alloc] initWithBytes:text.c_str() length:4*text.size() encoding: stringEncoding];
+	bool status =  [pb setString:nsstring forType:NSStringPboardType];
+	[nsstring release];
+	return status;
 }
 
 Common::String getDesktopPathMacOSX() {


Commit: 1e8cb29a54792fc2e46c2b1e9b376a4407bd386f
    https://github.com/scummvm/scummvm/commit/1e8cb29a54792fc2e46c2b1e9b376a4407bd386f
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
IOS7: Fix memory leak and compilation for copy to clipboard

Changed paths:
    backends/platform/ios7/ios7_osys_misc.mm


diff --git a/backends/platform/ios7/ios7_osys_misc.mm b/backends/platform/ios7/ios7_osys_misc.mm
index e55a64f095..26fe66cf74 100644
--- a/backends/platform/ios7/ios7_osys_misc.mm
+++ b/backends/platform/ios7/ios7_osys_misc.mm
@@ -86,7 +86,10 @@ bool OSystem_iOS7::setTextInClipboard(const Common::U32String &text) {
 	NSStringEncoding stringEncoding = NSUTF32BigEndianStringEncoding;
 #endif
 	UIPasteboard *pb = [UIPasteboard generalPasteboard];
-	return [pb setString:[[NSString alloc] initWithBytes:text.c_str() length:4*text.size() encoding: stringEncoding] forType:NSStringPboardType];
+	NSString *nsstring = [[NSString alloc] initWithBytes:text.c_str() length:4*text.size() encoding: stringEncoding];
+	[pb setString:nsstring];
+	[nsstring release];
+	return true;
 }
 
 bool OSystem_iOS7::openUrl(const Common::String &url) {


Commit: 8c5611c3ca8d995ddbc96bcbc166b105a71db6f1
    https://github.com/scummvm/scummvm/commit/8c5611c3ca8d995ddbc96bcbc166b105a71db6f1
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Fix unused u32format where translations are used.

- Misc: Remove incorrect space.

Changed paths:
    gui/downloaddialog.cpp
    gui/editrecorddialog.cpp
    gui/options.cpp


diff --git a/gui/downloaddialog.cpp b/gui/downloaddialog.cpp
index 173df7d01d..1c081f5ee8 100644
--- a/gui/downloaddialog.cpp
+++ b/gui/downloaddialog.cpp
@@ -212,14 +212,14 @@ Common::U32String DownloadDialog::getSizeLabelText() {
 	Common::String downloaded, downloadedUnits, total, totalUnits;
 	downloaded = getHumanReadableBytes(CloudMan.getDownloadBytesNumber(), downloadedUnits);
 	total = getHumanReadableBytes(CloudMan.getDownloadTotalBytesNumber(), totalUnits);
-	return Common::U32String::format(_("Downloaded %s %s / %s %s"), downloaded.c_str(), _(downloadedUnits.c_str()).encode().c_str(), total.c_str(), _(totalUnits.c_str()).encode().c_str());
+	return Common::U32String::format(_("Downloaded %s %S / %s %S"), downloaded.c_str(), _(downloadedUnits).c_str(), total.c_str(), _(totalUnits).c_str());
 }
 
 Common::U32String DownloadDialog::getSpeedLabelText() {
 	Common::String speed, speedUnits;
 	speed = getHumanReadableBytes(CloudMan.getDownloadSpeed(), speedUnits);
 	speedUnits += "/s";
-	return Common::U32String::format(_("Download speed: %s %s"), speed.c_str(), _(speedUnits).encode().c_str());
+	return Common::U32String::format(_("Download speed: %s %S"), speed.c_str(), _(speedUnits).c_str());
 }
 
 void DownloadDialog::refreshWidgets() {
diff --git a/gui/editrecorddialog.cpp b/gui/editrecorddialog.cpp
index 15752ad872..f1eb02e0b7 100644
--- a/gui/editrecorddialog.cpp
+++ b/gui/editrecorddialog.cpp
@@ -55,7 +55,7 @@ EditRecordDialog::~EditRecordDialog() {
 }
 
 EditRecordDialog::EditRecordDialog(const Common::U32String author, const Common::String name, const Common::String notes) : Dialog("EditRecordDialog") {
-	new StaticTextWidget(this, "EditRecordDialog.AuthorLabel" , _("Author:"));
+	new StaticTextWidget(this, "EditRecordDialog.AuthorLabel", _("Author:"));
 	new StaticTextWidget(this, "EditRecordDialog.NameLabel", _("Name:"));
 	new StaticTextWidget(this, "EditRecordDialog.NotesLabel", _("Notes:"));
 	_authorEdit = new EditTextWidget(this, "EditRecordDialog.AuthorEdit", Common::U32String(""));
diff --git a/gui/options.cpp b/gui/options.cpp
index ecd48842fc..e52adc3721 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2805,7 +2805,7 @@ void GlobalOptionsDialog::setupCloudTab() {
 		uint64 usedSpace = CloudMan.getStorageUsedSpace(_selectedStorageIndex);
 		Common::String usedSpaceNumber, usedSpaceUnits;
 		usedSpaceNumber = Common::getHumanReadableBytes(usedSpace, usedSpaceUnits);
-		_storageUsedSpace->setLabel(Common::String::format("%s %s", usedSpaceNumber.c_str(), _(usedSpaceUnits.c_str()).encode().c_str()));
+		_storageUsedSpace->setLabel(Common::U32String::format(Common::U32String("%s %S"), usedSpaceNumber.c_str(), _(usedSpaceUnits).c_str()));
 		_storageUsedSpace->setVisible(shownConnectedInfo);
 	}
 	if (_storageSyncHint) {


Commit: c87d0d683441cb2a51b9cfc62bfd6b9215fe426a
    https://github.com/scummvm/scummvm/commit/c87d0d683441cb2a51b9cfc62bfd6b9215fe426a
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
BACKENDS: NETWORKING: Remove unused toUtf8 helper

- All conversions are handled by Common:: helpers.

Changed paths:
    backends/networking/sdl_net/handlerutils.cpp
    backends/networking/sdl_net/handlerutils.h


diff --git a/backends/networking/sdl_net/handlerutils.cpp b/backends/networking/sdl_net/handlerutils.cpp
index fb2385a0c3..1999ea7881 100644
--- a/backends/networking/sdl_net/handlerutils.cpp
+++ b/backends/networking/sdl_net/handlerutils.cpp
@@ -172,21 +172,6 @@ bool HandlerUtils::permittedPath(const Common::String path) {
 	return hasPermittedPrefix(path) && !isBlacklisted(path);
 }
 
-Common::String HandlerUtils::toUtf8(const char *text) {
-#ifdef USE_TRANSLATION
-	Common::String guiEncoding = TransMan.getCurrentCharset();
-	if (guiEncoding != "ASCII") {
-		char *utf8Text = Common::Encoding::convert("utf-8", guiEncoding, text, strlen(text));
-		if (utf8Text != nullptr) {
-			Common::String str(utf8Text);
-			free(utf8Text);
-			return str;
-		}
-	}
-#endif
-	return Common::String(text);
-}
-
 void HandlerUtils::setMessageHandler(Client &client, Common::String message, Common::String redirectTo) {
 	Common::String response = "<html><head><title>ScummVM</title><meta charset=\"utf-8\"/></head><body>{message}</body></html>";
 
diff --git a/backends/networking/sdl_net/handlerutils.h b/backends/networking/sdl_net/handlerutils.h
index 39daac781b..0958294595 100644
--- a/backends/networking/sdl_net/handlerutils.h
+++ b/backends/networking/sdl_net/handlerutils.h
@@ -41,8 +41,6 @@ public:
 	static bool hasPermittedPrefix(const Common::String &path);
 	static bool permittedPath(const Common::String path);
 
-	static Common::String toUtf8(const char *);
-
 	static void setMessageHandler(Client &client, Common::String message, Common::String redirectTo = "");
 	static void setFilesManagerErrorMessageHandler(Client &client, Common::String message, Common::String redirectTo = "");
 };


Commit: bc8ead4a7c9b04e76d186d961d3269ba3d8e6353
    https://github.com/scummvm/scummvm/commit/bc8ead4a7c9b04e76d186d961d3269ba3d8e6353
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
AGOS: GUI: U32: Remove redundant code

Changed paths:
    engines/agos/saveload.cpp


diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index d89d8f5ec3..8f3320b48b 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -134,7 +134,7 @@ void AGOSEngine::quickLoadOrSave() {
 	if ((getGameType() == GType_SIMON2 && _boxStarHeight == 200) ||
 		(getGameType() == GType_SIMON1 && (getFeatures() & GF_DEMO)) ||
 		_mouseHideCount || _showPreposition) {
-		buf = Common::U32String::format(_("Quick load or save game isn't supported in this location"));
+		buf = _("Quick load or save game isn't supported in this location");
 		GUI::MessageDialog dialog(buf);
 		dialog.runModal();
 		return;


Commit: 87df975686de071415437af60564569107114a8d
    https://github.com/scummvm/scummvm/commit/87df975686de071415437af60564569107114a8d
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Wrap string in U32 if not using translations.

Changed paths:
    common/translation.h


diff --git a/common/translation.h b/common/translation.h
index 9363c50a8c..059567abda 100644
--- a/common/translation.h
+++ b/common/translation.h
@@ -226,8 +226,8 @@ private:
 
 #else // !USE_TRANSLATION
 
-#define _(str) str
-#define _c(str, context) str
+#define _(str) Common::U32String(str)
+#define _c(str, context) Common::U32String(str)
 
 #endif // USE_TRANSLATION
 


Commit: e29e5f1156ce04d8280961ef1ba544000c98c541
    https://github.com/scummvm/scummvm/commit/e29e5f1156ce04d8280961ef1ba544000c98c541
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: TTS: Fix compilation

- While building options, TTS used some translations-dependant variables.

Changed paths:
    gui/options.cpp


diff --git a/gui/options.cpp b/gui/options.cpp
index e52adc3721..7177064582 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1968,8 +1968,8 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
 	_pluginsPath = new StaticTextWidget(boss, prefix + "PluginsPath", _c("None", "path"));
 
 	_pluginsPathClearButton = addClearButton(boss, "GlobalOptions_Paths.PluginsPathClearButton", kPluginsPathClearCmd);
-#endif
-#endif
+#endif // DYNAMIC_MODULES
+#endif // !defined(__DC__)
 }
 
 void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String &prefix, bool lowres) {
@@ -2067,7 +2067,7 @@ void GlobalOptionsDialog::addMiscControls(GuiObject *boss, const Common::String
 	_updatesPopUp->setSelectedTag(Common::UpdateManager::normalizeInterval(ConfMan.getInt("updates_check")));
 
 	new ButtonWidget(boss, prefix + "UpdatesCheckManuallyButton", _("Check now"), Common::U32String(""), kUpdatesCheckCmd);
-#endif
+#endif // USE_UPDATES
 }
 
 #ifdef USE_CLOUD
@@ -2193,7 +2193,7 @@ void GlobalOptionsDialog::addAccessibilityControls(GuiObject *boss, const Common
 	else
 		_ttsVoiceSelectionPopUp->setSelected(0);
 }
-#endif
+#endif // USE_TTS
 
 void GlobalOptionsDialog::apply() {
 	OptionsDialog::apply();
@@ -2224,7 +2224,7 @@ void GlobalOptionsDialog::apply() {
 		ConfMan.set("pluginspath", pluginsPath.encode(), _domain);
 	else
 		ConfMan.removeKey("pluginspath", _domain);
-#endif
+#endif // DYNAMIC_MODULES
 
 #ifdef USE_CLOUD
 #ifdef USE_SDL_NET
@@ -2233,8 +2233,8 @@ void GlobalOptionsDialog::apply() {
 		ConfMan.set("rootpath", rootPath.encode(), "cloud");
 	else
 		ConfMan.removeKey("rootpath", "cloud");
-#endif
-#endif
+#endif // USE_SDL_NET
+#endif // USE_CLOUD
 
 	ConfMan.setInt("autosave_period", _autosavePeriodPopUp->getSelectedTag(), _domain);
 
@@ -2249,7 +2249,7 @@ void GlobalOptionsDialog::apply() {
 			g_system->getUpdateManager()->setUpdateCheckInterval(_updatesPopUp->getSelectedTag());
 		}
 	}
-#endif
+#endif // USE_UPDATES
 
 #ifdef USE_CLOUD
 #ifdef USE_LIBCURL
@@ -2302,7 +2302,7 @@ void GlobalOptionsDialog::apply() {
 
 	bool guiUseGameLanguage = _guiLanguageUseGameLanguageCheckbox->getState();
 	ConfMan.setBool("gui_use_game_language", guiUseGameLanguage, _domain);
-#endif
+#endif // USE_TRANSLATION
 
 	if (_useSystemDialogsCheckbox) {
 		ConfMan.setBool("gui_browser_native", _useSystemDialogsCheckbox->getState(), _domain);
@@ -2337,7 +2337,7 @@ void GlobalOptionsDialog::apply() {
 		if (!isCharsetEqual)
 			errorMessage = _("Theme does not support selected language!");
 		else
-#endif
+#endif // USE_TRANSLATION
 			errorMessage = _("Theme cannot be loaded!");
 
 		g_gui.loadNewTheme(_newTheme, gfxMode, true);
@@ -2348,14 +2348,19 @@ void GlobalOptionsDialog::apply() {
 #ifdef USE_TTS
 	Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
 	if (ttsMan) {
+#ifdef USE_TRANSLATION
 		if (newLang != oldLang) {
 			if (newLang == "C")
 				ttsMan->setLanguage("en");
 			else {
 				ttsMan->setLanguage(newLang);
 			}
-			_ttsVoiceSelectionPopUp->setSelected(0);
 		}
+#else
+		ttsMan->setLanguage("en");
+#endif // USE_TRANSLATION
+
+		_ttsVoiceSelectionPopUp->setSelected(0);
 		int volume = (ConfMan.getInt("speech_volume", "scummvm") * 100) / 256;
 		if (ConfMan.hasKey("mute", "scummvm") && ConfMan.getBool("mute", "scummvm"))
 			volume = 0;
@@ -2367,7 +2372,7 @@ void GlobalOptionsDialog::apply() {
 			selectedVoice = ttsMan->getDefaultVoice();
 		ttsMan->setVoice(selectedVoice);
 	}
-#endif
+#endif // USE_TTS
 
 	if (isRebuildNeeded) {
 		g_gui.setLanguageRTL();


Commit: edec55cf647a856cdfa654def38556a96af8f536
    https://github.com/scummvm/scummvm/commit/edec55cf647a856cdfa654def38556a96af8f536
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GLK: SCOTT: Add new helpers to use translated strings.

Changed paths:
    engines/glk/adrift/os_glk.cpp
    engines/glk/scott/scott.cpp
    engines/glk/scott/scott.h


diff --git a/engines/glk/adrift/os_glk.cpp b/engines/glk/adrift/os_glk.cpp
index c726a5d135..372fcd1f3f 100644
--- a/engines/glk/adrift/os_glk.cpp
+++ b/engines/glk/adrift/os_glk.cpp
@@ -2811,7 +2811,7 @@ static int gsc_startup_code(Common::SeekableReadStream *game_stream, int restore
 		 * Display a brief loading game message; here we have to use a timeout
 		 * to ensure that the text is flushed to Glk.
 		 */
-		g_vm->glk_put_string("Loading game...\n");
+		g_vm->glk_put_string_uni(_("Loading game...\n").c_str());
 		if (g_vm->glk_gestalt(gestalt_Timer, 0)) {
 			event_t event;
 
diff --git a/engines/glk/scott/scott.cpp b/engines/glk/scott/scott.cpp
index 24b1363f23..b23a7c6b59 100644
--- a/engines/glk/scott/scott.cpp
+++ b/engines/glk/scott/scott.cpp
@@ -24,6 +24,7 @@
 #include "glk/quetzal.h"
 #include "common/config-manager.h"
 #include "common/translation.h"
+#include "common/ustr.h"
 
 namespace Glk {
 namespace Scott {
@@ -166,6 +167,18 @@ void Scott::display(winid_t w, const char *fmt, ...) {
 	glk_put_string_stream(glk_window_get_stream(w), msg.c_str());
 }
 
+void Scott::display(winid_t w, const Common::U32String fmt, ...) {
+	Common::U32String msg;
+
+	va_list ap;
+
+	va_start(ap, fmt);
+	Common::U32String::vformat(fmt.begin(), fmt.end(), msg, ap);
+	va_end(ap);
+
+	glk_put_string_stream_uni(glk_window_get_stream(w), msg.c_str());
+}
+
 void Scott::delay(int seconds) {
 	event_t ev;
 
@@ -385,13 +398,18 @@ void Scott::output(const Common::String &a) {
 		display(_bottomWindow, "%s", a.c_str());
 }
 
+void Scott::output(const Common::U32String &a) {
+	if (_saveSlot == -1)
+		display(_bottomWindow, Common::U32String("%S"), a.c_str());
+}
+
 void Scott::outputNumber(int a) {
 	display(_bottomWindow, "%d", a);
 }
 
 void Scott::look(void) {
-	const char *const ExitNames[6] = {
-		_("North").encode().c_str(), _("South").encode().c_str(), _("East").encode().c_str(), _("West").encode().c_str(), _("Up").encode().c_str(), _("Down").encode().c_str()
+	const uint32 *const ExitNames[6] = {
+		_("North").c_str(), _("South").c_str(), _("East").c_str(), _("West").c_str(), _("Up").c_str(), _("Down").c_str()
 	};
 	Room *r;
 	int ct, f;
@@ -403,9 +421,9 @@ void Scott::look(void) {
 	if ((_bitFlags & (1 << DARKBIT)) && _items[LIGHT_SOURCE]._location != CARRIED
 			&& _items[LIGHT_SOURCE]._location != MY_LOC) {
 		if (_options & YOUARE)
-			display(_topWindow, _("You can't see. It is too dark!\n").encode().c_str());
+			display(_topWindow, _("You can't see. It is too dark!\n"));
 		else
-			display(_topWindow, _("I can't see. It is too dark!\n").encode().c_str());
+			display(_topWindow, _("I can't see. It is too dark!\n"));
 		if (_options & TRS80_STYLE)
 			display(_topWindow, TRS80_LINE);
 		return;
@@ -415,27 +433,27 @@ void Scott::look(void) {
 		display(_topWindow, "%s\n", r->_text.c_str() + 1);
 	else {
 		if (_options & YOUARE)
-			display(_topWindow, _("You are in a %s\n").encode().c_str(), r->_text.c_str());
+			display(_topWindow, _("You are in a %s\n"), r->_text.c_str());
 		else
-			display(_topWindow, _("I'm in a %s\n").encode().c_str(), r->_text.c_str());
+			display(_topWindow, _("I'm in a %s\n"), r->_text.c_str());
 	}
 
 	ct = 0;
 	f = 0;
-	display(_topWindow, _("\nObvious exits: ").encode().c_str());
+	display(_topWindow, _("\nObvious exits: "));
 	while (ct < 6) {
 		if (r->_exits[ct] != 0) {
 			if (f == 0)
 				f = 1;
 			else
 				display(_topWindow, ", ");
-			display(_topWindow, "%s", ExitNames[ct]);
+			display(_topWindow, Common::U32String("%S"), ExitNames[ct]);
 		}
 		ct++;
 	}
 
 	if (f == 0)
-		display(_topWindow, _("none").encode().c_str());
+		display(_topWindow, _("none"));
 	display(_topWindow, ".\n");
 	ct = 0;
 	f = 0;
@@ -444,10 +462,10 @@ void Scott::look(void) {
 		if (_items[ct]._location == MY_LOC) {
 			if (f == 0) {
 				if (_options & YOUARE) {
-					display(_topWindow, _("\nYou can also see: ").encode().c_str());
+					display(_topWindow, _("\nYou can also see: "));
 					pos = 18;
 				} else {
-					display(_topWindow, _("\nI can also see: ").encode().c_str());
+					display(_topWindow, _("\nI can also see: "));
 					pos = 16;
 				}
 				f++;
diff --git a/engines/glk/scott/scott.h b/engines/glk/scott/scott.h
index ee8cb74f74..dc7979d735 100644
--- a/engines/glk/scott/scott.h
+++ b/engines/glk/scott/scott.h
@@ -141,6 +141,7 @@ private:
 	void initialize();
 
 	void display(winid_t w, const char *fmt, ...);
+	void display(winid_t w, const Common::U32String fmt, ...);
 	void delay(int seconds);
 	void fatal(const char *x);
 	void clearScreen(void);
@@ -151,6 +152,7 @@ private:
 	Common::String readString(Common::SeekableReadStream *f);
 	void loadDatabase(Common::SeekableReadStream *f, bool loud);
 	void output(const Common::String &a);
+	void output(const Common::U32String &a);
 	void outputNumber(int a);
 	void look(void);
 	int whichWord(const char *word, const Common::StringArray &list);


Commit: 840f08d5375088a3c29ed47a23db824b76c2f79c
    https://github.com/scummvm/scummvm/commit/840f08d5375088a3c29ed47a23db824b76c2f79c
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Code cleanup & misc fixes

- Fix a translation for scumm subtitle settings dialogs.

Changed paths:
    engines/bbvs/dialogs.cpp
    engines/cryomni3d/versailles/logic.cpp
    engines/engine.cpp
    engines/hugo/dialogs.cpp
    engines/scumm/dialogs.cpp


diff --git a/engines/bbvs/dialogs.cpp b/engines/bbvs/dialogs.cpp
index c7afb748c2..4cd421143b 100644
--- a/engines/bbvs/dialogs.cpp
+++ b/engines/bbvs/dialogs.cpp
@@ -86,11 +86,11 @@ MainMenu::~MainMenu() {
 }
 
 void MainMenu::init() {
-	_buttons[0] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""), Common::U32String(""), 0);
-	_buttons[1] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""), Common::U32String(""), 0);
-	_buttons[2] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""), Common::U32String(""), 0);
-	_buttons[3] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""), Common::U32String(""), 0);
-	_buttons[4] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""), Common::U32String(""), 0);
+	_buttons[0] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""));
+	_buttons[1] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""));
+	_buttons[2] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""));
+	_buttons[3] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""));
+	_buttons[4] = new GUI::ButtonWidget(this, 0, 0, 1, 1, Common::U32String(""));
 	gotoMenuScreen(kMainMenuScr);
 }
 
diff --git a/engines/cryomni3d/versailles/logic.cpp b/engines/cryomni3d/versailles/logic.cpp
index 0d4ca9cf3d..3e583ea11f 100644
--- a/engines/cryomni3d/versailles/logic.cpp
+++ b/engines/cryomni3d/versailles/logic.cpp
@@ -2417,10 +2417,9 @@ bool CryOmni3DEngine_Versailles::handleEpigraph(ZonFixedImage *fimg) {
 				if (password.size() >= kEpigraphMaxLetters) {
 					continue;
 				}
-				char keyCodeCheck = keyCode - Common::KEYCODE_a + 'A';
 				if (keyCode >= Common::KEYCODE_a &&
 				        keyCode <= Common::KEYCODE_z &&
-				        _epigraphContent.contains(keyCodeCheck)) {
+				        _epigraphContent.contains((char)(keyCode - Common::KEYCODE_a + 'A'))) {
 					password += keyCode - Common::KEYCODE_a + 'A';
 				} else {
 					continue;
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 4fb538f6f2..dccf320497 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -316,8 +316,7 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
 	// Error out on size switch failure
 	if (gfxError & OSystem::kTransactionSizeChangeFailed) {
 		Common::U32String message;
-		message = Common::U32String::format(
-			_("Could not switch to resolution '%dx%d'."), width, height);
+		message = Common::U32String::format(_("Could not switch to resolution '%dx%d'."), width, height);
 
 		GUIErrorMessage(message);
 		error("Could not switch to resolution '%dx%d'.", width, height);
diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp
index 62a508953a..ed50add5a9 100644
--- a/engines/hugo/dialogs.cpp
+++ b/engines/hugo/dialogs.cpp
@@ -56,15 +56,15 @@ void TopMenu::init() {
 	int x = kMenuX;
 	int y = kMenuY;
 
-	_whatButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("What is it?"),				kCmdWhat);
-	_musicButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Music"),						kCmdMusic);
-	_soundFXButton =	new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Sound FX"),					kCmdSoundFX);
-	_saveButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Save game"),					kCmdSave);
-	_loadButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Load game"),					kCmdLoad);
-	_recallButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Recall last command"),		kCmdRecall);
-	_turboButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Turbo"),						kCmdTurbo);
-	_lookButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Description of the scene"),	kCmdLook);
-	_inventButton =		new GUI::PicButtonWidget(this,	x, y, kButtonWidth, kButtonHeight,	Common::U32String("Inventory"),					kCmdInvent);
+	_whatButton    =  new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight,	Common::U32String("What is it?"),              kCmdWhat);
+	_musicButton   =  new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight,	Common::U32String("Music"),                    kCmdMusic);
+	_soundFXButton =  new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight,	Common::U32String("Sound FX"),                 kCmdSoundFX);
+	_saveButton    =  new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight,	Common::U32String("Save game"),                kCmdSave);
+	_loadButton    =  new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight,	Common::U32String("Load game"),                kCmdLoad);
+	_recallButton  =  new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight,	Common::U32String("Recall last command"),      kCmdRecall);
+	_turboButton   =  new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight,	Common::U32String("Turbo"),                    kCmdTurbo);
+	_lookButton    =  new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight,	Common::U32String("Description of the scene"), kCmdLook);
+	_inventButton  =  new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight,	Common::U32String("Inventory"),                kCmdInvent);
 }
 
 void TopMenu::reflowLayout() {
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index aee429d796..d4edc323fc 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -609,7 +609,7 @@ void SubtitleSettingsDialog::cycleValue() {
 		_value = 0;
 
 	if (_value == 1 && g_system->getOverlayWidth() <= 320)
-		setInfoText(Common::U32String(_sc("Speech & Subs", "lowres")));
+		setInfoText(_c("Speech & Subs", "lowres"));
 	else
 		setInfoText(_(subtitleDesc[_value]));
 


Commit: e3c1fece97312066e22a1ddf3e55657b2d20c6a9
    https://github.com/scummvm/scummvm/commit/e3c1fece97312066e22a1ddf3e55657b2d20c6a9
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
IOS7: Fix compilation

Changed paths:
    backends/platform/ios7/ios7_osys_events.cpp


diff --git a/backends/platform/ios7/ios7_osys_events.cpp b/backends/platform/ios7/ios7_osys_events.cpp
index 0387503739..fa8bb5bb88 100644
--- a/backends/platform/ios7/ios7_osys_events.cpp
+++ b/backends/platform/ios7/ios7_osys_events.cpp
@@ -309,7 +309,7 @@ bool OSystem_iOS7::handleEvent_mouseSecondDragged(Common::Event &event, int x, i
 		if (absX < kMaxDeviation && -vecY >= kNeededLength) {
 			// Swipe up
 			_mouseClickAndDragEnabled = !_mouseClickAndDragEnabled;
-			const char *dialogMsg;
+			Common::U32String dialogMsg;
 			if (_mouseClickAndDragEnabled) {
 				_touchpadModeEnabled = false;
 				dialogMsg = _("Mouse-click-and-drag mode enabled.");
@@ -323,7 +323,7 @@ bool OSystem_iOS7::handleEvent_mouseSecondDragged(Common::Event &event, int x, i
 		if (absY < kMaxDeviation && vecX >= kNeededLength) {
 			// Swipe right
 			_touchpadModeEnabled = !_touchpadModeEnabled;
-			const char *dialogMsg;
+			Common::U32String dialogMsg;
 			if (_touchpadModeEnabled)
 				dialogMsg = _("Touchpad mode enabled.");
 			else
@@ -437,7 +437,7 @@ bool OSystem_iOS7::handleEvent_swipe(Common::Event &event, int direction, int to
 		switch ((UIViewSwipeDirection)direction) {
 		case kUIViewSwipeUp: {
 			_mouseClickAndDragEnabled = !_mouseClickAndDragEnabled;
-			const char *dialogMsg;
+			Common::U32String dialogMsg;
 			if (_mouseClickAndDragEnabled) {
 				_touchpadModeEnabled = false;
 				dialogMsg = _("Mouse-click-and-drag mode enabled.");
@@ -459,7 +459,7 @@ bool OSystem_iOS7::handleEvent_swipe(Common::Event &event, int direction, int to
 		case kUIViewSwipeRight: {
 			// Swipe right
 			_touchpadModeEnabled = !_touchpadModeEnabled;
-			const char *dialogMsg;
+			Common::U32String dialogMsg;
 			if (_touchpadModeEnabled)
 				dialogMsg = _("Touchpad mode enabled.");
 			else


Commit: 58d13fb8631300b4b4aa60595a28cebaaef11fdb
    https://github.com/scummvm/scummvm/commit/58d13fb8631300b4b4aa60595a28cebaaef11fdb
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
IPHONE: Fix compilation

Changed paths:
    backends/platform/iphone/osys_events.cpp


diff --git a/backends/platform/iphone/osys_events.cpp b/backends/platform/iphone/osys_events.cpp
index 617f6b8843..c60fea6f8e 100644
--- a/backends/platform/iphone/osys_events.cpp
+++ b/backends/platform/iphone/osys_events.cpp
@@ -294,7 +294,7 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
 		if (absX < kMaxDeviation && -vecY >= kNeededLength) {
 			// Swipe up
 			_mouseClickAndDragEnabled = !_mouseClickAndDragEnabled;
-			const char *dialogMsg;
+			Common::U32String dialogMsg;
 			if (_mouseClickAndDragEnabled) {
 				_touchpadModeEnabled = false;
 				dialogMsg = _("Mouse-click-and-drag mode enabled.");
@@ -308,7 +308,7 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
 		if (absY < kMaxDeviation && vecX >= kNeededLength) {
 			// Swipe right
 			_touchpadModeEnabled = !_touchpadModeEnabled;
-			const char *dialogMsg;
+			Common::U32String dialogMsg;
 			if (_touchpadModeEnabled)
 				dialogMsg = _("Touchpad mode enabled.");
 			else


Commit: 6b7c646ba41ca9bd7e93b02af873454bf93f91c9
    https://github.com/scummvm/scummvm/commit/6b7c646ba41ca9bd7e93b02af873454bf93f91c9
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
WII: Use U32Strings for options dialog.

Changed paths:
    backends/platform/wii/options.cpp
    backends/platform/wii/options.h


diff --git a/backends/platform/wii/options.cpp b/backends/platform/wii/options.cpp
index 6db9cef8c9..6ce9bf81c1 100644
--- a/backends/platform/wii/options.cpp
+++ b/backends/platform/wii/options.cpp
@@ -44,8 +44,8 @@ WiiOptionsDialog::WiiOptionsDialog(bool doubleStrike) :
 		_strUnderscanY = "wii_video_default_underscan_y";
 	}
 
-	new ButtonWidget(this, _w - 108 - 16, _h - 24 - 16, 108, 24, _("OK"), 0, 'k');
-	new ButtonWidget(this, _w - 216 - 32, _h - 24 - 16, 108, 24, _("Cancel"), 0, 'c');
+	new ButtonWidget(this, _w - 108 - 16, _h - 24 - 16, 108, 24, _("OK"), U32String(""), 'k');
+	new ButtonWidget(this, _w - 216 - 32, _h - 24 - 16, 108, 24, _("Cancel"), U32String(""), 'c');
 	_tab = new TabWidget(this, 0, 0, _w, _h - 54);
 
 	_tabVideo = _tab->addTab(_("Video"), "");
@@ -58,13 +58,13 @@ WiiOptionsDialog::WiiOptionsDialog(bool doubleStrike) :
 
 	new StaticTextWidget(_tab, 16, 48, 128, 16,
 						 _("Horizontal underscan:"), Graphics::kTextAlignRight);
-	_sliderUnderscanX = new SliderWidget(_tab, 160, 47, 128, 18, 0, 'x');
+	_sliderUnderscanX = new SliderWidget(_tab, 160, 47, 128, 18, U32String(""), 'x');
 	_sliderUnderscanX->setMinValue(0);
 	_sliderUnderscanX->setMaxValue(32);
 
 	new StaticTextWidget(_tab, 16, 80, 128, 16,
 						 _("Vertical underscan:"), Graphics::kTextAlignRight);
-	_sliderUnderscanY = new SliderWidget(_tab, 160, 79, 128, 18, 0, 'y');
+	_sliderUnderscanY = new SliderWidget(_tab, 160, 79, 128, 18, U32String(""), 'y');
 	_sliderUnderscanY->setMinValue(0);
 	_sliderUnderscanY->setMaxValue(32);
 
@@ -72,13 +72,13 @@ WiiOptionsDialog::WiiOptionsDialog(bool doubleStrike) :
 
 	new StaticTextWidget(_tab, 16, 16, 128, 16,
 						 _("GC Pad sensitivity:"), Graphics::kTextAlignRight);
-	_sliderPadSensitivity = new SliderWidget(_tab, 160, 15, 128, 18, 0, 'x');
+	_sliderPadSensitivity = new SliderWidget(_tab, 160, 15, 128, 18, U32String(""), 'x');
 	_sliderPadSensitivity->setMinValue(0);
 	_sliderPadSensitivity->setMaxValue(64);
 
 	new StaticTextWidget(_tab, 16, 44, 128, 16,
 						 _("GC Pad acceleration:"), Graphics::kTextAlignRight);
-	_sliderPadAcceleration = new SliderWidget(_tab, 160, 43, 128, 18, 0, 'y');
+	_sliderPadAcceleration = new SliderWidget(_tab, 160, 43, 128, 18, U32String(""), 'y');
 	_sliderPadAcceleration->setMinValue(0);
 	_sliderPadAcceleration->setMaxValue(8);
 
@@ -90,8 +90,8 @@ WiiOptionsDialog::WiiOptionsDialog(bool doubleStrike) :
 	_textDVDStatus = new StaticTextWidget(_tab, 96, 16, 272, 16, _("Unknown"),
 											Graphics::kTextAlignLeft);
 
-	new ButtonWidget(_tab, 16, 48, 108, 24, _("Mount DVD"), 0, 'mdvd');
-	new ButtonWidget(_tab, 140, 48, 108, 24, _("Unmount DVD"), 0, 'udvd');
+	new ButtonWidget(_tab, 16, 48, 108, 24, _("Mount DVD"), U32String(""), 'mdvd');
+	new ButtonWidget(_tab, 140, 48, 108, 24, _("Unmount DVD"), U32String(""), 'udvd');
 #endif
 
 #ifdef USE_WII_SMB
@@ -104,24 +104,24 @@ WiiOptionsDialog::WiiOptionsDialog(bool doubleStrike) :
 
 	new StaticTextWidget(_tab, 16, 52, 64, 16,
 						 _("Server:"), Graphics::kTextAlignRight);
-	_editSMBServer = new EditTextWidget(_tab, 96, 48, _w - 96 - 32, 24, "");
+	_editSMBServer = new EditTextWidget(_tab, 96, 48, _w - 96 - 32, 24, U32String(""));
 
 	new StaticTextWidget(_tab, 16, 92, 64, 16,
 						 _("Share:"), Graphics::kTextAlignRight);
-	_editSMBShare = new EditTextWidget(_tab, 96, 88, _w - 96 - 32, 24, "");
+	_editSMBShare = new EditTextWidget(_tab, 96, 88, _w - 96 - 32, 24, U32String(""));
 
 	new StaticTextWidget(_tab, 16, 132, 64, 16,
 						 _("Username:"), Graphics::kTextAlignRight);
-	_editSMBUsername = new EditTextWidget(_tab, 96, 128, _w - 96 - 32, 24, "");
+	_editSMBUsername = new EditTextWidget(_tab, 96, 128, _w - 96 - 32, 24, U32String(""));
 
 	new StaticTextWidget(_tab, 16, 172, 64, 16,
 						 _("Password:"), Graphics::kTextAlignRight);
-	_editSMBPassword = new EditTextWidget(_tab, 96, 168, _w - 96 - 32, 24, "");
+	_editSMBPassword = new EditTextWidget(_tab, 96, 168, _w - 96 - 32, 24, U32String(""));
 
-	new ButtonWidget(_tab, 16, 208, 108, 24, _("Init network"), 0, 'net');
+	new ButtonWidget(_tab, 16, 208, 108, 24, _("Init network"), U32String(""), 'net');
 
-	new ButtonWidget(_tab, 140, 208, 108, 24, _("Mount SMB"), 0, 'msmb');
-	new ButtonWidget(_tab, 264, 208, 108, 24, _("Unmount SMB"), 0, 'usmb');
+	new ButtonWidget(_tab, 140, 208, 108, 24, _("Mount SMB"), U32String(""), 'msmb');
+	new ButtonWidget(_tab, 264, 208, 108, 24, _("Unmount SMB"), U32String(""), 'usmb');
 #endif
 
 	_tab->setActiveTab(_tabVideo);
@@ -153,7 +153,7 @@ void WiiOptionsDialog::handleTickle() {
 #ifdef USE_WII_SMB
 	if (tab == _tabSMB) {
 		s32 status = net_get_status();
-		String label;
+		U32String label;
 
 		switch (status) {
 		case 0:
@@ -183,7 +183,7 @@ void WiiOptionsDialog::handleTickle() {
 			break;
 
 		default:
-			label = String::format(_("Network not initialized (%d)"), status);
+			label = U32String::format(_("Network not initialized (%d)"), status);
 			break;
 		}
 
diff --git a/backends/platform/wii/options.h b/backends/platform/wii/options.h
index 1fa4acd50e..0128050304 100644
--- a/backends/platform/wii/options.h
+++ b/backends/platform/wii/options.h
@@ -24,6 +24,7 @@
 #define _WII_OPTIONS_H_
 
 #include "common/str.h"
+#include "common/ustr.h"
 #include "gui/dialog.h"
 #include "gui/widgets/tab.h"
 #include "gui/widgets/edittext.h"
@@ -32,6 +33,7 @@ using namespace GUI;
 
 class WiiOptionsDialog: public GUI::Dialog {
 	typedef Common::String String;
+	typedef Common::U32String U32String;
 
 public:
 	WiiOptionsDialog(bool doubleStrike);


Commit: ad20df4b2796dcf60c1371cb6b0e7342d7b8858e
    https://github.com/scummvm/scummvm/commit/ad20df4b2796dcf60c1371cb6b0e7342d7b8858e
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
SYMBIAN: Properly return U32String when get action name.

Changed paths:
    backends/platform/symbian/src/SymbianActions.cpp
    backends/platform/symbian/src/SymbianActions.h


diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp
index 3f5eab2b97..efc2e9b1ff 100644
--- a/backends/platform/symbian/src/SymbianActions.cpp
+++ b/backends/platform/symbian/src/SymbianActions.cpp
@@ -74,7 +74,7 @@ void SymbianActions::init() {
 }
 
 
-Common::String SymbianActions::actionName(ActionType action) {
+Common::U32String SymbianActions::actionName(ActionType action) {
 	return _(actionNames[action]);
 }
 
diff --git a/backends/platform/symbian/src/SymbianActions.h b/backends/platform/symbian/src/SymbianActions.h
index bcc8448366..6e09a21623 100644
--- a/backends/platform/symbian/src/SymbianActions.h
+++ b/backends/platform/symbian/src/SymbianActions.h
@@ -28,6 +28,7 @@
 #ifdef GUI_ENABLE_KEYSDIALOG
 
 #include "common/system.h"
+#include "common/ustr.h"
 #include "gui/Key.h"
 #include "gui/Actions.h"
 
@@ -62,7 +63,7 @@ class SymbianActions : public Actions {
 public:
 	// Actions
 	bool perform(ActionType action, bool pushed = true);
-	Common::String actionName(ActionType action);
+	Common::U32String actionName(ActionType action);
 	int size();
 	static void init();
 	void initInstanceMain(OSystem *mainSystem);


Commit: f295d642a16fceabbd8029a2bea549cddae60215
    https://github.com/scummvm/scummvm/commit/f295d642a16fceabbd8029a2bea549cddae60215
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
DS: Use U32Strings for Options dialog.

Changed paths:
    backends/platform/ds/arm9/source/dsoptions.cpp
    backends/platform/ds/arm9/source/dsoptions.h


diff --git a/backends/platform/ds/arm9/source/dsoptions.cpp b/backends/platform/ds/arm9/source/dsoptions.cpp
index b892317684..20adadff5c 100644
--- a/backends/platform/ds/arm9/source/dsoptions.cpp
+++ b/backends/platform/ds/arm9/source/dsoptions.cpp
@@ -53,73 +53,73 @@ static int confGetInt(Common::String key, int defaultVal) {
 
 DSOptionsDialog::DSOptionsDialog() : GUI::Dialog(0, 0, 320 - 10, 230 - 40) {
 
-	new GUI::ButtonWidget(this, 10, 170, 72, 16, _("~C~lose"), 0, GUI::kCloseCmd);
-	new GUI::ButtonWidget(this, 320 - 10 - 130, 170, 120, 16, _("ScummVM Main Menu"), 0, 0x40000000, 'M');
+	new GUI::ButtonWidget(this, 10, 170, 72, 16, _("~C~lose"), U32String(""), GUI::kCloseCmd);
+	new GUI::ButtonWidget(this, 320 - 10 - 130, 170, 120, 16, _("ScummVM Main Menu"), U32String(""), 0x40000000, 'M');
 
 	_tab = new GUI::TabWidget(this, 10, 5, 300, 230 - 20 - 40 - 20);
 
-	_tab->addTab("Controls", "");
+	_tab->addTab(_("Controls"), "");
 
 	_leftHandedCheckbox = new GUI::CheckboxWidget(_tab, 5, 5, 130, 20, _("~L~eft handed mode"));
 	_indyFightCheckbox = new GUI::CheckboxWidget(_tab, 5, 20, 140, 20, _("~I~ndy fight controls"));
-	_showCursorCheckbox = new GUI::CheckboxWidget(_tab, 150, 5, 130, 20, _("Show mouse cursor"), 0, 0, 'T');
-	_snapToBorderCheckbox = new GUI::CheckboxWidget(_tab, 150, 20, 130, 20, _("Snap to edges"), 0, 0, 'T');
+	_showCursorCheckbox = new GUI::CheckboxWidget(_tab, 150, 5, 130, 20, _("Show mouse cursor"), U32String(""), U32String(""), 'T');
+	_snapToBorderCheckbox = new GUI::CheckboxWidget(_tab, 150, 20, 130, 20, _("Snap to edges"), U32String(""), U32String(""), 'T');
 
 	new GUI::StaticTextWidget(_tab, 20, 35, 100, 15, _("Touch X Offset"), Graphics::kTextAlignLeft);
-	_touchX = new GUI::SliderWidget(_tab, 130, 35, 130, 12, "TODO: Add tooltip", 1);
+	_touchX = new GUI::SliderWidget(_tab, 130, 35, 130, 12, U32String("TODO: Add tooltip"), 1);
 	_touchX->setMinValue(-8);
 	_touchX->setMaxValue(+8);
 	_touchX->setValue(0);
 	_touchX->setFlags(GUI::WIDGET_CLEARBG);
 
 	new GUI::StaticTextWidget(_tab, 20, 50, 100, 15, _("Touch Y Offset"), Graphics::kTextAlignLeft);
-	_touchY = new GUI::SliderWidget(_tab, 130, 50, 130, 12, "TODO: Add tooltip", 2);
+	_touchY = new GUI::SliderWidget(_tab, 130, 50, 130, 12, U32String("TODO: Add tooltip"), 2);
 	_touchY->setMinValue(-8);
 	_touchY->setMaxValue(+8);
 	_touchY->setValue(0);
 	_touchY->setFlags(GUI::WIDGET_CLEARBG);
 
-	new GUI::StaticTextWidget(_tab, 130 + 65 - 10, 65, 20, 15, "0", Graphics::kTextAlignCenter);
-	new GUI::StaticTextWidget(_tab, 130 + 130 - 10, 65, 20, 15, "8", Graphics::kTextAlignCenter);
-	new GUI::StaticTextWidget(_tab, 130 - 20, 65, 20, 15, "-8", Graphics::kTextAlignCenter);
+	new GUI::StaticTextWidget(_tab, 130 + 65 - 10, 65, 20, 15, U32String("0"), Graphics::kTextAlignCenter);
+	new GUI::StaticTextWidget(_tab, 130 + 130 - 10, 65, 20, 15, U32String("8"), Graphics::kTextAlignCenter);
+	new GUI::StaticTextWidget(_tab, 130 - 20, 65, 20, 15, U32String("-8"), Graphics::kTextAlignCenter);
 
 
-	_touchPadStyle = new GUI::CheckboxWidget(_tab, 5, 80, 270, 20, _("Use laptop trackpad-style cursor control"), 0, 0x20000001, 'T');
-	_screenTaps = new GUI::CheckboxWidget(_tab, 5, 95, 285, 20, _("Tap for left click, double tap right click"), 0, 0x20000002, 'T');
+	_touchPadStyle = new GUI::CheckboxWidget(_tab, 5, 80, 270, 20, _("Use laptop trackpad-style cursor control"), U32String(""), 0x20000001, 'T');
+	_screenTaps = new GUI::CheckboxWidget(_tab, 5, 95, 285, 20, _("Tap for left click, double tap right click"), U32String(""), 0x20000002, 'T');
 
 	_sensitivityLabel = new GUI::StaticTextWidget(_tab, 20, 110, 110, 15, _("Sensitivity"), Graphics::kTextAlignLeft);
-	_sensitivity = new GUI::SliderWidget(_tab, 130, 110, 130, 12, "TODO: Add tooltip", 1);
+	_sensitivity = new GUI::SliderWidget(_tab, 130, 110, 130, 12, U32String("TODO: Add tooltip"), 1);
 	_sensitivity->setMinValue(4);
 	_sensitivity->setMaxValue(16);
 	_sensitivity->setValue(8);
 	_sensitivity->setFlags(GUI::WIDGET_CLEARBG);
 
-	_tab->addTab("Graphics", "");
+	_tab->addTab(_("Graphics"), "");
 
 	new GUI::StaticTextWidget(_tab, 5, 67, 180, 15, _("Initial top screen scale:"), Graphics::kTextAlignLeft);
 
-	_100PercentCheckbox = new GUI::CheckboxWidget(_tab, 5, 82, 80, 20, "100%", "TODO: Add tooltip", 0x30000001, 'T');
-	_150PercentCheckbox = new GUI::CheckboxWidget(_tab, 5, 97, 80, 20, "150%", "TODO: Add tooltip", 0x30000002, 'T');
-	_200PercentCheckbox = new GUI::CheckboxWidget(_tab, 5, 112, 80, 20, "200%", "TODO: Add tooltip", 0x30000003, 'T');
+	_100PercentCheckbox = new GUI::CheckboxWidget(_tab, 5, 82, 80, 20, U32String("100%"), U32String("TODO: Add tooltip"), 0x30000001, 'T');
+	_150PercentCheckbox = new GUI::CheckboxWidget(_tab, 5, 97, 80, 20, U32String("150%"), U32String("TODO: Add tooltip"), 0x30000002, 'T');
+	_200PercentCheckbox = new GUI::CheckboxWidget(_tab, 5, 112, 80, 20, U32String("200%"), U32String("TODO: Add tooltip"), 0x30000003, 'T');
 
 	new GUI::StaticTextWidget(_tab, 5, 5, 180, 15, _("Main screen scaling:"), Graphics::kTextAlignLeft);
 
-	_hardScaler = new GUI::CheckboxWidget(_tab, 5, 20, 270, 20, _("Hardware scale (fast, but low quality)"), 0, 0x10000001, 'T');
-	_cpuScaler = new GUI::CheckboxWidget(_tab, 5, 35, 270, 20, _("Software scale (good quality, but slower)"), 0, 0x10000002, 'S');
-	_unscaledCheckbox = new GUI::CheckboxWidget(_tab, 5, 50, 270, 20, _("Unscaled (you must scroll left and right)"), 0, 0x10000003, 'S');
+	_hardScaler = new GUI::CheckboxWidget(_tab, 5, 20, 270, 20, _("Hardware scale (fast, but low quality)"), U32String(""), 0x10000001, 'T');
+	_cpuScaler = new GUI::CheckboxWidget(_tab, 5, 35, 270, 20, _("Software scale (good quality, but slower)"), U32String(""), 0x10000002, 'S');
+	_unscaledCheckbox = new GUI::CheckboxWidget(_tab, 5, 50, 270, 20, _("Unscaled (you must scroll left and right)"), U32String(""), 0x10000003, 'S');
 
 	new GUI::StaticTextWidget(_tab, 5, 125, 110, 15, _("Brightness:"), Graphics::kTextAlignLeft);
-	_gammaCorrection = new GUI::SliderWidget(_tab, 130, 120, 130, 12, "TODO: Add tooltip", 1);
+	_gammaCorrection = new GUI::SliderWidget(_tab, 130, 120, 130, 12, U32String("TODO: Add tooltip"), 1);
 	_gammaCorrection->setMinValue(0);
 	_gammaCorrection->setMaxValue(8);
 	_gammaCorrection->setValue(0);
 
 
 
-	_tab->addTab("General", "");
+	_tab->addTab(_("General"), "");
 
-	_highQualityAudioCheckbox = new GUI::CheckboxWidget(_tab, 5, 5, 250, 20, _("High quality audio (slower) (reboot)"), 0, 0, 'T');
-	_disablePowerOff = new GUI::CheckboxWidget(_tab, 5, 20, 200, 20, _("Disable power off"), 0, 0, 'T');
+	_highQualityAudioCheckbox = new GUI::CheckboxWidget(_tab, 5, 5, 250, 20, _("High quality audio (slower) (reboot)"), U32String(""), 0, 'T');
+	_disablePowerOff = new GUI::CheckboxWidget(_tab, 5, 20, 200, 20, _("Disable power off"), U32String(""), 0, 'T');
 
 	_tab->setActiveTab(0);
 
diff --git a/backends/platform/ds/arm9/source/dsoptions.h b/backends/platform/ds/arm9/source/dsoptions.h
index 35e30a87d5..2ba07dd7c0 100644
--- a/backends/platform/ds/arm9/source/dsoptions.h
+++ b/backends/platform/ds/arm9/source/dsoptions.h
@@ -27,6 +27,7 @@
 #include "common/scummsys.h"
 #include "common/str.h"
 #include "common/config-manager.h"
+#include "common/ustr.h"
 
 #include "gui/object.h"
 #include "gui/widget.h"
@@ -38,6 +39,8 @@ namespace DS {
 
 class DSOptionsDialog : public GUI::Dialog {
 
+typedef Common::U32String U32String;
+
 public:
 	DSOptionsDialog();
 	~DSOptionsDialog();


Commit: dfc53b60e31577ef328ba52ae808a31da637fcf7
    https://github.com/scummvm/scummvm/commit/dfc53b60e31577ef328ba52ae808a31da637fcf7
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
3DS: Use U32Strings for options dialog.

Changed paths:
    backends/platform/3ds/options-dialog.cpp


diff --git a/backends/platform/3ds/options-dialog.cpp b/backends/platform/3ds/options-dialog.cpp
index e83ec34db7..193c70eda9 100644
--- a/backends/platform/3ds/options-dialog.cpp
+++ b/backends/platform/3ds/options-dialog.cpp
@@ -32,6 +32,7 @@
 #include "gui/widgets/popup.h"
 
 #include "common/translation.h"
+#include "common/ustr.h"
 
 namespace _3DS {
 
@@ -41,16 +42,16 @@ OptionsDialog::OptionsDialog() : GUI::Dialog(20, 20, 280, 200) {
 
 	optionMenuOpened = true;
 
-	new GUI::ButtonWidget(this, 120, 180, 72, 16, _("~C~lose"), 0, GUI::kCloseCmd);
-	new GUI::ButtonWidget(this, 200, 180, 72, 16, _("~S~ave"), 0, GUI::kOKCmd);
+	new GUI::ButtonWidget(this, 120, 180, 72, 16, _("~C~lose"), Common::U32String(""), GUI::kCloseCmd);
+	new GUI::ButtonWidget(this, 200, 180, 72, 16, _("~S~ave"), Common::U32String(""), GUI::kOKCmd);
 
-	_showCursorCheckbox = new GUI::CheckboxWidget(this, 5, 5, 130, 20, _("Show mouse cursor"), 0, 0, 'T');
+	_showCursorCheckbox = new GUI::CheckboxWidget(this, 5, 5, 130, 20, _("Show mouse cursor"), Common::U32String(""), 0, 'T');
 	_showCursorCheckbox->setState(config.showCursor);
 
-	_snapToBorderCheckbox = new GUI::CheckboxWidget(this, 5, 22, 130, 20, _("Snap to edges"), 0, 0, 'T');
+	_snapToBorderCheckbox = new GUI::CheckboxWidget(this, 5, 22, 130, 20, _("Snap to edges"), Common::U32String(""), 0, 'T');
 	_snapToBorderCheckbox->setState(config.snapToBorder);
 
-	_stretchToFitCheckbox = new GUI::CheckboxWidget(this, 140, 5, 130, 20, _("Stretch to fit"), 0, 0, 'T');
+	_stretchToFitCheckbox = new GUI::CheckboxWidget(this, 140, 5, 130, 20, _("Stretch to fit"), Common::U32String(""), 0, 'T');
 	_stretchToFitCheckbox->setState(config.stretchToFit);
 
 	new GUI::StaticTextWidget(this, 0, 60, 110, 15, _("Use Screen:"), Graphics::kTextAlignRight);


Commit: dd31b45be334875d0269ab828d7d3e8e37d0e560
    https://github.com/scummvm/scummvm/commit/dd31b45be334875d0269ab828d7d3e8e37d0e560
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GLK: SCOTT: Fix unsafe memory usage

Changed paths:
    engines/glk/scott/scott.cpp


diff --git a/engines/glk/scott/scott.cpp b/engines/glk/scott/scott.cpp
index b23a7c6b59..8d166c3fc7 100644
--- a/engines/glk/scott/scott.cpp
+++ b/engines/glk/scott/scott.cpp
@@ -408,8 +408,8 @@ void Scott::outputNumber(int a) {
 }
 
 void Scott::look(void) {
-	const uint32 *const ExitNames[6] = {
-		_("North").c_str(), _("South").c_str(), _("East").c_str(), _("West").c_str(), _("Up").c_str(), _("Down").c_str()
+	const Common::U32String ExitNames[6] = {
+		_("North"), _("South"), _("East"), _("West"), _("Up"), _("Down")
 	};
 	Room *r;
 	int ct, f;
@@ -447,7 +447,7 @@ void Scott::look(void) {
 				f = 1;
 			else
 				display(_topWindow, ", ");
-			display(_topWindow, Common::U32String("%S"), ExitNames[ct]);
+			display(_topWindow, Common::U32String("%S"), ExitNames[ct].c_str());
 		}
 		ct++;
 	}


Commit: d2da98d3b099f14840c11423a22ff339721a202c
    https://github.com/scummvm/scummvm/commit/d2da98d3b099f14840c11423a22ff339721a202c
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GLK: More usage of translations

- Add helpers in Advsys, Comprehend & ZCode to match functionality provided for strings.

Changed paths:
    engines/glk/advsys/glk_interface.cpp
    engines/glk/advsys/glk_interface.h
    engines/glk/advsys/vm.cpp
    engines/glk/comprehend/comprehend.cpp
    engines/glk/comprehend/comprehend.h
    engines/glk/comprehend/game.cpp
    engines/glk/glk_api.cpp
    engines/glk/zcode/processor.h
    engines/glk/zcode/processor_buffer.cpp
    engines/glk/zcode/zcode.cpp


diff --git a/engines/glk/advsys/glk_interface.cpp b/engines/glk/advsys/glk_interface.cpp
index c49dc983e4..e1f08d79cc 100644
--- a/engines/glk/advsys/glk_interface.cpp
+++ b/engines/glk/advsys/glk_interface.cpp
@@ -37,6 +37,13 @@ void GlkInterface::print(const Common::String &msg) {
 		glk_put_string_stream(glk_window_get_stream(_window), msg.c_str());
 }
 
+void GlkInterface::print(const Common::U32String &msg) {
+	// Don't print out text if loading a savegame directly from the launcher, since we don't
+	// want any of the intro text displayed by the startup code to show
+	if (_saveSlot == -1)
+		glk_put_string_stream_uni(glk_window_get_stream(_window), msg.c_str());
+}
+
 void GlkInterface::print(int number) {
 	Common::String s = Common::String::format("%d", number);
 	print(s);
diff --git a/engines/glk/advsys/glk_interface.h b/engines/glk/advsys/glk_interface.h
index ae6b7a3743..98688c9f06 100644
--- a/engines/glk/advsys/glk_interface.h
+++ b/engines/glk/advsys/glk_interface.h
@@ -50,6 +50,12 @@ protected:
 	 */
 	void print(const Common::String &msg);
 
+	/**
+	 * Print a unicode string
+	 * @param msg		U32String
+	 */
+	void print(const Common::U32String &msg);
+
 	/**
 	 * Print a number
 	 * @param number	Number to print
diff --git a/engines/glk/advsys/vm.cpp b/engines/glk/advsys/vm.cpp
index 9aaf2df8f6..7236de7952 100644
--- a/engines/glk/advsys/vm.cpp
+++ b/engines/glk/advsys/vm.cpp
@@ -22,6 +22,7 @@
 
 #include "glk/advsys/vm.h"
 #include "common/translation.h"
+#include "common/ustr.h"
 
 namespace Glk {
 namespace AdvSys {
@@ -593,7 +594,7 @@ bool VM::getWord(Common::String &line) {
 		_words.push_back(iw);
 		return true;
 	} else {
-		Common::String msg = Common::String::format("I don't know the word \"%s\".\n", iw._text.c_str());
+		Common::U32String msg = Common::U32String::format(_("I don't know the word \"%s\".\n"), iw._text.c_str());
 		print(msg);
 		return false;
 	}
diff --git a/engines/glk/comprehend/comprehend.cpp b/engines/glk/comprehend/comprehend.cpp
index 27731f66ca..0b4046fa76 100644
--- a/engines/glk/comprehend/comprehend.cpp
+++ b/engines/glk/comprehend/comprehend.cpp
@@ -32,6 +32,8 @@
 #include "glk/comprehend/pics.h"
 #include "glk/quetzal.h"
 #include "common/config-manager.h"
+#include "common/translation.h"
+#include "common/ustr.h"
 #include "engines/util.h"
 
 namespace Glk {
@@ -128,6 +130,18 @@ void Comprehend::print(const char *fmt, ...) {
 	                      msg.c_str());
 }
 
+void Comprehend::print(const Common::U32String fmt, ...) {
+	Common::U32String outputMsg;
+
+	va_list argp;
+	va_start(argp, fmt);
+	Common::U32String::vformat(fmt.begin(), fmt.end(), outputMsg, argp);
+	va_end(argp);
+
+	glk_put_string_stream_uni(glk_window_get_stream(_bottomWindow),
+	                          outputMsg.c_str());
+}
+
 void Comprehend::readLine(char *buffer, size_t maxLen) {
 	event_t ev;
 
diff --git a/engines/glk/comprehend/comprehend.h b/engines/glk/comprehend/comprehend.h
index a910d8e7dc..073a26ae01 100644
--- a/engines/glk/comprehend/comprehend.h
+++ b/engines/glk/comprehend/comprehend.h
@@ -131,6 +131,11 @@ public:
 	 */
 	void print(const char *fmt, ...);
 
+	/**
+	 * Print unicode-string to the buffer window
+	*/
+	void print(const Common::U32String fmt, ...);
+
 	/**
 	 * Read an input line
 	 */
diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index adab7b606d..bb3843063e 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -1330,7 +1330,7 @@ void ComprehendGame::read_input() {
 
 		// Empty line, so toggle picture window visibility
 		g_comprehend->toggleGraphics();
-		g_comprehend->print("Picture window toggled\n");
+		g_comprehend->print(_("Picture window toggled\n"));
 
 		_updateFlags |= UPDATE_GRAPHICS;
 		update_graphics();
diff --git a/engines/glk/glk_api.cpp b/engines/glk/glk_api.cpp
index 92e824c74c..1fe45bc216 100644
--- a/engines/glk/glk_api.cpp
+++ b/engines/glk/glk_api.cpp
@@ -60,7 +60,7 @@ GlkAPI::GlkAPI(OSystem *syst, const GlkGameDescription &gameDesc) :
 }
 
 void GlkAPI::glk_exit(void) {
-	glk_put_string("[ press any key to exit ]");
+	glk_put_string_uni(_("[ press any key to exit ]").c_str());
 	_events->waitForPress();
 
 	// Trigger a ScumMVM shutdown of game
diff --git a/engines/glk/zcode/processor.h b/engines/glk/zcode/processor.h
index 6d16cb6571..407326a85e 100644
--- a/engines/glk/zcode/processor.h
+++ b/engines/glk/zcode/processor.h
@@ -179,6 +179,11 @@ protected:
 	 */
 	void print_string(const char *s);
 
+	/*
+	 * Print a unicode string.
+	 */
+	void print_string_uni(const uint32 *s);
+
 	/**
 	 * Print an unsigned 32bit number in decimal or hex.
 	 */
diff --git a/engines/glk/zcode/processor_buffer.cpp b/engines/glk/zcode/processor_buffer.cpp
index 00f51412d8..bb6d846762 100644
--- a/engines/glk/zcode/processor_buffer.cpp
+++ b/engines/glk/zcode/processor_buffer.cpp
@@ -132,6 +132,16 @@ void Processor::print_string(const char *s) {
 	}
 }
 
+void Processor::print_string_uni(const uint32 *s) {
+	uint32 c;
+	while ((c = *s++) != 0) {
+		if (c == '\n')
+			new_line();
+		else
+			print_char(c);
+	}
+}
+
 void Processor::print_long(uint value, int base) {
 	unsigned long i;
 	char c;
diff --git a/engines/glk/zcode/zcode.cpp b/engines/glk/zcode/zcode.cpp
index 5d60cf7d60..862b20b693 100644
--- a/engines/glk/zcode/zcode.cpp
+++ b/engines/glk/zcode/zcode.cpp
@@ -141,7 +141,7 @@ Common::Error ZCode::saveGameState(int slot, const Common::String &desc, bool is
 	bool success = q.save(*file, this, desc);
 
 	if (!success)
-		print_string("Error writing save file\n");
+		print_string_uni(_("Error writing save file\n").c_str());
 
 	return Common::kNoError;
 


Commit: d4a280ef29ea07bc63fcffee94c31ebe1b3f80b1
    https://github.com/scummvm/scummvm/commit/d4a280ef29ea07bc63fcffee94c31ebe1b3f80b1
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
BACKENDS: DIALOGS: GTK: Fix incorrect memory usage & replace unsafe code.

- Encoding::convert which was previously used needed to be freed by the caller.
- With the direct conversion to utf8 by .encode(), this doesn't need to happen anymore

Changed paths:
    backends/dialogs/gtk/gtk-dialogs.cpp


diff --git a/backends/dialogs/gtk/gtk-dialogs.cpp b/backends/dialogs/gtk/gtk-dialogs.cpp
index 61f9b31656..10511058e9 100644
--- a/backends/dialogs/gtk/gtk-dialogs.cpp
+++ b/backends/dialogs/gtk/gtk-dialogs.cpp
@@ -41,13 +41,14 @@ Common::DialogManager::DialogResult GtkDialogManager::showFileBrowser(const Comm
 
 	DialogResult result = kDialogCancel;
 
-	Common::U32String choose = _("Choose");
-	Common::U32String cancel = _("Cancel");
-
 	// Convert labels to UTF-8
-	char *utf8Title = (char *)title.encode().c_str();
-	char *utf8Choose = (char *)choose.encode().c_str();
-	char* utf8Cancel = (char *)cancel.encode().c_str();
+	Common::String titleStr = title.encode();
+	Common::String choose = _("Choose").encode();
+	Common::String cancel = _("Cancel").encode();
+
+	char *utf8Title = (char *)(titleStr.c_str());
+	char *utf8Choose = (char *)(choose.c_str());
+	char *utf8Cancel = (char *)(cancel.c_str());
 
 	GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
 	if (isDirBrowser) {
@@ -60,9 +61,6 @@ Common::DialogManager::DialogResult GtkDialogManager::showFileBrowser(const Comm
 	GtkWidget *dialog = gtk_file_chooser_dialog_new(utf8Title, NULL, action, utf8Choose, GTK_RESPONSE_ACCEPT, utf8Cancel, GTK_RESPONSE_CANCEL, NULL);
 	GtkFileChooser *chooser = GTK_FILE_CHOOSER(dialog);
 #endif
-	free(utf8Cancel);
-	free(utf8Choose);
-	free(utf8Title);
 
 	// Customize dialog
 	gtk_file_chooser_set_show_hidden(chooser, ConfMan.getBool("gui_browser_show_hidden", Common::ConfigManager::kApplicationDomain));


Commit: b709e2f40cdca3cff6f4bba4e24354409dfb0a9d
    https://github.com/scummvm/scummvm/commit/b709e2f40cdca3cff6f4bba4e24354409dfb0a9d
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GLK: SCOTT: Improve usage of translations when looking.

Changed paths:
    engines/glk/scott/scott.cpp


diff --git a/engines/glk/scott/scott.cpp b/engines/glk/scott/scott.cpp
index 8d166c3fc7..e9c9fa58dc 100644
--- a/engines/glk/scott/scott.cpp
+++ b/engines/glk/scott/scott.cpp
@@ -408,8 +408,8 @@ void Scott::outputNumber(int a) {
 }
 
 void Scott::look(void) {
-	const Common::U32String ExitNames[6] = {
-		_("North"), _("South"), _("East"), _("West"), _("Up"), _("Down")
+	const char *const ExitNames[6] = {
+		_s("North"), _s("South"), _s("East"), _s("West"), _s("Up"), _s("Down")
 	};
 	Room *r;
 	int ct, f;
@@ -447,7 +447,7 @@ void Scott::look(void) {
 				f = 1;
 			else
 				display(_topWindow, ", ");
-			display(_topWindow, Common::U32String("%S"), ExitNames[ct].c_str());
+			display(_topWindow, Common::U32String("%S"), _(ExitNames[ct]).c_str());
 		}
 		ct++;
 	}


Commit: 495921b100432ff17a5cd061271fc8d4679de1a6
    https://github.com/scummvm/scummvm/commit/495921b100432ff17a5cd061271fc8d4679de1a6
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
DEVTOOLS: Increase buffer size for po parser to avoid stack overflow errors

Changed paths:
    devtools/create_translations/po_parser.cpp


diff --git a/devtools/create_translations/po_parser.cpp b/devtools/create_translations/po_parser.cpp
index 0bacd00ebd..a059997eab 100644
--- a/devtools/create_translations/po_parser.cpp
+++ b/devtools/create_translations/po_parser.cpp
@@ -260,8 +260,8 @@ PoMessageEntryList *parsePoFile(const char *file, PoMessageList& messages) {
 	if (!inFile)
 		return NULL;
 
-	char msgidBuf[1024], msgctxtBuf[1024], msgstrBuf[1024];
-	char line[1024], *currentBuf = msgstrBuf;
+	char msgidBuf[2048], msgctxtBuf[2048], msgstrBuf[2048];
+	char line[2048], *currentBuf = msgstrBuf;
 
 	// Get language from file name and create PoMessageEntryList
 	int index = 0, start_index = strlen(file) - 1;


Commit: d41d0e9b2233089d4502a55c60a1d9c711692aef
    https://github.com/scummvm/scummvm/commit/d41d0e9b2233089d4502a55c60a1d9c711692aef
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
JANITORIAL: Fix formatting issues

Changed paths:
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    engines/game.cpp
    engines/sci/engine/kgraphics32.cpp
    engines/sci/engine/savegame.cpp


diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index ef87ee550d..9f58f2be23 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2500,16 +2500,16 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 		Common::U32String message;
 		if (_videoMode.aspectRatioCorrection)
 			message = Common::U32String::format(Common::U32String("%S\n%d x %d -> %d x %d"),
-											 _("Enabled aspect ratio correction").c_str(),
-			                                 _videoMode.screenWidth, _videoMode.screenHeight,
-			                                 _hwScreen->w, _hwScreen->h
-			);
+			                                    _("Enabled aspect ratio correction").c_str(),
+			                                    _videoMode.screenWidth, _videoMode.screenHeight,
+			                                    _hwScreen->w, _hwScreen->h
+			          );
 		else
 			message = Common::U32String::format(Common::U32String("%S\n%d x %d -> %d x %d"),
-											 _("Disabled aspect ratio correction").c_str(),
-			                                 _videoMode.screenWidth, _videoMode.screenHeight,
-			                                 _hwScreen->w, _hwScreen->h
-			);
+			                                    _("Disabled aspect ratio correction").c_str(),
+			                                    _videoMode.screenWidth, _videoMode.screenHeight,
+			                                    _hwScreen->w, _hwScreen->h
+			          );
 		displayMessageOnOSD(message);
 #endif
 		internUpdateScreen();
@@ -2553,9 +2553,9 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
 
 #ifdef USE_OSD
 		Common::U32String message = Common::U32String::format(Common::U32String("%S: %S"),
-														_("Stretch mode").c_str(),
-														_(s_supportedStretchModes[index].description).c_str()
-									);
+		                                                      _("Stretch mode").c_str(),
+		                                                      _(s_supportedStretchModes[index].description).c_str()
+		                            );
 		displayMessageOnOSD(message);
 #endif
 		_forceRedraw = true;
diff --git a/engines/game.cpp b/engines/game.cpp
index ae997fce89..96802acfec 100644
--- a/engines/game.cpp
+++ b/engines/game.cpp
@@ -169,9 +169,9 @@ Common::U32String generateUnknownGameReport(const DetectedGames &detectedGames,
 	assert(!detectedGames.empty());
 
 	const char *reportStart = _s("The game in '%s' seems to be an unknown game variant.\n\n"
-					"Please report the following data to the ScummVM team at %s "
-					"along with the name of the game you tried to add and "
-					"its version, language, etc.:");
+	                             "Please report the following data to the ScummVM team at %s "
+	                             "along with the name of the game you tried to add and "
+	                             "its version, language, etc.:");
 	const char *reportEngineHeader = _s("Matched game IDs for the %s engine:");
 
 	Common::U32String report = Common::U32String::format(
@@ -179,7 +179,6 @@ Common::U32String generateUnknownGameReport(const DetectedGames &detectedGames,
 			fullPath ? detectedGames[0].path.c_str() : detectedGames[0].shortPath.c_str(),
 			"https://bugs.scummvm.org/"
 	);
-
 	report += Common::U32String("\n");
 
 	FilePropertiesMap matchedFiles;
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index 52b7b7c7fb..31a8f770c2 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -62,7 +62,7 @@
 namespace Sci {
 #ifdef ENABLE_SCI32
 
-extern int showScummVMDialog(const Common::U32String& message, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String &message, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true);
 
 reg_t kBaseSetter32(EngineState *s, int argc, reg_t *argv) {
 	reg_t object = argv[0];
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index bc95224b44..d37e612bca 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -1239,7 +1239,7 @@ bool gamestate_save(EngineState *s, Common::WriteStream *fh, const Common::Strin
 	return true;
 }
 
-extern int showScummVMDialog(const Common::U32String& message, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String &message, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true);
 
 void gamestate_afterRestoreFixUp(EngineState *s, int savegameId) {
 	switch (g_sci->getGameId()) {


Commit: 29b6274e67bd1139627b880ea00d3cc50ae38c3f
    https://github.com/scummvm/scummvm/commit/29b6274e67bd1139627b880ea00d3cc50ae38c3f
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
BACKENDS: CLIPBOARD: Improve usage for SDL & Android.

- Fix possible issue for setting text inside clipboard for SDL.
- Always return a decoded string when from UTF-8 in Android when fetch clipboard.

Changed paths:
    backends/platform/android/jni-android.cpp
    backends/platform/sdl/sdl.cpp


diff --git a/backends/platform/android/jni-android.cpp b/backends/platform/android/jni-android.cpp
index fc34070664..301bfe237a 100644
--- a/backends/platform/android/jni-android.cpp
+++ b/backends/platform/android/jni-android.cpp
@@ -300,11 +300,7 @@ Common::U32String JNI::getTextFromClipboard() {
 	Common::String text = convertFromJString(env, javaText, "UTF-8");
 	env->DeleteLocalRef(javaText);
 
-	if (getCurrentCharset() == "UTF-32") {
-		return text.decode();
-	}
-
-	return Common::U32String(text);
+	return text.decode();
 }
 
 bool JNI::setTextInClipboard(const Common::U32String &text) {
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index fc3785832e..49ae9ba965 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -508,14 +508,15 @@ Common::U32String OSystem_SDL::getTextFromClipboard() {
 }
 
 bool OSystem_SDL::setTextInClipboard(const Common::U32String &text) {
-	// The encoding we need to use is UTF-8. Assume we currently have the
-	// current TranslationManager encoding or ISO-8859-1.
-	char *utf8_text = (char *)text.encode().c_str();
+	// The encoding we need to use is UTF-8.
+	Common::String textStr = text.encode();
+	char *utf8_text = (char *)textStr.c_str();
+
 	if (utf8_text) {
 		int status = SDL_SetClipboardText(utf8_text);
 		return status == 0;
 	}
-	return SDL_SetClipboardText(text.encode().c_str()) == 0;
+	return SDL_SetClipboardText(textStr.c_str()) == 0;
 }
 #endif
 


Commit: a9a63ec93139748783beed0baebba417baa76a2d
    https://github.com/scummvm/scummvm/commit/a9a63ec93139748783beed0baebba417baa76a2d
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
DEVTOOLS: CREATE_TRANSLATIONS: Remove useless const return value for useUTF8 member function.

Changed paths:
    devtools/create_translations/po_parser.cpp
    devtools/create_translations/po_parser.h


diff --git a/devtools/create_translations/po_parser.cpp b/devtools/create_translations/po_parser.cpp
index a059997eab..982c45059f 100644
--- a/devtools/create_translations/po_parser.cpp
+++ b/devtools/create_translations/po_parser.cpp
@@ -240,7 +240,7 @@ const char *PoMessageEntryList::languageName() const {
 	return _langName ? _langName : _langNameAlt;
 }
 
-const bool PoMessageEntryList::useUTF8() const {
+bool PoMessageEntryList::useUTF8() const {
 	return _useUTF8;
 }
 
diff --git a/devtools/create_translations/po_parser.h b/devtools/create_translations/po_parser.h
index 13b4a103d4..ada45f6e2a 100644
--- a/devtools/create_translations/po_parser.h
+++ b/devtools/create_translations/po_parser.h
@@ -87,7 +87,7 @@ public:
 
 	const char *language() const;
 	const char *languageName() const;
-	const bool useUTF8() const;
+	bool useUTF8() const;
 
 	int size() const;
 	const PoMessageEntry *entry(int) const;


Commit: 44230b6c8a2f688c91a51409fccd3f4bc0b37ddb
    https://github.com/scummvm/scummvm/commit/44230b6c8a2f688c91a51409fccd3f4bc0b37ddb
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Return a string from FileBrowserDialog::getResult

Changed paths:
    gui/filebrowser-dialog.h


diff --git a/gui/filebrowser-dialog.h b/gui/filebrowser-dialog.h
index c59e3fa4e5..e807a9db98 100644
--- a/gui/filebrowser-dialog.h
+++ b/gui/filebrowser-dialog.h
@@ -45,7 +45,7 @@ public:
 
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 
-	const char *getResult() { return Dialog::getResult() ? _fileName->getEditString().encode().c_str() : nullptr; }
+	Common::String getResult() { return Dialog::getResult() ? _fileName->getEditString().encode() : Common::String(); }
 
 protected:
 	EditTextWidget *_fileName;


Commit: 579b3701834a463a6ef842c15bd5a025c2a0aa27
    https://github.com/scummvm/scummvm/commit/579b3701834a463a6ef842c15bd5a025c2a0aa27
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
ILLUSIONS: Fix conversion to string

Changed paths:
    engines/illusions/menusystem.cpp


diff --git a/engines/illusions/menusystem.cpp b/engines/illusions/menusystem.cpp
index 1ac2acdccc..58cb3baf16 100644
--- a/engines/illusions/menusystem.cpp
+++ b/engines/illusions/menusystem.cpp
@@ -702,7 +702,7 @@ void MenuActionSaveGame::execute() {
 
 	dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
 	slot = dialog->runModalWithCurrentTarget();
-	desc = dialog->getResultString().encode().c_str();
+	desc = dialog->getResultString().encode();
 
 	delete dialog;
 


Commit: 277d7dc64c7694359a5333681a2635b891a77560
    https://github.com/scummvm/scummvm/commit/277d7dc64c7694359a5333681a2635b891a77560
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
MOHAWK: I18N: Move new translation filename to root dir POTFILES of Mohawk

Changed paths:
  R engines/mohawk/myst_stacks/POTFILES
    engines/mohawk/POTFILES


diff --git a/engines/mohawk/POTFILES b/engines/mohawk/POTFILES
index 2f21a754fa..8d99a6dc0d 100644
--- a/engines/mohawk/POTFILES
+++ b/engines/mohawk/POTFILES
@@ -3,6 +3,7 @@ engines/mohawk/dialogs.cpp
 engines/mohawk/mohawk.cpp
 engines/mohawk/myst.cpp
 engines/mohawk/myst_stacks/menu.cpp
+engines/mohawk/myst_stacks/preview.cpp
 engines/mohawk/riven.cpp
 engines/mohawk/riven_stack.cpp
 engines/mohawk/riven_stacks/aspit.cpp
diff --git a/engines/mohawk/myst_stacks/POTFILES b/engines/mohawk/myst_stacks/POTFILES
deleted file mode 100644
index 339d149265..0000000000
--- a/engines/mohawk/myst_stacks/POTFILES
+++ /dev/null
@@ -1 +0,0 @@
-engines/mohawk/myst_stacks/preview.cpp


Commit: c855f6259a50e7c178d17e131284acf8b27e1163
    https://github.com/scummvm/scummvm/commit/c855f6259a50e7c178d17e131284acf8b27e1163
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Fix incorrect code for redirecting constructors.

- The changes previously were creating a temporary object whose lifetime was limited to that line.
- Additionally, use Strings instead of const char* in MessageDialogs.

Changed paths:
    backends/keymapper/keymap.cpp
    engines/savestate.cpp
    gui/message.cpp
    gui/message.h


diff --git a/backends/keymapper/keymap.cpp b/backends/keymapper/keymap.cpp
index 5a8f9f820d..3cbbc44f92 100644
--- a/backends/keymapper/keymap.cpp
+++ b/backends/keymapper/keymap.cpp
@@ -44,8 +44,15 @@ Keymap::Keymap(KeymapType type, const String &id, const U32String &description)
 
 }
 
-Keymap::Keymap(KeymapType type, const String &id, const String &description) {
-	Keymap(type, id, U32String(description));
+Keymap::Keymap(KeymapType type, const String &id, const String &description) :
+		_type(type),
+		_id(id),
+		_description(U32String(description)),
+		_enabled(true),
+		_configDomain(nullptr),
+		_hardwareInputSet(nullptr),
+		_backendDefaultBindings(nullptr) {
+
 }
 
 Keymap::~Keymap() {
diff --git a/engines/savestate.cpp b/engines/savestate.cpp
index 75b5b624f2..e63a89a3e1 100644
--- a/engines/savestate.cpp
+++ b/engines/savestate.cpp
@@ -38,8 +38,10 @@ SaveStateDescriptor::SaveStateDescriptor(int s, const Common::U32String &d)
 	_thumbnail(), _saveType(kSaveTypeUndetermined) {
 }
 
-SaveStateDescriptor::SaveStateDescriptor(int s, const Common::String &d) {
-	SaveStateDescriptor(s, Common::U32String(d));
+SaveStateDescriptor::SaveStateDescriptor(int s, const Common::String &d)
+	: _slot(s), _description(Common::U32String(d)), _isDeletable(true), _isWriteProtected(false),
+	_isLocked(false), _saveDate(), _saveTime(), _playTime(), _playTimeMSecs(0),
+	_thumbnail(), _saveType(kSaveTypeUndetermined) {
 }
 
 void SaveStateDescriptor::setThumbnail(Graphics::Surface *t) {
diff --git a/gui/message.cpp b/gui/message.cpp
index 827a0d0511..de19df49a7 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -39,9 +39,7 @@ enum {
 
 // TODO: The default button should be visibly distinct from the alternate button
 
-MessageDialog::MessageDialog(const Common::U32String &message, const Common::U32String &defaultButton, const Common::U32String &altButton, Graphics::TextAlign alignment, const char *url)
-	: Dialog(30, 20, 260, 124) {
-
+void MessageDialog::init(const Common::U32String &message, const Common::U32String &defaultButton, const Common::U32String &altButton, Graphics::TextAlign alignment, const char *url) {
 	_url = url;
 
 	const int screenW = g_system->getOverlayWidth();
@@ -82,8 +80,7 @@ MessageDialog::MessageDialog(const Common::U32String &message, const Common::U32
 
 	// Each line is represented by one static text item.
 	for (int i = 0; i < lineCount; i++) {
-		new StaticTextWidget(this, 10, 10 + i * kLineHeight, maxlineWidth, kLineHeight,
-								lines[i], alignment);
+		new StaticTextWidget(this, 10, 10 + i * kLineHeight, maxlineWidth, kLineHeight, lines[i], alignment);
 	}
 
 	if (!defaultButton.empty() && !altButton.empty()) {
@@ -104,10 +101,16 @@ MessageDialog::MessageDialog(const Common::U32String &message, const Common::U32
 	}
 }
 
-MessageDialog::MessageDialog(const char *message, const char *defaultButton, const char *altButton, Graphics::TextAlign alignment)
+MessageDialog::MessageDialog(const Common::U32String &message, const Common::U32String &defaultButton, const Common::U32String &altButton, Graphics::TextAlign alignment, const char *url)
+	: Dialog(30, 20, 260, 124) {
+
+	init(message, defaultButton, altButton, alignment, url);
+}
+
+MessageDialog::MessageDialog(const Common::String &message, const Common::String &defaultButton, const Common::String &altButton, Graphics::TextAlign alignment, const char *url)
 	: Dialog(30, 20, 260, 124) {
 
-	MessageDialog(Common::U32String(message), Common::U32String(defaultButton), Common::U32String(altButton), alignment);
+	init(Common::U32String(message), Common::U32String(defaultButton), Common::U32String(altButton), alignment, url);
 }
 
 void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/message.h b/gui/message.h
index 80ad8216e4..6cda5b2961 100644
--- a/gui/message.h
+++ b/gui/message.h
@@ -42,12 +42,12 @@ enum {
 class MessageDialog : public Dialog {
 public:
 	MessageDialog(const Common::U32String &message, const Common::U32String &defaultButton = Common::U32String("OK"), const Common::U32String &altButton = Common::U32String(""), Graphics::TextAlign alignment = Graphics::kTextAlignCenter, const char *url = nullptr);
-	MessageDialog(const char *message, const char *defaultButton = "OK", const char *altButton = "", Graphics::TextAlign alignment = Graphics::kTextAlignCenter, const char *url = nullptr);
+	MessageDialog(const Common::String &message, const Common::String &defaultButton = "OK", const Common::String &altButton = "", Graphics::TextAlign alignment = Graphics::kTextAlignCenter, const char *url = nullptr);
 
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
-
 private:
 	const char *_url;
+	void init(const Common::U32String &message, const Common::U32String &defaultButton, const Common::U32String &altButton, Graphics::TextAlign alignment);
 };
 
 /**


Commit: 219646378ca448ce94415acde72edf4dd073e096
    https://github.com/scummvm/scummvm/commit/219646378ca448ce94415acde72edf4dd073e096
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
SCUMM: GUI: U32: Remove redundant code

- Translations are removed from the md5 warning message because logMessage doesn't support unicode.

Changed paths:
    engines/scumm/detection.cpp


diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index b6ae139f7e..926827b84b 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -1135,24 +1135,17 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co
 	// debugging purposes).
 	if (!findInMD5Table(res.md5.c_str())) {
 		Common::String md5Warning;
-		Common::String additionalInfo;
-		// Common::U32String md5WarningTranslated;
 
 		md5Warning = ("Your game version appears to be unknown. If this is *NOT* a fan-modified\n"
 		               "version (in particular, not a fan-made translation), please, report the\n"
 		               "following data to the ScummVM team along with the name of the game you tried\n"
 		               "to add and its version, language, etc.:\n");
 
-		// md5WarningTranslated = _(md5Warning);
-
-		additionalInfo = Common::String::format("  SCUMM gameid '%s', file '%s', MD5 '%s'\n\n",
+		md5Warning += Common::String::format("  SCUMM gameid '%s', file '%s', MD5 '%s'\n\n",
 				res.game.gameid,
 				generateFilenameForDetection(res.fp.pattern, res.fp.genMethod, res.game.platform).c_str(),
 				res.md5.c_str());
 
-		md5Warning += additionalInfo;
-		// md5WarningTranslated += additionalInfo;
-
 		g_system->logMessage(LogMessageType::kWarning, md5Warning.c_str());
 	} else {
 		debug(1, "Using MD5 '%s'", res.md5.c_str());


Commit: df03b319fb3d7499f8b1e5f2ee934856d95268e1
    https://github.com/scummvm/scummvm/commit/df03b319fb3d7499f8b1e5f2ee934856d95268e1
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
SCUMM: GUI: U32: Use more translations

Changed paths:
    engines/scumm/scumm.cpp


diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 1757512d79..356766ce04 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2444,7 +2444,7 @@ void ScummEngine::scummLoop_updateScummVars() {
 void ScummEngine::scummLoop_handleSaveLoad() {
 	if (_saveLoadFlag) {
 		bool success;
-		const char *errMsg = 0;
+		Common::U32String errMsg;
 
 		if (_game.version == 8 && _saveTemporaryState)
 			VAR(VAR_GAME_LOADED) = 0;
@@ -2453,7 +2453,7 @@ void ScummEngine::scummLoop_handleSaveLoad() {
 		if (_saveLoadFlag == 1) {
 			success = saveState(_saveLoadSlot, _saveTemporaryState, filename);
 			if (!success)
-				errMsg = "Failed to save game to file:\n\n%s";
+				errMsg = _("Failed to save game to file:\n\n%s");
 
 			if (success && _saveTemporaryState && VAR_GAME_LOADED != 0xFF && _game.version <= 7)
 				VAR(VAR_GAME_LOADED) = 201;
@@ -2463,14 +2463,17 @@ void ScummEngine::scummLoop_handleSaveLoad() {
 		} else {
 			success = loadState(_saveLoadSlot, _saveTemporaryState, filename);
 			if (!success)
-				errMsg = "Failed to load saved game from file:\n\n%s";
+				errMsg = _("Failed to load saved game from file:\n\n%s");
 
 			if (success && _saveTemporaryState && VAR_GAME_LOADED != 0xFF)
 				VAR(VAR_GAME_LOADED) = (_game.version == 8) ? 1 : 203;
 		}
 
 		if (!success) {
-			displayMessage(0, errMsg, filename.c_str());
+			Common::U32String buf = Common::U32String::format(errMsg, filename.c_str());
+
+			GUI::MessageDialog dialog(buf);
+			runDialog(dialog);
 		} else if (_saveLoadFlag == 1 && _saveLoadSlot != 0 && !_saveTemporaryState) {
 			// Display "Save successful" message, except for auto saves
 			Common::U32String buf = Common::U32String::format(_("Successfully saved game in file:\n\n%s"), filename.c_str());
@@ -2758,10 +2761,9 @@ bool ScummEngine::startManiac() {
 		eventMan->pushEvent(event);
 		return true;
 	} else {
-		Common::U32String buf = Common::U32String::format(
-			_("Usually, Maniac Mansion would start now. But for that to work, the game files for Maniac Mansion have to be in the 'Maniac' directory \
-			inside the Tentacle game directory, and the game has to be added to ScummVM."));
+		Common::U32String buf = _("Usually, Maniac Mansion would start now. But for that to work, the game files for Maniac Mansion have to be in the 'Maniac' directory inside the Tentacle game directory, and the game has to be added to ScummVM.");
 		GUI::MessageDialog dialog(buf);
+		runDialog(dialog);
 		return false;
 	}
 }


Commit: 5ab12afd2a8ef56f1494696aca9910a664adbebd
    https://github.com/scummvm/scummvm/commit/5ab12afd2a8ef56f1494696aca9910a664adbebd
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
JANITORIAL: Spacing issues in gui/about.

Changed paths:
    gui/about.cpp
    gui/about.h


diff --git a/gui/about.cpp b/gui/about.cpp
index 448fe73cfb..1e4dbcd44e 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -240,7 +240,7 @@ void AboutDialog::drawDialog(DrawLayer layerToDraw) {
 		U32String renderStr(strLineItrBegin, strLineItrEnd);
 		if (!renderStr.empty())
 			g_gui.theme()->drawText(Common::Rect(_x + _xOff, y, _x + _w - _xOff, y + g_gui.theme()->getFontHeight()),
-									renderStr, state, align, ThemeEngine::kTextInversionNone, 0, false,
+			                        renderStr, state, align, ThemeEngine::kTextInversionNone, 0, false,
 			                        ThemeEngine::kFontStyleBold, ThemeEngine::kFontColorNormal, true, _textDrawableArea);
 		y += _lineHeight;
 	}
diff --git a/gui/about.h b/gui/about.h
index 597ef07dc2..f3a4611e85 100644
--- a/gui/about.h
+++ b/gui/about.h
@@ -38,11 +38,11 @@ class AboutDialog : public Dialog {
 	typedef Common::U32String U32String;
 	typedef Common::Array<Common::U32String> U32StringArray;
 protected:
-	int				_scrollPos;
-	uint32			_scrollTime;
-	U32StringArray	_lines;
-	uint32			_lineHeight;
-	bool			_willClose;
+	int	       _scrollPos;
+	uint32         _scrollTime;
+	U32StringArray _lines;
+	uint32         _lineHeight;
+	bool           _willClose;
 
 	int _xOff, _yOff;
 


Commit: 1612b6845a78845d11eae8312e73dabfa56d2840
    https://github.com/scummvm/scummvm/commit/1612b6845a78845d11eae8312e73dabfa56d2840
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
ENGINES: GUI: U32: Improve translation message usage

Changed paths:
    engines/drascula/drascula.cpp
    engines/hugo/hugo.cpp
    engines/mohawk/riven.cpp
    engines/mutationofjb/util.cpp
    engines/sky/compact.cpp
    engines/teenagent/resources.cpp
    engines/tony/tony.cpp
    engines/toon/toon.cpp
    engines/ultima/nuvie/nuvie.cpp


diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 64d5f2868d..6a257c1abc 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -928,9 +928,11 @@ bool DrasculaEngine::loadDrasculaDat() {
 	in.open(filename.c_str());
 
 	if (!in.isOpen()) {
-		Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
+		const char *msg = _s("Unable to locate the '%s' engine data file.");
+
+		Common::U32String errorMessage = Common::U32String::format(_(msg), filename.c_str());
 		GUIErrorMessage(errorMessage);
-		warning("Unable to locate the '%s' engine data file.", filename.c_str());
+		warning(msg, filename.c_str());
 
 		return false;
 	}
@@ -942,9 +944,10 @@ bool DrasculaEngine::loadDrasculaDat() {
 	buf[8] = '\0';
 
 	if (strcmp(buf, "DRASCULA") != 0) {
-		Common::U32String errorMessage = Common::U32String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
+		const char *msg = _s("The '%s' engine data file is corrupt.");
+		Common::U32String errorMessage = Common::U32String::format(_(msg), filename.c_str());
 		GUIErrorMessage(errorMessage);
-		warning("The '%s' engine data file is corrupt.", filename.c_str());
+		warning(msg, filename.c_str());
 
 		return false;
 	}
@@ -952,12 +955,10 @@ bool DrasculaEngine::loadDrasculaDat() {
 	ver = in.readByte();
 
 	if (ver != DRASCULA_DAT_VER) {
-		Common::U32String errorMessage = Common::U32String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
-			filename.c_str(), DRASCULA_DAT_VER, 0, ver, 0);
+		const char *msg = _s("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.");
+		Common::U32String errorMessage = Common::U32String::format(_(msg), filename.c_str(), DRASCULA_DAT_VER, 0, ver, 0);
 		GUIErrorMessage(errorMessage);
-		warning("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.",
-			filename.c_str(), DRASCULA_DAT_VER, 0, ver, 0);
+		warning(msg, filename.c_str(), DRASCULA_DAT_VER, 0, ver, 0);
 
 		return false;
 	}
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 3c053d9627..4fb567d18e 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -433,9 +433,10 @@ bool HugoEngine::loadHugoDat() {
 	in.open(filename.c_str());
 
 	if (!in.isOpen()) {
-		Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
+		const char *msg = _s("Unable to locate the '%s' engine data file.");
+		Common::U32String errorMessage = Common::U32String::format(_(msg), filename.c_str());
 		GUIErrorMessage(errorMessage);
-		warning("Unable to locate the '%s' engine data file.", filename.c_str());
+		warning(msg, filename.c_str());
 		return false;
 	}
 
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 149bacd8bd..8428d1553a 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -166,9 +166,10 @@ Common::Error MohawkEngine_Riven::run() {
 
 	// We need extras.mhk for inventory images, marble images, and credits images
 	if (!_extrasFile->openFile("extras.mhk")) {
-		Common::U32String message = _("You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also works.");
+		const char *msg = _s("You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also works.");
+		Common::U32String message = _(msg);
 		GUIErrorMessage(message);
-		warning("You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also works.");
+		warning(msg);
 		return Common::kNoGameDataFoundError;
 	}
 
@@ -499,8 +500,10 @@ bool MohawkEngine_Riven::checkDatafiles() {
 		return true;
 	}
 
-	Common::U32String message = _("You are missing the following required Riven data files:\n") + Common::U32String(missingFiles);
-	warning("You are missing the following required Riven data files:\n%s", missingFiles.c_str());
+	const char *msg = _s("You are missing the following required Riven data files:\n");
+	Common::U32String message = _(msg) + Common::U32String(missingFiles);
+
+	warning("%s%s", msg, missingFiles.c_str());
 	GUIErrorMessage(message);
 
 	return false;
diff --git a/engines/mutationofjb/util.cpp b/engines/mutationofjb/util.cpp
index e4c855ce3e..fc5092fca9 100644
--- a/engines/mutationofjb/util.cpp
+++ b/engines/mutationofjb/util.cpp
@@ -30,9 +30,10 @@
 namespace MutationOfJB {
 
 void reportFileMissingError(const char *fileName) {
-	Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file"), fileName);
+	const char *msg = _s("Unable to locate the '%s' engine data file");
+	Common::U32String errorMessage = Common::U32String::format(_(msg), fileName);
 	GUIErrorMessage(errorMessage);
-	warning("Unable to locate the '%s' engine data file", fileName);
+	warning(msg, fileName);
 }
 
 Common::String toUpperCP895(const Common::String &str) {
diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp
index 7a4b528cd2..cf3055dcc1 100644
--- a/engines/sky/compact.cpp
+++ b/engines/sky/compact.cpp
@@ -128,9 +128,10 @@ SkyCompact::SkyCompact() {
 	_cptFile = new Common::File();
 	Common::String filename = "sky.cpt";
 	if (!_cptFile->open(filename.c_str())) {
-                Common::U32String msg = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
-                GUIErrorMessage(msg);
-                error("Unable to locate the '%s' engine data file.", filename.c_str());
+		const char *msg = _s("Unable to locate the '%s' engine data file.");
+        Common::U32String errorMessage = Common::U32String::format(_(msg), filename.c_str());
+        GUIErrorMessage(errorMessage);
+        error(msg, filename.c_str());
 	}
 
 	uint16 fileVersion = _cptFile->readUint16LE();
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index 5742c0d9db..56df7a4d10 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -94,8 +94,10 @@ bool Resources::loadArchives(const ADGameDescription *gd) {
 	Common::String filename = "teenagent.dat";
 	if (!dat_file->open(filename.c_str())) {
 		delete dat_file;
-		Common::U32String errorMessage = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
-		warning("Unable to locate the '%s' engine data file.", filename.c_str());
+
+		const char *msg = _s("Unable to locate the '%s' engine data file.");
+		Common::U32String errorMessage = Common::U32String::format(_(msg), filename.c_str());
+		warning(msg, filename.c_str());
 		GUIErrorMessage(errorMessage);
 		return false;
 	}
@@ -115,8 +117,10 @@ bool Resources::loadArchives(const ADGameDescription *gd) {
 	if (isCompressed) {
 		// teenagent.dat is compressed, but zlib hasn't been compiled in
 		delete dat;
-		Common::String errorMessage = _("The teenagent.dat file is compressed and zlib hasn't been included in this executable. Please decompress it");
-		warning("%s", errorMessage.c_str());
+
+		const char *msg = _s("The teenagent.dat file is compressed and zlib hasn't been included in this executable. Please decompress it");
+		Common::U32String errorMessage = _(msg);
+		warning(msg);
 		GUIErrorMessage(errorMessage);
 		return false;
 	}
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index 93cacd4b4b..cd60740599 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -186,16 +186,17 @@ Common::ErrorCode TonyEngine::init() {
 }
 
 bool TonyEngine::loadTonyDat() {
-	Common::U32String msg;
+	Common::U32String errorMessage;
 	Common::File in;
 	Common::String filename = "tony.dat";
 
 	in.open(filename.c_str());
 
 	if (!in.isOpen()) {
-		msg = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
-		GUIErrorMessage(msg);
-		warning("Unable to locate the '%s' engine data file.", filename.c_str());
+		const char *msg = _s("Unable to locate the '%s' engine data file.");
+		errorMessage = Common::U32String::format(_(msg), filename.c_str());
+		GUIErrorMessage(errorMessage);
+		warning(msg, filename.c_str());
 		return false;
 	}
 
@@ -205,9 +206,10 @@ bool TonyEngine::loadTonyDat() {
 	buf[4] = '\0';
 
 	if (strcmp(buf, "TONY")) {
-		msg = Common::U32String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
-		GUIErrorMessage(msg);
-		warning("The '%s' engine data file is corrupt.", filename.c_str());
+		const char *msg = _s("The '%s' engine data file is corrupt.");
+		errorMessage = Common::U32String::format(_(msg), filename.c_str());
+		GUIErrorMessage(errorMessage);
+		warning(msg, filename.c_str());
 		return false;
 	}
 
@@ -215,12 +217,10 @@ bool TonyEngine::loadTonyDat() {
 	int minVer = in.readByte();
 
 	if ((majVer != TONY_DAT_VER_MAJ) || (minVer != TONY_DAT_VER_MIN)) {
-		msg = Common::U32String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
-			filename.c_str(), TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer);
-		GUIErrorMessage(msg);
-		warning("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.",
-			filename.c_str(), TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer);
+		const char *msg = _s("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.");
+		errorMessage = Common::U32String::format(_(msg), filename.c_str(), TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer);
+		GUIErrorMessage(errorMessage);
+		warning(msg, filename.c_str(), TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer);
 
 		return false;
 	}
@@ -254,9 +254,10 @@ bool TonyEngine::loadTonyDat() {
 
 	int numVariant = in.readUint16BE();
 	if (expectedLangVariant > numVariant - 1) {
-		msg = Common::U32String::format(_("Font variant not present in '%s' engine data file."), filename.c_str());
-		GUIErrorMessage(msg);
-		warning("Font variant not present in '%s' engine data file.", filename.c_str());
+		const char *msg = _s("Font variant not present in '%s' engine data file.");
+		errorMessage = Common::U32String::format(_(msg), filename.c_str());
+		GUIErrorMessage(errorMessage);
+		warning(msg, filename.c_str());
 
 		return false;
 	}
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 712cd4344c..375ecdf5fc 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -243,9 +243,10 @@ void ToonEngine::parseInput() {
 						GUI::TimedMessageDialog dialog(buf, 1000);
 						dialog.runModal();
 					} else {
-						Common::U32String buf = Common::U32String::format(_("Could not quick load the saved game #%d"), slotNum);
+						const char *msg = _s("Could not quick load the saved game #%d");
+						Common::U32String buf = Common::U32String::format(_(msg), slotNum);
 						GUI::MessageDialog dialog(buf);
-						warning("Could not quick load the saved game #%d", slotNum);
+						warning(msg, slotNum);
 						dialog.runModal();
 					}
 				}
@@ -1524,9 +1525,12 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) {
 
 	// load package
 	if (!resources()->openPackage(createRoomFilename(locationName + ".PAK"))) {
-		Common::U32String msg = Common::U32String::format(_("Unable to locate the '%s' data file."), createRoomFilename(locationName + ".PAK").c_str());
-		GUIErrorMessage(msg);
-		warning("Unable to locate the '%s' data file.", createRoomFilename(locationName + ".PAK").c_str());
+		const char *msg = _s("Unable to locate the '%s' data file.");
+		Common::String roomFileName = createRoomFilename(locationName + ".PAK");
+
+		Common::U32String buf = Common::U32String::format(_(msg), roomFileName.c_str());
+		GUIErrorMessage(buf);
+		warning(msg, roomFileName.c_str());
 		_shouldQuit = true;
 		return;
 	}
@@ -4942,16 +4946,17 @@ void ToonEngine::createShadowLUT() {
 
 bool ToonEngine::loadToonDat() {
 	Common::File in;
-	Common::U32String msg;
+	Common::U32String errorMessage;
 	Common::String filename = "toon.dat";
 	int majVer, minVer;
 
 	in.open(filename.c_str());
 
 	if (!in.isOpen()) {
-		msg = Common::U32String::format(_("Unable to locate the '%s' engine data file."), filename.c_str());
-		GUIErrorMessage(msg);
-		warning("Unable to locate the '%s' engine data file.", filename.c_str());
+		const char *msg = _s("Unable to locate the '%s' engine data file.");
+		errorMessage = Common::U32String::format(_(msg), filename.c_str());
+		GUIErrorMessage(errorMessage);
+		warning(msg, filename.c_str());
 		return false;
 	}
 
@@ -4961,9 +4966,10 @@ bool ToonEngine::loadToonDat() {
 	buf[4] = '\0';
 
 	if (strcmp(buf, "TOON")) {
-		msg = Common::U32String::format(_("The '%s' engine data file is corrupt."), filename.c_str());
-		GUIErrorMessage(msg);
-		warning("The '%s' engine data file is corrupt.", filename.c_str());
+		const char *msg = _s("The '%s' engine data file is corrupt.");
+		errorMessage = Common::U32String::format(_(msg), filename.c_str());
+		GUIErrorMessage(errorMessage);
+		warning(msg, filename.c_str());
 		return false;
 	}
 
@@ -4971,13 +4977,11 @@ bool ToonEngine::loadToonDat() {
 	minVer = in.readByte();
 
 	if ((majVer != TOON_DAT_VER_MAJ) || (minVer != TOON_DAT_VER_MIN)) {
-		msg = Common::U32String::format(
-			_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."),
-			filename.c_str(), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer);
-		GUIErrorMessage(msg);
-		warning("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.",
-			filename.c_str(), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer);
+		const char *msg = _s("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d.");
+		errorMessage = Common::U32String::format(_(msg), filename.c_str(), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer);
+		GUIErrorMessage(errorMessage);
 
+		warning(msg, filename.c_str(), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer);
 		return false;
 	}
 
diff --git a/engines/ultima/nuvie/nuvie.cpp b/engines/ultima/nuvie/nuvie.cpp
index 98741b729a..bc51cfb5f0 100644
--- a/engines/ultima/nuvie/nuvie.cpp
+++ b/engines/ultima/nuvie/nuvie.cpp
@@ -389,7 +389,7 @@ bool NuvieEngine::quickSave(int saveSlot, bool isLoad) {
 			return false;
 		}
 	} else {
-		Common::String saveDesc = Common::String::format(_("Quicksave %03d").encode().c_str(), saveSlot);
+		Common::String saveDesc = Common::String::format("Quicksave %03d", saveSlot);
 		return saveGameState(saveSlot, saveDesc, false).getCode() == Common::kNoError;
 	}
 }


Commit: 4cef06d7a89ddfffe34b462952fea900022a6589
    https://github.com/scummvm/scummvm/commit/4cef06d7a89ddfffe34b462952fea900022a6589
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
BACKENDS: WIN32: Use calloc to allocate memory for UTF8ToUnicode wrapper.

Changed paths:
    backends/platform/sdl/win32/win32_wrapper.cpp


diff --git a/backends/platform/sdl/win32/win32_wrapper.cpp b/backends/platform/sdl/win32/win32_wrapper.cpp
index 4a011881fd..7c7357a4d7 100644
--- a/backends/platform/sdl/win32/win32_wrapper.cpp
+++ b/backends/platform/sdl/win32/win32_wrapper.cpp
@@ -109,7 +109,7 @@ wchar_t *UTF8ToUnicode(const char *s) {
 	DWORD size = MultiByteToWideChar(CP_UTF8, 0, s, -1, NULL, 0);
 
 	if (size > 0) {
-		LPWSTR result = new WCHAR[size];
+		LPWSTR result = (LPWSTR)calloc(size, sizeof(WCHAR));
 		if (MultiByteToWideChar(CP_UTF8, 0, s, -1, result, size) != 0)
 			return result;
 	}


Commit: 24151a6d318227e55932a8af49c2d9815aad64c4
    https://github.com/scummvm/scummvm/commit/24151a6d318227e55932a8af49c2d9815aad64c4
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
DEVTOOLS: CREDITS: Update script to not write ascii descriptions when adding person.

Changed paths:
    devtools/credits.pl


diff --git a/devtools/credits.pl b/devtools/credits.pl
index 7dc595a87a..45bf6f9eda 100755
--- a/devtools/credits.pl
+++ b/devtools/credits.pl
@@ -501,11 +501,7 @@ sub add_person {
 
 		# Print desc wrapped
 		if (length $desc > 0) {
-			my $ascii_desc = html_entities_to_ascii($desc);
 			$desc = html_entities_to_cpp($desc);
-			if ($ascii_desc ne $desc) {
-				print '"A2""'.$ascii_desc.'",' . "\n";
-			}
 			print '"C2""'.$desc.'",' . "\n";
 		}
 	} elsif ($mode eq "XML-DOC") {


Commit: e00e4534897a95d766612bb10257e694626b09ff
    https://github.com/scummvm/scummvm/commit/e00e4534897a95d766612bb10257e694626b09ff
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: CREDITS: Regenerate credits.h file

Changed paths:
    gui/credits.h


diff --git a/gui/credits.h b/gui/credits.h
index f687575f15..ac83a53f1a 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -144,7 +144,6 @@ static const char *credits[] = {
 "C0""Eric Fry",
 "C0""Benjamin Haisch",
 "C2""Actor pathfinding",
-"A0""Angel Eduardo Garcia Hernandez",
 "C0""\301ngel Eduardo Garc\355a Hern\341ndez",
 "C2""Help with reverse engineering",
 "",


Commit: 455a05b05986a66ce3089ff8f1f1c80c367aa321
    https://github.com/scummvm/scummvm/commit/455a05b05986a66ce3089ff8f1f1c80c367aa321
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
BACKENDS: SDL: Remove redundant code when set text in clipboard.

Changed paths:
    backends/platform/sdl/sdl.cpp


diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 49ae9ba965..0e0ff0a55a 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -509,14 +509,8 @@ Common::U32String OSystem_SDL::getTextFromClipboard() {
 
 bool OSystem_SDL::setTextInClipboard(const Common::U32String &text) {
 	// The encoding we need to use is UTF-8.
-	Common::String textStr = text.encode();
-	char *utf8_text = (char *)textStr.c_str();
-
-	if (utf8_text) {
-		int status = SDL_SetClipboardText(utf8_text);
-		return status == 0;
-	}
-	return SDL_SetClipboardText(textStr.c_str()) == 0;
+	Common::String utf8Text = text.encode();
+	return SDL_SetClipboardText(utf8Text.c_str()) == 0;
 }
 #endif
 


Commit: 984e7fae99660301eb0f9ce565030134b1a38387
    https://github.com/scummvm/scummvm/commit/984e7fae99660301eb0f9ce565030134b1a38387
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
BACKENDS: DIALOGS: Remove redundant code for GTK Dialogs.

- Dialogs take in const gchar *, so no need to convert to char* and then pass it along.

Changed paths:
    backends/dialogs/gtk/gtk-dialogs.cpp


diff --git a/backends/dialogs/gtk/gtk-dialogs.cpp b/backends/dialogs/gtk/gtk-dialogs.cpp
index 10511058e9..72a18936f3 100644
--- a/backends/dialogs/gtk/gtk-dialogs.cpp
+++ b/backends/dialogs/gtk/gtk-dialogs.cpp
@@ -42,23 +42,19 @@ Common::DialogManager::DialogResult GtkDialogManager::showFileBrowser(const Comm
 	DialogResult result = kDialogCancel;
 
 	// Convert labels to UTF-8
-	Common::String titleStr = title.encode();
-	Common::String choose = _("Choose").encode();
-	Common::String cancel = _("Cancel").encode();
-
-	char *utf8Title = (char *)(titleStr.c_str());
-	char *utf8Choose = (char *)(choose.c_str());
-	char *utf8Cancel = (char *)(cancel.c_str());
+	Common::String utf8Title = title.encode();
+	Common::String utf8Choose = _("Choose").encode();
+	Common::String utf8Cancel = _("Cancel").encode();
 
 	GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
 	if (isDirBrowser) {
 		action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
 	}
 #if GTK_CHECK_VERSION(3,20,0)
-	GtkFileChooserNative *native = gtk_file_chooser_native_new(utf8Title, NULL, action, utf8Choose, utf8Cancel);
+	GtkFileChooserNative *native = gtk_file_chooser_native_new(utf8Title.c_str(), NULL, action, utf8Choose.c_str(), utf8Cancel.c_str());
 	GtkFileChooser *chooser = GTK_FILE_CHOOSER(native);
 #else
-	GtkWidget *dialog = gtk_file_chooser_dialog_new(utf8Title, NULL, action, utf8Choose, GTK_RESPONSE_ACCEPT, utf8Cancel, GTK_RESPONSE_CANCEL, NULL);
+	GtkWidget *dialog = gtk_file_chooser_dialog_new(utf8Title.c_str(), NULL, action, utf8Choose.c_str(), GTK_RESPONSE_ACCEPT, utf8Cancel.c_str(), GTK_RESPONSE_CANCEL, NULL);
 	GtkFileChooser *chooser = GTK_FILE_CHOOSER(dialog);
 #endif
 


Commit: a089fe47e7fe318323014753c4b2aa2a4ab5a1b3
    https://github.com/scummvm/scummvm/commit/a089fe47e7fe318323014753c4b2aa2a4ab5a1b3
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
BACKENDS: Display messages on OSD takes in U32Strings for modular backend.

Changed paths:
    backends/modular-backend.cpp
    backends/modular-backend.h


diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp
index 5940c2dd4a..a6228433c3 100644
--- a/backends/modular-backend.cpp
+++ b/backends/modular-backend.cpp
@@ -243,7 +243,7 @@ void ModularGraphicsBackend::setCursorPalette(const byte *colors, uint start, ui
 	_graphicsManager->setCursorPalette(colors, start, num);
 }
 
-void ModularGraphicsBackend::displayMessageOnOSD(const char *msg) {
+void ModularGraphicsBackend::displayMessageOnOSD(const Common::U32String &msg) {
 	_graphicsManager->displayMessageOnOSD(msg);
 }
 
diff --git a/backends/modular-backend.h b/backends/modular-backend.h
index 103cd1de56..a8e043ff02 100644
--- a/backends/modular-backend.h
+++ b/backends/modular-backend.h
@@ -119,7 +119,7 @@ public:
 	/** @name Miscellaneous */
 	//@{
 
-	virtual void displayMessageOnOSD(const char *msg) override final;
+	virtual void displayMessageOnOSD(const Common::U32String &msg) override final;
 	virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) override final;
 
 	//@}


Commit: 2fa77032062023cd582ae8c810b3cee74cc394a0
    https://github.com/scummvm/scummvm/commit/2fa77032062023cd582ae8c810b3cee74cc394a0
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GLK: Use U32Strings properly for clipboards.

Changed paths:
    engines/glk/selection.cpp


diff --git a/engines/glk/selection.cpp b/engines/glk/selection.cpp
index f5ef012fd2..63d900b502 100644
--- a/engines/glk/selection.cpp
+++ b/engines/glk/selection.cpp
@@ -33,19 +33,14 @@ void Clipboard::clipboardStore(const Common::U32String &text) {
 }
 
 void Clipboard::clipboardSend(ClipSource source) {
-	// Convert unicode string to standard string, since that's all ScummVM supports
-	Common::String text;
-	for (uint idx = 0; idx < _text.size(); ++idx)
-		text += (_text[idx] <= 0x7f) ? (char)_text[idx] : '?';
-
-	g_system->setTextInClipboard(text);
+	g_system->setTextInClipboard(_text);
 }
 
 void Clipboard::clipboardReceive(ClipSource source) {
 	Windows &windows = *g_vm->_windows;
 
 	if (g_system->hasTextInClipboard()) {
-		Common::String text = g_system->getTextFromClipboard();
+		Common::U32String text = g_system->getTextFromClipboard();
 		for (uint idx = 0; idx < text.size(); ++idx) {
 			uint c = text[idx];
 			if (c != '\r' && c != '\n' && c != '\b' && c != '\t')


Commit: 86055761e84edc8cfcc46072a93b049f0ac70933
    https://github.com/scummvm/scummvm/commit/86055761e84edc8cfcc46072a93b049f0ac70933
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
KYRA: Use U32Strings when EoBCoreEngine::initKeymaps adds keymap actions.

Changed paths:
    engines/kyra/engine/kyra_rpg.cpp
    engines/kyra/engine/kyra_rpg.h


diff --git a/engines/kyra/engine/kyra_rpg.cpp b/engines/kyra/engine/kyra_rpg.cpp
index 03307c4bcd..ebbf59f6c6 100644
--- a/engines/kyra/engine/kyra_rpg.cpp
+++ b/engines/kyra/engine/kyra_rpg.cpp
@@ -225,7 +225,7 @@ Common::Error KyraRpgEngine::init() {
 	return Common::kNoError;
 }
 
-void KyraRpgEngine::addKeymapAction(Common::Keymap *const keyMap, const char *actionId, const Common::String &actionDesc, const Common::Functor0Mem<void, Common::Action>::FuncType setEventProc, const Common::String &mapping1, const Common::String &mapping2) {
+void KyraRpgEngine::addKeymapAction(Common::Keymap *const keyMap, const char *actionId, const Common::U32String &actionDesc, const Common::Functor0Mem<void, Common::Action>::FuncType setEventProc, const Common::String &mapping1, const Common::String &mapping2) {
 	Common::Action *act = new Common::Action(actionId, actionDesc);
 	Common::Functor0Mem<void, Common::Action>(act, setEventProc)();
 	act->addDefaultInputMapping(mapping1);
@@ -233,7 +233,7 @@ void KyraRpgEngine::addKeymapAction(Common::Keymap *const keyMap, const char *ac
 	keyMap->addAction(act);
 }
 
-void KyraRpgEngine::addKeymapAction(Common::Keymap *const keyMap, const char *actionId, const Common::String &actionDesc, Common::KeyState eventKeyState, const Common::String &mapping1, const Common::String &mapping2) {
+void KyraRpgEngine::addKeymapAction(Common::Keymap *const keyMap, const char *actionId, const Common::U32String &actionDesc, Common::KeyState eventKeyState, const Common::String &mapping1, const Common::String &mapping2) {
 	Common::Action *act = new Common::Action(actionId, actionDesc);
 	act->setKeyEvent(eventKeyState);
 	act->addDefaultInputMapping(mapping1);
diff --git a/engines/kyra/engine/kyra_rpg.h b/engines/kyra/engine/kyra_rpg.h
index 5f95a6f8dc..c91eb50620 100644
--- a/engines/kyra/engine/kyra_rpg.h
+++ b/engines/kyra/engine/kyra_rpg.h
@@ -174,8 +174,8 @@ protected:
 	// Init
 	void initStaticResource();
 
-	static void addKeymapAction(Common::Keymap *const keyMap, const char *actionId, const Common::String &actionDesc, const Common::Functor0Mem<void, Common::Action>::FuncType setEventProc, const Common::String &mapping1, const Common::String &mapping2);
-	static void addKeymapAction(Common::Keymap *const keyMap, const char *actionId, const Common::String &actionDesc, Common::KeyState eventKeyState, const Common::String &mapping1, const Common::String &mapping2);
+	static void addKeymapAction(Common::Keymap *const keyMap, const char *actionId, const Common::U32String &actionDesc, const Common::Functor0Mem<void, Common::Action>::FuncType setEventProc, const Common::String &mapping1, const Common::String &mapping2);
+	static void addKeymapAction(Common::Keymap *const keyMap, const char *actionId, const Common::U32String &actionDesc, Common::KeyState eventKeyState, const Common::String &mapping1, const Common::String &mapping2);
 
 	const uint8 **_itemIconShapes;
 


Commit: 67daa0fa9665cbfefa866d7085d4141a4716ef49
    https://github.com/scummvm/scummvm/commit/67daa0fa9665cbfefa866d7085d4141a4716ef49
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: Add missing parameter in MessageDialog

Changed paths:
    gui/message.h


diff --git a/gui/message.h b/gui/message.h
index 6cda5b2961..e269a3dcfb 100644
--- a/gui/message.h
+++ b/gui/message.h
@@ -47,7 +47,7 @@ public:
 	void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
 private:
 	const char *_url;
-	void init(const Common::U32String &message, const Common::U32String &defaultButton, const Common::U32String &altButton, Graphics::TextAlign alignment);
+	void init(const Common::U32String &message, const Common::U32String &defaultButton, const Common::U32String &altButton, Graphics::TextAlign alignment, const char *url);
 };
 
 /**


Commit: 71fb3b4dbb415368d8024ee6d0a7223fe5c75fb7
    https://github.com/scummvm/scummvm/commit/71fb3b4dbb415368d8024ee6d0a7223fe5c75fb7
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
SCI: Use U32Strings when creating options widget.

Changed paths:
    engines/sci/detection.cpp


diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index b47191b7c0..cbce01a8f5 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -616,11 +616,11 @@ OptionsWidget::OptionsWidget(GuiObject *boss, const Common::String &name, const
 
 	for (const ADExtraGuiOptionsMap *entry = optionsList; entry->guioFlag; ++entry)
 		if (checkGameGUIOption(entry->guioFlag, _guiOptions))
-			_checkboxes[entry->option.configOption] = new GUI::CheckboxWidget(widgetsBoss(), _dialogLayout + "." + entry->option.configOption, entry->option.label, entry->option.tooltip);
+			_checkboxes[entry->option.configOption] = new GUI::CheckboxWidget(widgetsBoss(), _dialogLayout + "." + entry->option.configOption, Common::U32String(entry->option.label), Common::U32String(entry->option.tooltip));
 
 	for (const PopUpOptionsMap *entry = popUpOptionsList; entry->guioFlag; ++entry)
 		if (checkGameGUIOption(entry->guioFlag, _guiOptions)) {
-			GUI::StaticTextWidget *textWidget = new GUI::StaticTextWidget(widgetsBoss(), _dialogLayout + "." + entry->configOption + "_desc", entry->label, entry->tooltip);
+			GUI::StaticTextWidget *textWidget = new GUI::StaticTextWidget(widgetsBoss(), _dialogLayout + "." + entry->configOption + "_desc", Common::U32String(entry->label), Common::U32String(entry->tooltip));
 			textWidget->setAlign(Graphics::kTextAlignRight);
 
 			_popUps[entry->configOption] = new GUI::PopUpWidget(widgetsBoss(), _dialogLayout + "." + entry->configOption);


Commit: 8309b98e66af0552f2da83daabf50ac46bb65a6d
    https://github.com/scummvm/scummvm/commit/8309b98e66af0552f2da83daabf50ac46bb65a6d
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
PARALLACTION: Create saveload dialogs & message dialogs with U32.

Changed paths:
    engines/parallaction/saveload.cpp
    engines/parallaction/saveload.h


diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp
index 284dc9f364..57a9aa7798 100644
--- a/engines/parallaction/saveload.cpp
+++ b/engines/parallaction/saveload.cpp
@@ -176,7 +176,7 @@ void SaveLoad_ns::doSaveGame(uint16 slot, const char* name) {
 	delete f;
 }
 
-int SaveLoad::selectSaveFile(Common::String &selectedName, bool saveMode, const Common::String &caption, const Common::String &button) {
+int SaveLoad::selectSaveFile(Common::String &selectedName, bool saveMode, const Common::U32String &caption, const Common::U32String &button) {
 	GUI::SaveLoadChooser slc(caption, button, saveMode);
 
 	selectedName.clear();
@@ -311,7 +311,7 @@ void SaveLoad_ns::renameOldSavefiles() {
 		return;
 	}
 
-	Common::String msg;
+	Common::U32String msg;
 	if (success == numOldSaves) {
 		msg = _("ScummVM successfully converted all your saved games.");
 	} else {
diff --git a/engines/parallaction/saveload.h b/engines/parallaction/saveload.h
index 19e830dddb..dd75df7301 100644
--- a/engines/parallaction/saveload.h
+++ b/engines/parallaction/saveload.h
@@ -35,7 +35,7 @@ protected:
 	Common::String genSaveFileName(uint slot);
 	Common::InSaveFile *getInSaveFile(uint slot);
 	Common::OutSaveFile *getOutSaveFile(uint slot);
-	int selectSaveFile(Common::String &selectedName, bool saveMode, const Common::String &caption, const Common::String &button);
+	int selectSaveFile(Common::String &selectedName, bool saveMode, const Common::U32String &caption, const Common::U32String &button);
 	int buildSaveFileList(Common::StringArray& l);
 	virtual void doLoadGame(uint16 slot) = 0;
 	virtual void doSaveGame(uint16 slot, const char* name) = 0;


Commit: 08e9eb3f18ede1a349e289b3f4f2ec69cdad1ec7
    https://github.com/scummvm/scummvm/commit/08e9eb3f18ede1a349e289b3f4f2ec69cdad1ec7
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
SCI: Use Strings for SaveGameDescription

- Because Unicode input is not supported, resulting input strings are always ascii and no need to store as U32.

Changed paths:
    engines/sci/engine/guest_additions.cpp
    engines/sci/engine/guest_additions.h
    engines/sci/engine/state.h


diff --git a/engines/sci/engine/guest_additions.cpp b/engines/sci/engine/guest_additions.cpp
index b6f7da665c..0b9bbf2a86 100644
--- a/engines/sci/engine/guest_additions.cpp
+++ b/engines/sci/engine/guest_additions.cpp
@@ -672,7 +672,7 @@ reg_t GuestAdditions::promptSaveRestoreRama(EngineState *s, int argc, reg_t *arg
 int GuestAdditions::runSaveRestore(const bool isSave, reg_t outDescription, const int forcedSaveId) const {
 	assert(!(isSave && outDescription.isNull()));
 
-	Common::U32String descriptionString;
+	Common::String descriptionString;
 	int saveId = runSaveRestore(isSave, descriptionString, forcedSaveId);
 
 	if (!outDescription.isNull()) {
@@ -686,7 +686,7 @@ int GuestAdditions::runSaveRestore(const bool isSave, reg_t outDescription, cons
 	return saveId;
 }
 
-int GuestAdditions::runSaveRestore(const bool isSave, Common::U32String &outDescription, const int forcedSaveId) const {
+int GuestAdditions::runSaveRestore(const bool isSave, Common::String &outDescription, const int forcedSaveId) const {
 	int saveId;
 
 	if (!isSave && forcedSaveId != -1) {
diff --git a/engines/sci/engine/guest_additions.h b/engines/sci/engine/guest_additions.h
index 1f066dfcc9..7cae8fb201 100644
--- a/engines/sci/engine/guest_additions.h
+++ b/engines/sci/engine/guest_additions.h
@@ -271,7 +271,7 @@ public:
 	 * id to this value.
 	 */
 	int runSaveRestore(const bool isSave, const reg_t outDescription, const int forcedSaveId = -1) const;
-	int runSaveRestore(const bool isSave, Common::U32String &outDescription, const int forcedSaveId = -1) const;
+	int runSaveRestore(const bool isSave, Common::String &outDescription, const int forcedSaveId = -1) const;
 #endif
 
 #pragma mark -
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 31b4fb8db9..46161a3187 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -138,7 +138,7 @@ public:
 
 	// see kmisc.cpp / kMacPlatform32
 	int _kq7MacSaveGameId; // the saved game id to use when saving (might not exist yet)
-	Common::U32String _kq7MacSaveGameDescription; // description to use when saving game
+	Common::String _kq7MacSaveGameDescription; // description to use when saving game
 
 	uint _chosenQfGImportItem; // Remembers the item selected in QfG import rooms
 


Commit: 2eeb0cb859fc88260237a3383f98b15bd5a22451
    https://github.com/scummvm/scummvm/commit/2eeb0cb859fc88260237a3383f98b15bd5a22451
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: Use U32Strings for MessageDialogWithURL.

Changed paths:
    gui/message.cpp
    gui/message.h


diff --git a/gui/message.cpp b/gui/message.cpp
index de19df49a7..2d2518bec5 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -144,8 +144,12 @@ void TimedMessageDialog::handleTickle() {
 		close();
 }
 
+MessageDialogWithURL::MessageDialogWithURL(const Common::U32String &message, const char *url, const Common::U32String &defaultButton, Graphics::TextAlign alignment)
+	: MessageDialog(message, defaultButton, _("Open URL"), alignment, url) {
+}
+
 MessageDialogWithURL::MessageDialogWithURL(const Common::String &message, const char *url, const char *defaultButton, Graphics::TextAlign alignment)
-		: MessageDialog(message, defaultButton, _s("Open URL"), alignment, url) {
+		: MessageDialog(Common::U32String(message), Common::U32String(defaultButton), _("Open URL"), alignment, url) {
 }
 
 
diff --git a/gui/message.h b/gui/message.h
index e269a3dcfb..a313a51dc4 100644
--- a/gui/message.h
+++ b/gui/message.h
@@ -68,6 +68,7 @@ protected:
  */
 class MessageDialogWithURL : public MessageDialog {
 public:
+	MessageDialogWithURL(const Common::U32String &message, const char *url, const Common::U32String &defaultButton = Common::U32String("OK"), Graphics::TextAlign alignment = Graphics::kTextAlignCenter);
 	MessageDialogWithURL(const Common::String &message, const char *url, const char *defaultButton = "OK", Graphics::TextAlign alignment = Graphics::kTextAlignCenter);
 };
 


Commit: f72a98c7995becd195712c2701e216eb26d74133
    https://github.com/scummvm/scummvm/commit/f72a98c7995becd195712c2701e216eb26d74133
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: Return Strings from createDefaultSaveDesc

Changed paths:
    gui/saveload.cpp
    gui/saveload.h


diff --git a/gui/saveload.cpp b/gui/saveload.cpp
index edaa8de4cd..f37d3ed57d 100644
--- a/gui/saveload.cpp
+++ b/gui/saveload.cpp
@@ -63,7 +63,7 @@ void SaveLoadChooser::selectChooser(const MetaEngine &engine) {
 #endif // !DISABLE_SAVELOADCHOOSER_GRID
 }
 
-Common::U32String SaveLoadChooser::createDefaultSaveDescription(const int slot) const {
+Common::String SaveLoadChooser::createDefaultSaveDescription(const int slot) const {
 #if defined(USE_SAVEGAME_TIMESTAMP)
 	TimeDate curTime;
 	g_system->getTimeAndDate(curTime);
diff --git a/gui/saveload.h b/gui/saveload.h
index e26ba0886e..3a976863d5 100644
--- a/gui/saveload.h
+++ b/gui/saveload.h
@@ -69,7 +69,7 @@ public:
 	 * @param slot The slot number (must be >= 0).
 	 * @return The slot description.
 	 */
-	Common::U32String createDefaultSaveDescription(const int slot) const;
+	Common::String createDefaultSaveDescription(const int slot) const;
 };
 
 } // End of namespace GUI


Commit: 86b8c23f78ed89f943e0ddee83666134770e9bdd
    https://github.com/scummvm/scummvm/commit/86b8c23f78ed89f943e0ddee83666134770e9bdd
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
SCUMM: DIALOGS: Return U32 for queryResString.

Changed paths:
    engines/scumm/dialogs.cpp
    engines/scumm/dialogs.h


diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index d4edc323fc..4a4ba0bd15 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -419,7 +419,7 @@ void InfoDialog::reflowLayout() {
 	_text->setSize(_w, _h);
 }
 
-const Common::String InfoDialog::queryResString(int stringno) {
+const Common::U32String InfoDialog::queryResString(int stringno) {
 	byte buf[256];
 	const byte *result;
 
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index c9b2e67a9e..d5185a05b5 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -95,7 +95,7 @@ public:
 protected:
 
 	// Query a string from the resources
-	const String queryResString(int stringno);
+	const U32String queryResString(int stringno);
 };
 
 /**


Commit: 20d661947bd52fa97d51bc65be0694a1643ef472
    https://github.com/scummvm/scummvm/commit/20d661947bd52fa97d51bc65be0694a1643ef472
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
SCI: Fix typo for showScummVMDialog

Changed paths:
    engines/sci/resource.cpp


diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index e6f25432fd..a3fd436d7e 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -813,7 +813,7 @@ void ResourceManager::addScriptChunkSources() {
 #endif
 }
 
-extern int showScummVMDialog(const Common::U32String &essage, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true);
+extern int showScummVMDialog(const Common::U32String &message, const Common::U32String &altButton = Common::U32String(""), bool alignCenter = true);
 
 void ResourceManager::scanNewSources() {
 	_hasBadResources = false;


Commit: e206c513bb65962873a267a9018fb8e11865eaec
    https://github.com/scummvm/scummvm/commit/e206c513bb65962873a267a9018fb8e11865eaec
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
ENGINES: Proper usage of Saveload/SaveState for U32Strings.

Changed paths:
    engines/agi/saveload.cpp
    engines/dialogs.cpp
    engines/engine.cpp
    engines/savestate.h


diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 77637846d2..1f23154106 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -752,7 +752,7 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) {
 
 int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 	GUI::SaveLoadChooser *dialog;
-	Common::U32String desc;
+	Common::String desc;
 	int slot;
 
 	if (isSave) {
@@ -767,7 +767,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 		}
 
 		if (desc.size() > 28)
-			desc = Common::U32String(desc.begin(), desc.begin() + 28);
+			desc = Common::String(desc.c_str(), 28);
 	} else {
 		dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
 		slot = dialog->runModalWithCurrentTarget();
@@ -779,7 +779,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 		return true;
 
 	if (isSave)
-		return doSave(slot, Common::convertFromU32String(desc));
+		return doSave(slot, desc);
 	else
 		return doLoad(slot, false);
 }
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index edb3ea98f8..80c91b52cc 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -206,13 +206,13 @@ void MainMenuDialog::save() {
 	int slot = _saveDialog->runModalWithCurrentTarget();
 
 	if (slot >= 0) {
-		Common::U32String result(_saveDialog->getResultString());
+		Common::String result(_saveDialog->getResultString());
 		if (result.empty()) {
 			// If the user was lazy and entered no save name, come up with a default name.
 			result = _saveDialog->createDefaultSaveDescription(slot);
 		}
 
-		Common::Error status = _engine->saveGameState(slot, Common::convertFromU32String(result));
+		Common::Error status = _engine->saveGameState(slot, result);
 		if (status.getCode() != Common::kNoError) {
 			Common::U32String failMessage = Common::U32String::format(_("Failed to save game (%s)! "
 				  "Please consult the README for basic information, and for "
diff --git a/engines/engine.cpp b/engines/engine.cpp
index dccf320497..29daa66ecd 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -818,7 +818,7 @@ bool Engine::saveGameDialog() {
 		slotNum = dialog->runModalWithCurrentTarget();
 	}
 
-	Common::U32String desc = dialog->getResultString();
+	Common::String desc = dialog->getResultString();
 	if (desc.empty())
 		desc = dialog->createDefaultSaveDescription(slotNum);
 
@@ -827,7 +827,7 @@ bool Engine::saveGameDialog() {
 	if (slotNum < 0)
 		return false;
 
-	Common::Error saveError = saveGameState(slotNum, Common::convertFromU32String(desc));
+	Common::Error saveError = saveGameState(slotNum, desc);
 	if (saveError.getCode() != Common::kNoError) {
 		GUI::MessageDialog errorDialog(saveError.getDesc());
 		errorDialog.runModal();
diff --git a/engines/savestate.h b/engines/savestate.h
index 62ded23ba2..f43d190443 100644
--- a/engines/savestate.h
+++ b/engines/savestate.h
@@ -68,8 +68,8 @@ public:
 	/**
 	 * @param desc A human readable description of the save state.
 	 */
+	void setDescription(const Common::String &desc) { _description = desc.decode(); }
 	void setDescription(const Common::U32String &desc) { _description = desc; }
-	void setDescription(const Common::String &desc) { _description = Common::U32String(desc); }
 
 	/**
 	 * @return A human readable description of the save state.
@@ -184,7 +184,7 @@ public:
 	 *
 	 * This will return an empty string in case the value is not set.
 	 */
-	const Common::U32String &getPlayTime() const { return _playTime; }
+	const Common::String &getPlayTime() const { return _playTime; }
 
 	/**
 	 * Returns the time the game was played before the save state was created
@@ -243,7 +243,7 @@ private:
 	 * Human readable description of the time the game was played till the
 	 * save state was created.
 	 */
-	Common::U32String _playTime;
+	Common::String _playTime;
 
 	/**
 	 * The time the game was played before the save state was created


Commit: e5445fb9013530f39c6f4d6f6581a7fa558f64ed
    https://github.com/scummvm/scummvm/commit/e5445fb9013530f39c6f4d6f6581a7fa558f64ed
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: U32: Small improvements/fixes

- Remove = operator in String, which compared to a U32String.
- Let implicit cast take care of results from getResultString, so in-future easy to spot new changes.
- Use uint32 for each char when encodingUrlStrings, to avoid unsafe comparision.

Changed paths:
    common/str.cpp
    common/str.h
    engines/illusions/menusystem.cpp
    gui/unknown-game-dialog.cpp


diff --git a/common/str.cpp b/common/str.cpp
index 4429dfe856..a422e70384 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -289,11 +289,6 @@ String &String::operator=(char c) {
 	return *this;
 }
 
-String &String::operator=(const U32String &str) {
-	String internString = str.encode();
-	return String::operator=(internString);
-}
-
 String &String::operator+=(const char *str) {
 	if (pointerInOwnBuffer(str))
 		return operator+=(String(str));
diff --git a/common/str.h b/common/str.h
index 79c19ce12e..ce1d79fa95 100644
--- a/common/str.h
+++ b/common/str.h
@@ -137,7 +137,6 @@ public:
 	String &operator=(const char *str);
 	String &operator=(const String &str);
 	String &operator=(char c);
-	String &operator=(const U32String &str);
 	String &operator+=(const char *str);
 	String &operator+=(const String &str);
 	String &operator+=(char c);
diff --git a/engines/illusions/menusystem.cpp b/engines/illusions/menusystem.cpp
index 58cb3baf16..e4d230a167 100644
--- a/engines/illusions/menusystem.cpp
+++ b/engines/illusions/menusystem.cpp
@@ -702,7 +702,7 @@ void MenuActionSaveGame::execute() {
 
 	dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
 	slot = dialog->runModalWithCurrentTarget();
-	desc = dialog->getResultString().encode();
+	desc = dialog->getResultString();
 
 	delete dialog;
 
diff --git a/gui/unknown-game-dialog.cpp b/gui/unknown-game-dialog.cpp
index 3e2b8e9265..48c21b5d63 100644
--- a/gui/unknown-game-dialog.cpp
+++ b/gui/unknown-game-dialog.cpp
@@ -122,7 +122,7 @@ void UnknownGameDialog::rebuild() {
 Common::U32String UnknownGameDialog::encodeUrlString(const Common::U32String &string) {
 	Common::U32String encoded;
 	for (uint i = 0 ; i < string.size() ; ++i) {
-		char c = string[i];
+		uint32 c = string[i];
 		if ((c >= 'a' && c <= 'z') || (c >= 'A'  && c <= 'Z') || (c >= '0' && c <= '9') ||
 			c == '~' || c == '-' || c == '.' || c == '_')
 			encoded += c;


Commit: d1588665059f07df95bb0e6f75c3ed12c4eff937
    https://github.com/scummvm/scummvm/commit/d1588665059f07df95bb0e6f75c3ed12c4eff937
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
BACKENDS: Fix discord presence compilation with U32String

Changed paths:
    backends/presence/discord/discord.cpp


diff --git a/backends/presence/discord/discord.cpp b/backends/presence/discord/discord.cpp
index 60580add71..700b88392a 100644
--- a/backends/presence/discord/discord.cpp
+++ b/backends/presence/discord/discord.cpp
@@ -24,7 +24,6 @@
 #include "backends/presence/discord/discord.h"
 
 #ifdef USE_DISCORD
-#include "common/encoding.h"
 #include "common/translation.h"
 
 #include <discord_rpc.h>
@@ -44,27 +43,17 @@ DiscordPresence::~DiscordPresence() {
 
 void DiscordPresence::updateStatus(const Common::String &name, const Common::String &description) {
 	Common::String gameName = name.empty() ? "scummvm" : name;
-	Common::String gameDesc = description.empty() ? _("Launcher") : description;
+	Common::String gameDesc = description.empty() ? _("Launcher").encode() : description;
 
 	DiscordRichPresence presence;
 	memset(&presence, 0, sizeof(presence));
 	presence.largeImageKey = gameName.c_str();
-#ifdef USE_TRANSLATION
-	char *gameDescUtf8 = Common::Encoding::convert("utf-8", TransMan.getCurrentCharset(), gameDesc.c_str(), gameDesc.size());
-	presence.largeImageText = gameDescUtf8;
-	presence.details = gameDescUtf8;
-#else
 	presence.largeImageText = gameDesc.c_str();
 	presence.details = gameDesc.c_str();
-#endif
 	presence.smallImageKey = "scummvm";
 	presence.smallImageText = "ScummVM";
 	presence.startTimestamp = time(0);
 	Discord_UpdatePresence(&presence);
-
-#ifdef USE_TRANSLATION
-	free(gameDescUtf8);
-#endif
 }
 
 #endif


Commit: 03f3f01740a81acfd64820468826a19695085069
    https://github.com/scummvm/scummvm/commit/03f3f01740a81acfd64820468826a19695085069
Author: aryanrawlani28 (aryanrawlani007 at gmail.com)
Date: 2020-08-30T14:43:41+02:00

Commit Message:
GUI: Simplify code for UnknownGameDialogs when generating bug tracker URL.

Changed paths:
    gui/unknown-game-dialog.cpp
    gui/unknown-game-dialog.h


diff --git a/gui/unknown-game-dialog.cpp b/gui/unknown-game-dialog.cpp
index 48c21b5d63..fd5822f2a8 100644
--- a/gui/unknown-game-dialog.cpp
+++ b/gui/unknown-game-dialog.cpp
@@ -119,10 +119,10 @@ void UnknownGameDialog::rebuild() {
 	}
 }
 
-Common::U32String UnknownGameDialog::encodeUrlString(const Common::U32String &string) {
-	Common::U32String encoded;
+Common::String UnknownGameDialog::encodeUrlString(const Common::String &string) {
+	Common::String encoded;
 	for (uint i = 0 ; i < string.size() ; ++i) {
-		uint32 c = string[i];
+		char c = string[i];
 		if ((c >= 'a' && c <= 'z') || (c >= 'A'  && c <= 'Z') || (c >= '0' && c <= '9') ||
 			c == '~' || c == '-' || c == '.' || c == '_')
 			encoded += c;
@@ -132,21 +132,18 @@ Common::U32String UnknownGameDialog::encodeUrlString(const Common::U32String &st
 	return encoded;
 }
 
-Common::U32String UnknownGameDialog::generateBugtrackerURL() {
-	Common::U32String report = generateUnknownGameReport(_detectedGame, false, false);
+Common::String UnknownGameDialog::generateBugtrackerURL() {
+	Common::String report = generateUnknownGameReport(_detectedGame, false, false);
 	report = encodeUrlString(report);
 
 	Common::String engineId = encodeUrlString(_detectedGame.engineId);
 
-	Common::String preFinalReport = Common::String::format(
+	return Common::String::format(
 		"https://www.scummvm.org/unknowngame?"
-		"engine=%s",
-		engineId.c_str());
-
-	Common::U32String repDesc("&description=");
-	repDesc += report;
-
-	return Common::U32String(preFinalReport) + repDesc;
+		"engine=%s"
+		"&description=%s",
+		engineId.c_str(),
+		report.c_str());
 }
 
 void UnknownGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
diff --git a/gui/unknown-game-dialog.h b/gui/unknown-game-dialog.h
index 7f9e99bd5b..24e4179bf4 100644
--- a/gui/unknown-game-dialog.h
+++ b/gui/unknown-game-dialog.h
@@ -45,8 +45,8 @@ private:
 	void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
 	void reflowLayout() override;
 
-	Common::U32String generateBugtrackerURL();
-	static Common::U32String encodeUrlString(const Common::U32String &string);
+	Common::String generateBugtrackerURL();
+	static Common::String encodeUrlString(const Common::String &string);
 
 	const DetectedGame &_detectedGame;
 	ScrollContainerWidget *_textContainer;




More information about the Scummvm-git-logs mailing list