diff options
author | Max Kellermann <max@duempel.org> | 2013-10-17 22:47:09 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-17 22:47:09 +0200 |
commit | 7fec2b02d419ab1de5589fb34d4fad90e9998aab (patch) | |
tree | a69e1f46c54aa0e3c3f2f1e1098bc2dc78df97a2 /src/fs/Charset.cxx | |
parent | 608a98c873b94826a98b8dbdf17aa02320de8776 (diff) | |
download | mpd-7fec2b02d419ab1de5589fb34d4fad90e9998aab.tar.gz mpd-7fec2b02d419ab1de5589fb34d4fad90e9998aab.tar.xz mpd-7fec2b02d419ab1de5589fb34d4fad90e9998aab.zip |
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.
Diffstat (limited to 'src/fs/Charset.cxx')
-rw-r--r-- | src/fs/Charset.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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 |