[pulseaudio-discuss] [PATCH 1/2] Do something sensible when compiled without iconv support

Maarten Bosmans mkbosmans at gmail.com
Mon Oct 10 00:27:16 PDT 2011


Without this fix, pacat won't start up, because it is unable to set the stream name.
---
 src/pulse/utf8.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/pulse/utf8.c b/src/pulse/utf8.c
index fe7bcd2..773a1f8 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;
 }
 
-- 
1.7.4.1



More information about the pulseaudio-discuss mailing list