Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 67800 invoked from network); 25 Jun 2007 16:50:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jun 2007 16:50:37 -0000 Received: (qmail 26653 invoked by uid 500); 25 Jun 2007 16:50:37 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 26591 invoked by uid 500); 25 Jun 2007 16:50:37 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 26552 invoked by uid 99); 25 Jun 2007 16:50:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jun 2007 09:50:37 -0700 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=UNDISC_RECIPS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [216.200.145.36] (HELO omta14.mta.everyone.net) (216.200.145.36) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jun 2007 09:50:33 -0700 Received: from dm51.mta.everyone.net (bigiplb-dsnat [172.16.0.19]) by omta14.mta.everyone.net (Postfix) with ESMTP id 6B3EB43C28; Mon, 25 Jun 2007 09:49:55 -0700 (PDT) X-Eon-Dm: dm51 Received: by dm51.mta.everyone.net (EON-AUTHRELAY2[SSL] - 403473b2) id dm51.4678957d.a4271; Mon, 25 Jun 2007 09:49:54 -0700 X-Eon-Sig: AQLYrkxGf/IybdEaUQIAAAAC,7bb76b3ce3f49c48668f08af576ac491 From: "Marshall Powers" Cc: , "'Log4CXX User'" References: <1182787731.27898.ezmlm@apr.apache.org> <000d01c7b744$c89e86c0$2c01a8c0@nycapt35k.com> <467FEE24.4000809@rowe-clan.net> Subject: RE: Problem with iconv charsets... Date: Mon, 25 Jun 2007 12:48:41 -0400 Message-ID: <000e01c7b748$b0483900$2c01a8c0@nycapt35k.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 x-mimeole: Produced By Microsoft MimeOLE V6.00.2900.3138 Thread-Index: Ace3RoA281cQn4c1QtGzPcLGZjG83gAAOI+Q In-Reply-To: <467FEE24.4000809@rowe-clan.net> To: undisclosed-recipients: ; X-Virus-Checked: Checked by ClamAV on apache.org The string literal "ISO-8859-1" appears in APR and log4cxx source code. For example, from apr-1.2.7/misc/unix/charset.c: APR_DECLARE(const char*) apr_os_default_encoding (apr_pool_t *pool) { #ifdef __MVS__ # ifdef __CODESET__ return __CODESET__; # else return "IBM-1047"; # endif #endif if ('}' == 0xD0) { return "IBM-1047"; } if ('{' == 0xFB) { return "EDF04"; } if ('A' == 0xC1) { return "EBCDIC"; /* not useful */ } if ('A' == 0x41) { return "ISO-8859-1"; /* not necessarily true */ } return "unknown"; } Also, in log4cxx/src/charsetencoder.cpp: CharsetEncoderPtr CharsetEncoder::getEncoder(const std::string& charset) { if (StringHelper::equalsIgnoreCase(charset, "US-ASCII", "us-ascii") || StringHelper::equalsIgnoreCase(charset, "ISO646-US", "iso646-US") || StringHelper::equalsIgnoreCase(charset, "ANSI_X3.4-1968", "ansi_x3.4-1968")) { return new USASCIICharsetEncoder(); } else if (StringHelper::equalsIgnoreCase(charset, "ISO-8859-1", "iso-8859-1") || StringHelper::equalsIgnoreCase(charset, "ISO-LATIN-1", "iso-latin-1")) { return new ISOLatinCharsetEncoder(); } else if (StringHelper::equalsIgnoreCase(charset, "UTF-8", "utf-8")) { return new UTF8CharsetEncoder(); } else if (StringHelper::equalsIgnoreCase(charset, "UTF-16BE", "utf-16be") || StringHelper::equalsIgnoreCase(charset, "UTF-16", "utf-16")) { return new UTF16BECharsetEncoder(); } else if (StringHelper::equalsIgnoreCase(charset, "UTF-16LE", "utf-16le")) { return new UTF16LECharsetEncoder(); } #if defined(_WIN32) throw IllegalArgumentException(charset); #else return new APRCharsetEncoder(charset.c_str()); #endif } Are these files generated by configure scripts/ant build files? It doesn't seem like they are... -----Original Message----- From: dev-return-18563-mpowers=appsecinc.com@apr.apache.org [mailto:dev-return-18563-mpowers=appsecinc.com@apr.apache.org] On Behalf Of William A. Rowe, Jr. Sent: 2007-Jun-25 Mon 12:33 PM To: Marshall Powers Cc: dev@apr.apache.org; 'Log4CXX User' Subject: Re: Problem with iconv charsets... Marshall Powers wrote: > I'm trying to use APR-1.2.7 in Log4Cxx 0.10 on AIX 5.3. When I run my > program, I get an exception "APR_LOCALE_CHARSET" in the createDefaultEncoder > method. I think this problem is related to the iconv that is installed on > this machine. When I run iconv -l, among the various charsets I see > "ISO8859-1". However, in the source for Log4Cxx and APR, the only string > literals I see are for "ISO-8859-1" (note the extra dash). Is there any > simple way to work around this problem? Is this potentially a portability > issue with APR/log4cxx (that is, if I distribute some app that uses APR, and > my user doesn't have "ISO-8859-1" in their iconv, is my app going to crash?) Unfortunately, aliases are within the domain of iconv. The question is, where did it pull out "ISO-8859-1" from as the default locale on your box? If *that* is from apr-util, we need to unwind where it was resolved. If that was an envvar set on your login, well, that would be called shooting oneself in ones foot.