summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2011-10-10 09:27:16 +0200
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-10-11 22:48:21 +0530
commit3b7c6b21f4f0cd4df6b8cff44512b9640a189dc0 (patch)
tree5f187102cb50e563513714ca991b58f6750cf408
parent518338ac0e781e13bd893ee2d585af40f3ce04ae (diff)
downloadpulseaudio-3b7c6b21f4f0cd4df6b8cff44512b9640a189dc0.tar.gz
Do something sensible when compiled without iconv support
Without this fix, pacat won't start up, because it is unable to set the stream name.
-rw-r--r--src/pulse/utf8.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pulse/utf8.c b/src/pulse/utf8.c
index fe7bcd264..773a1f838 100644
--- a/src/pulse/utf8.c
+++ b/src/pulse/utf8.c
@@ -249,11 +249,16 @@ char* pa_locale_to_utf8 (const char *str) {
char* pa_utf8_to_locale (const char *str) {
pa_assert(str);
- return NULL;
+
+ return pa_ascii_filter(str);
}
char* pa_locale_to_utf8 (const char *str) {
pa_assert(str);
+
+ if (pa_utf8_valid(str))
+ return pa_xstrdup(str);
+
return NULL;
}