aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/Path.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/Path.cxx')
-rw-r--r--src/fs/Path.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fs/Path.cxx b/src/fs/Path.cxx
index 80b41cbaa..393cb3038 100644
--- a/src/fs/Path.cxx
+++ b/src/fs/Path.cxx
@@ -38,6 +38,18 @@
static char *fs_charset;
+std::string Path::ToUTF8() const
+{
+ if (value == nullptr)
+ return std::string();
+ char *path_utf8 = fs_charset_to_utf8(value);
+ if (path_utf8 == nullptr)
+ return std::string();
+ std::string result = value;
+ g_free(path_utf8);
+ return value;
+}
+
char *
fs_charset_to_utf8(const char *path_fs)
{