From stdcxx-dev-return-1966-apmail-incubator-stdcxx-dev-archive=incubator.apache.org@incubator.apache.org Thu Aug 17 15:10:07 2006 Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 68237 invoked from network); 17 Aug 2006 15:10:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Aug 2006 15:10:07 -0000 Received: (qmail 95257 invoked by uid 500); 17 Aug 2006 15:10:07 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 95200 invoked by uid 500); 17 Aug 2006 15:10:06 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 95185 invoked by uid 99); 17 Aug 2006 15:10:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Aug 2006 08:10:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Aug 2006 08:10:04 -0700 Received: from [10.70.3.48] ([10.70.3.48]) by moroha.quovadx.com (8.13.6/8.13.4) with ESMTP id k7HF9f09013436 for ; Thu, 17 Aug 2006 15:09:42 GMT Message-ID: <44E486B6.1090800@roguewave.com> Date: Thu, 17 Aug 2006 09:09:42 -0600 From: Andrew Black User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060720 SeaMonkey/1.0.3 MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: [PATCH] run_locale_utils.sh References: <44E47A03.8050002@kyiv.vdiweb.com> In-Reply-To: <44E47A03.8050002@kyiv.vdiweb.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Greetings Farid May I propose the patch below as an alternative solution? While the cost of running tr in addition to sed isn't too great in the grand scheme of things, this removes the additional overhead of the second function call. It might be worthwhile to also look at the regular expressions used in GNUmakefile.bin file, particularly the rules for $(LOCALE_LIST) and $(DEPENDDIR)/localedb.d. Each of these locations has logic that makes similar translations. A related issue I'm observing is that the en_US.ANSI_X3.4-1968 locale fails as follows. ./en_US.ANSI_X3.4-1968.sh -d RWSTD_SRC_ROOT=/build/ablack/stdcxx-test/etc/nls export RWSTD_SRC_ROOT RWSTD_LOCALE_ROOT=/tmp/locale.13281 export RWSTD_LOCALE_ROOT ./localedef -w -c -f /build/ablack/stdcxx-test/etc/nls/charmaps/ANSI_X3 -i /build/ablack/stdcxx-test/etc/nls/src/en_US.4-1968 /tmp/locale.13281/en_US.ANSI_X3.4-1968 2>/dev/tty Error 500: /build/ablack/stdcxx-test/etc/nls/charmaps/ANSI_X3 could not be opened for reading Index: run_locale_utils.sh =================================================================== --- run_locale_utils.sh (revision 432251) +++ run_locale_utils.sh (working copy) @@ -232,7 +232,7 @@ # get locale's name and encoding locale_src=`echo $3 | \ - sed -n "s:\([^\.]*\)\.\([^\.\@]*\)\(.*\):\1\3:p;s:\@$::g"`; + sed -n "s:\([^\.]*\)\.\([^\.\@]*\)\(.*\):\1\3:;s:\@$::;y:@:.:;p"`; locale_encoding=`echo $3 | \ sed -n "s:\([^\.]*\)\.\([^\.\@]*\)\(.*\):\2:p"`; Farid Zaripov wrote: > Attached is a patch for run_locale_utils.sh script. If locale name > is like lang_enc@sublang then locale src file name should be > lang.sublang instead of lang@sublang. > > ChangeLog: > * run_locale_utils.sh (test_locale): Corrected > generation of the locale src file name. > > ------------------------ > # ./sr_YU.ISO-8859-5@cyrillic.sh -d > RWSTD_SRC_ROOT=/usr/src/WorkingCopy/etc/nls > export RWSTD_SRC_ROOT > RWSTD_LOCALE_ROOT=/tmp/locale.8599 > export RWSTD_LOCALE_ROOT > ./localedef -w -c -f /usr/src/WorkingCopy/etc/nls/charmaps/ISO-8859-5 -i > /usr/src/WorkingCopy/etc/nls/src/sr_YU@cyrillic > /tmp/locale.8599/sr_YU.ISO-8859-5@cyrillic 2>/dev/tty > Error 500: /usr/src/WorkingCopy/etc/nls/src/sr_YU@cyrillic could not be > opened for reading > Error - localedef returned code: 4 > ------------------------ > > > Farid. >