summaryrefslogtreecommitdiff
path: root/src/util/string.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/string.h')
-rw-r--r--src/util/string.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/util/string.h b/src/util/string.h
index b80e3c9a8..5bf2b5b7c 100644
--- a/src/util/string.h
+++ b/src/util/string.h
@@ -39,10 +39,18 @@ struct FlagDesc {
u32 flag;
};
+// try not to convert between wide/utf8 encodings; this can result in data loss
+// try to only convert between them when you need to input/output stuff via Irrlicht
+std::wstring utf8_to_wide(const std::string &input);
+std::string wide_to_utf8(const std::wstring &input);
+
+// NEVER use those two functions unless you have a VERY GOOD reason to
+// they just convert between wide and multibyte encoding
+// multibyte encoding depends on current locale, this is no good, especially on Windows
+
// You must free the returned string!
// The returned string is allocated using new
wchar_t *narrow_to_wide_c(const char *str);
-
std::wstring narrow_to_wide(const std::string &mbs);
std::string wide_to_narrow(const std::wstring &wcs);