From 7fec2b02d419ab1de5589fb34d4fad90e9998aab Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 17 Oct 2013 22:47:09 +0200 Subject: 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. --- src/fs/Charset.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fs/Charset.cxx') diff --git a/src/fs/Charset.cxx b/src/fs/Charset.cxx index 3e324f470..39bb36e77 100644 --- a/src/fs/Charset.cxx +++ b/src/fs/Charset.cxx @@ -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 -- cgit v1.2.3