Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-ppc-dev
Navigation:
Lists: gentoo-ppc-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentooppc-dev@g.o
From: Gontran Zepeda <gontran@...>
Subject: glibc, charsets, and iconv. oh my!
Date: Fri May 3 13:29:02 2002
So, gnome-extra/gal-0.19 fails to merge due to ./configure failing with :

[ ... ]
checking for catalogs to be installed...  az ca cs da de en_GB es fi fr gl
hu it ja ko lt nn no pl pt pt_BR ro ru sk sv ta tr uk zh_TW
sed: can't read ./intl/po2tbl.sed.in: No such file or directory
checking for libxml (aka gnome-xml) libraries 1.8.8 <= version < 2.0.0...
found
checking for iconv in -liconv... no
checking for iconv... yes
checking for gnu_get_libc_version... yes
checking if iconv() handles UTF-8... no
configure: error: You need to install a working iconv implementation, such
as http://clisp.cons.org/~haible/packages-libiconv.html
[ ... ]

in config.log 

#include <string.h>
#ifdef HAVE_GNU_GET_LIBC_VERSION
#include <gnu/libc-version.h>
#endif

int main (int argc, char **argv)
{
	const char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
	const char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
	char *transbuf = malloc (10), *trans = transbuf;
	iconv_t cd;
	size_t jp_len = strlen (jp), utf8_len = 10;
	size_t utf8_real_len = strlen (utf8);

#ifdef HAVE_GNU_GET_LIBC_VERSION
	/* glibc 2.1.2's iconv is broken in hard to test ways. */
	if (!strcmp (gnu_get_libc_version (), "2.1.2"))
		exit (1);
#endif

	cd = iconv_open ("UTF-8", "ISO-2022-JP");
	if (!cd)
		exit (1);
	if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
		exit (1);
	if (memcmp (utf8, transbuf, utf8_real_len) != 0)
		exit (1);

	exit (0);
}

So at first I was looking into UTF-8 problems, but it appears, that since 
	% iconv -l 
produces 'UTF-8', BUT NOT 'ISO-2022-JP' that the lack of iconv charset
support for JP specifically, but many others actually, is at issue.

The tricky bit is that % iconv -l on my x86 box produces quite a lot of
output -- maybe 4 times.  Of course, the glibc ebuilds are identical --
with the exception that my x86 glibc was built during a system upgrade and
not build time.

So to test a simple case, could someone who has rebuilt glibc via a portage
upgrade post their output from % iconv -l?

thx.
Gontran

Replies:
Re: glibc, charsets, and iconv. oh my!
-- Pieter Van den Abeele
Navigation:
Lists: gentoo-ppc-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
x86 - PPC portage merge?
Next by thread:
Re: glibc, charsets, and iconv. oh my!
Previous by date:
Re: x86 - PPC portage merge?
Next by date:
Re: glibc, charsets, and iconv. oh my!


Updated Jun 17, 2009

Summary: Archive of the gentoo-ppc-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.