fs/Charset: use macro HAVE_FS_CHARSET internally
This commit is contained in:
parent
563db580ae
commit
6987f2ba82
@ -35,7 +35,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef HAVE_GLIB
|
#ifdef HAVE_FS_CHARSET
|
||||||
|
|
||||||
static constexpr Domain convert_domain("convert");
|
static constexpr Domain convert_domain("convert");
|
||||||
|
|
||||||
@ -121,13 +121,13 @@ PathToUTF8(const char *path_fs)
|
|||||||
{
|
{
|
||||||
assert(path_fs != nullptr);
|
assert(path_fs != nullptr);
|
||||||
|
|
||||||
#ifdef HAVE_GLIB
|
#ifdef HAVE_FS_CHARSET
|
||||||
if (fs_charset.empty()) {
|
if (fs_charset.empty()) {
|
||||||
#endif
|
#endif
|
||||||
auto result = std::string(path_fs);
|
auto result = std::string(path_fs);
|
||||||
FixSeparators(result);
|
FixSeparators(result);
|
||||||
return result;
|
return result;
|
||||||
#ifdef HAVE_GLIB
|
#ifdef HAVE_FS_CHARSET
|
||||||
}
|
}
|
||||||
|
|
||||||
GIConv conv = g_iconv_open("utf-8", fs_charset.c_str());
|
GIConv conv = g_iconv_open("utf-8", fs_charset.c_str());
|
||||||
@ -155,7 +155,7 @@ PathToUTF8(const char *path_fs)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_GLIB
|
#ifdef HAVE_FS_CHARSET
|
||||||
|
|
||||||
char *
|
char *
|
||||||
PathFromUTF8(const char *path_utf8)
|
PathFromUTF8(const char *path_utf8)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user