blob: f961bda07d7e448efaae86851fc378fa0c5d6f88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
$NetBSD: patch-ca,v 1.3 2011/05/21 15:33:00 wiz Exp $
Avoid GNUism in iconv usage.
--- src/pulse/utf8.c.orig 2009-09-10 00:04:58.000000000 +0000
+++ src/pulse/utf8.c
@@ -55,6 +55,7 @@
#ifdef HAVE_ICONV
#include <iconv.h>
+#include <langinfo.h>
#endif
#include <pulse/xmalloc.h>
@@ -238,11 +239,11 @@ static char* iconv_simple(const char *st
}
char* pa_utf8_to_locale (const char *str) {
- return iconv_simple(str, "", "UTF-8");
+ return iconv_simple(str, nl_langinfo(CODESET), "UTF-8");
}
char* pa_locale_to_utf8 (const char *str) {
- return iconv_simple(str, "UTF-8", "");
+ return iconv_simple(str, "UTF-8", nl_langinfo(CODESET));
}
#else
|