Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 97422 invoked by uid 500); 16 Jul 2002 22:48:16 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 97411 invoked from network); 16 Jul 2002 22:48:15 -0000 Message-ID: <3D34A2AC.7F3D417F@orcaware.com> Date: Tue, 16 Jul 2002 15:48:12 -0700 From: Blair Zajac X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,x-ns1rfacHe4WNh5,x-ns2U100btwUq5f MIME-Version: 1.0 To: Ulrich Drepper CC: Karl Fogel , dev@subversion.tigris.org, Apache Apr Mailing List Subject: Re: Is --enable-utf8 working everywhere? References: <85r8i5c8ee.fsf_-_@newton.ch.collab.net> <3D345ADA.B3C49ED5@orcaware.com> <1026856417.3672.120.camel@myware.mynet> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Ulrich Drepper wrote: > > On Tue, 2002-07-16 at 10:41, Blair Zajac wrote: > > > #0 0x000318c4 in apr_xlate_conv_buffer (convset=0x0, inbuf=0xffbef380 > > "stringtest.tmp", inbytes_left=0xffbef0ac, outbuf=0x558f0 "twice as long", > > outbytes_left=0xffbef0a8) at xlate.c:308 > > 308 if (convset->ich != (iconv_t)-1) { > > (gdb) bt > > #0 0x000318c4 in apr_xlate_conv_buffer (convset=0x0, inbuf=0xffbef380 > > "stringtest.tmp", inbytes_left=0xffbef0ac, outbuf=0x558f0 "twice as long", > > outbytes_left=0xffbef0a8) at xlate.c:308 > > #1 0x0002116c in convert_to_stringbuf (convset=0x0, src_data=0xffbef380 > > "stringtest.tmp", src_length=14, dest=0xffbef134, pool=0x55708) > > at subversion/libsvn_subr/utf.c:164 > > #2 0x0002161c in svn_utf_cstring_from_utf8 (dest=0xffbef1b4, src=0xffbef380 > > "stringtest.tmp", pool=0x55708) at subversion/libsvn_subr/utf.c:375 > > I don't have access to the sources so take this with a grain of salt. > > It looks as if the function svn_utf_cstring_from_utf8 calls to get a > iconv descriptor returns NULL as a sign that no such converstion is > possible. iconv_open normally signals this with (iconv_t)-1. So this > can be a simple mismatch. The error might not be visible on other > platforms because they actually do have a decent amount of converters > available. [cc'ing dev@apr.apache.org] It looks like a problem with iconv_open on my Solaris 8 system where iconv_open returns (iconv_t)-1, but errno is 0. Here's a way to demonstrate this using Apr only. Apply the following patch to apr and run % test/testmd5 626 UTF-8 Amongst the other print out, I get iconv_open failed: returned ffffffff errno is 0 Best, Blair -- Blair Zajac Web and OS performance plots - http://www.orcaware.com/orca/ Index: i18n/unix/xlate.c =================================================================== RCS file: /home/cvspublic/apr/i18n/unix/xlate.c,v retrieving revision 1.28 diff -u -r1.28 xlate.c --- i18n/unix/xlate.c 15 Jul 2002 19:21:01 -0000 1.28 +++ i18n/unix/xlate.c 16 Jul 2002 22:46:53 -0000 @@ -52,6 +52,7 @@ * . */ +#include #include "apr_private.h" #include "apr_lib.h" @@ -269,7 +270,9 @@ if (!found) { new->ich = iconv_open(topage, frompage); if (new->ich == (iconv_t)-1) { - return errno; +const int e = errno; +fprintf(stderr, "iconv_open failed: returned %p errno is %d\n", new->ich, e); + return e; } found = 1; check_sbcs(new); Index: test/testmd5.c =================================================================== RCS file: /home/cvspublic/apr/test/testmd5.c,v retrieving revision 1.14 diff -u -r1.14 testmd5.c --- test/testmd5.c 10 Jul 2002 06:01:13 -0000 1.14 +++ test/testmd5.c 16 Jul 2002 22:46:53 -0000 @@ -98,6 +98,7 @@ STD_TEST_NEQ(" apr_md5_init", apr_md5_init(&context)) if (xlate) { +#define APR_HAS_XLATE 1 #if APR_HAS_XLATE STD_TEST_NEQ(" apr_md5_set_xlate", apr_md5_set_xlate(&context, xlate))