aboutsummaryrefslogtreecommitdiffstats
path: root/src/log.c
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2007-01-08 05:04:08 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2007-01-08 05:04:08 +0000
commit44c5549b46a266a55b3e03c4cea19d4502cdd9e2 (patch)
treee3c4648a6813d1e83d07a7b7f51d6a21fc207d29 /src/log.c
parent4989672ac0d8c7766b2ccd904546127e800a8de7 (diff)
downloadmpd-44c5549b46a266a55b3e03c4cea19d4502cdd9e2.tar.gz
mpd-44c5549b46a266a55b3e03c4cea19d4502cdd9e2.tar.xz
mpd-44c5549b46a266a55b3e03c4cea19d4502cdd9e2.zip
Output warning messages in the current locale's charset.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5229 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/log.c b/src/log.c
index 242caf31f..6b7e3c2d4 100644
--- a/src/log.c
+++ b/src/log.c
@@ -113,7 +113,10 @@ void flushWarningLog(void)
if (next == NULL) break;
*next = '\0';
next++;
- fprintf(stderr, "%s\n", s);
+ if (stdout_mode)
+ fprintf(stderr, "%s\n", utf8ToLocaleCharset(s));
+ else
+ fprintf(stderr, "%s\n", s);
s = next;
}