Hi,

At Tue, 4 Nov 2008 04:04:23 +0900,
Davi Barbosa wrote in [ruby-talk:319309]:
> require 'gtk2'
> ascii =3D GLib.convert(string, "ASCII//translit", "UTF-8")
>=20
> This not only worked for me, as the Iconv started to work as expected!=20
> For instance:
> require 'iconv'
> require 'gtk2'
> puts Iconv.conv("ASCII//translit","UTF-8","=E1=E0=E2=E4")
> gives 'aaaa'.

GNU libiconv seems to need the locale set.
The issue would be fixed by the following patch.

=0C
Index: configure.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- configure.in	(revision 20103)
+++ configure.in	(working copy)
@@ -559,5 +559,5 @@ AC_CHECK_HEADERS(stdlib.h string.h unist
 		 syscall.h pwd.h grp.h a.out.h utime.h memory.h direct.h sys/resource.h \
 		 sys/mkdev.h sys/utime.h netinet/in_systm.h float.h ieeefp.h pthread.h \
-		 ucontext.h intrinsics.h)
+		 ucontext.h intrinsics.h locale.h)
=20
 dnl Check additional types.
Index: main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- main.c	(revision 20103)
+++ main.c	(working copy)
@@ -12,4 +12,7 @@
=20
 #include "ruby.h"
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
=20
 #ifdef __human68k__
@@ -35,4 +38,7 @@ main(argc, argv)
     char **argv;
 {
+#ifdef HAVE_LOCALE_H
+    setlocale(LC_CTYPE, "");
+#endif
 #ifdef _WIN32
     NtInitialize(&argc, &argv);
=0C

--=20
Nobu Nakada