replace Glib::filename_to_utf8 with custom fname_to_utf8
(cherry picked from commit 30b4daf9077e3c6780cefbf6c4223da4698b8612)
This commit is contained in:
committed by
Lawrence Lee
parent
eb7c151260
commit
7324ea7230
@@ -67,25 +67,6 @@ Glib::ustring argv1;
|
||||
namespace
|
||||
{
|
||||
|
||||
// For an unknown reason, Glib::filename_to_utf8 doesn't work on reliably Windows,
|
||||
// so we're using Glib::filename_to_utf8 for Linux/Apple and Glib::locale_to_utf8 for Windows.
|
||||
Glib::ustring fname_to_utf8 (const char* fname)
|
||||
{
|
||||
#ifdef WIN32
|
||||
|
||||
try {
|
||||
return Glib::locale_to_utf8 (fname);
|
||||
} catch (Glib::Error&) {
|
||||
return Glib::convert_with_fallback (fname, "UTF-8", "ISO-8859-1", "?");
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
return Glib::filename_to_utf8 (fname);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
bool fast_export = false;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user