incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Black <abl...@roguewave.com>
Subject Re: [PATCH] run_locale_utils.sh
Date Thu, 17 Aug 2006 15:09:42 GMT
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.
> 

Mime
View raw message