fs/Charset: GetFSCharset() returns "utf-8" by default

If fs_charset is empty, i.e. we're using the default "utf-8",
GetFSCharset() should return exactly that instead of an empty
std::string.
This commit is contained in:
Max Kellermann
2013-10-17 22:47:09 +02:00
parent 608a98c873
commit 7fec2b02d4
3 changed files with 8 additions and 9 deletions

View File

@@ -70,10 +70,10 @@ SetFSCharset(const char *charset)
"SetFSCharset: fs charset is: %s", fs_charset.c_str());
}
const std::string &
const char *
GetFSCharset()
{
return fs_charset;
return fs_charset.empty() ? "utf-8" : fs_charset.c_str();
}
std::string

View File

@@ -29,7 +29,7 @@
* Gets file system character set name.
*/
gcc_const
const std::string &
const char *
GetFSCharset();
void