OpenSolaris

Printable Version Enter a New Search
Bug ID 6757211
Synopsis UTF-8 localedef extensions file /usr/lib/localedef/extensions/UTF-8.x missing in SUNWlang-common pkg
State 11-Closed:Verified (Closed)
Category:Subcategory utility:l10n-common
Keywords approved-jl149544
Responsible Engineer Jan Trejbal
Reported Against
Duplicate Of
Introduced In
Commit to Fix snv_102
Fixed In snv_102
Release Fixed solaris_nevada(snv_102)
Related Bugs
Submit Date 8-October-2008
Last Update Date 8-December-2008
Description
The UTF-8 localedef extensions file is missing in Nevada and OpenSolaris.
Formerly, the /usr/lib/localedef/extensions/UTF-8.x file was part of SUNWeuluf package, and should have been moved to SUNWlang-common pkg. But it seems to disappear from the system.
In S10 URses the UTF-8.x exists and is part f SUNWeuluf pkg.

The UTF-8.x file is needed by locale creator tool when compiling locales. Currently locale creator cannot be used to create a new locale package. Here is a test case:
# localectr -l km_KH -d /tmp/jan -c /ws/onnv-tools/SUNWspro/SS11/bin
Creating locale data source file for km_KH.UTF-8@localectr ...
Building locale data package /tmp/jan/LCTRkm-KH-UTF-8-localectr ...
Error : localedef utility failed to build 32 bit locale data binary

If you edit a /usr/lib/localectr/build_locales.pl script (used by localectr to build locale shared libs) to see the output of localedef execution, you get following error:
"Could not open '/usr/lib/localedef/extensions/UTF-8.x' for read."

That happens because localedef cannot find the UTF-8.x extension file.
You can find localedef executions at lines 245 and 256 in build_locales.pl script. Following diff shows how to get the error output of localedef executions:

--- build_locales.pl.orig       2008-10-08 11:56:13.848287000 +0200
+++ build_locales.pl    2008-10-08 13:27:13.389219000 +0200
@@ -245,7 +245,7 @@
        mkpath("$dir_64");  # also creates $dir_32

        # generate locale data binaries - localedef returns 0 or 1 if binary built and >1 if it fails
-       local($ret) = system ("/usr/bin/localedef -c -f $charmap_file -x $ext_file -i $localedef_file $dir_32/$locale.$charset$tag") /256; # /256 to get actual return value of utiltiy
+       local($ret) = system ("/usr/bin/localedef -c -f $charmap_file -x $ext_file -i $localedef_file $dir_32/$locale.$charset$tag 1> /tmp/localedef.32.log 2>&1") /256; # /256 to get actual return value of utiltiy
        if ($ret lt "0")
        {  #didn't find localedef utility
                exit 5;
@@ -254,7 +254,7 @@
        {
                exit 7;
        }
-       $ret = system ("/usr/bin/localedef -c -m lp64 -f $charmap_file -x $ext_file -i $localedef_file $dir_64/$locale.$charset$tag") /256 ;
+       $ret = system ("/usr/bin/localedef -c -m lp64 -f $charmap_file -x $ext_file -i $localedef_file $dir_64/$locale.$charset$tag 1> /tmp/localedef.64.log 2>&1") /256 ;
        if ($ret lt "0")
        {
                exit 5;
File is present on snv_105:

bash-3.2$ ls /usr/lib/localedef/extensions/UTF-8.x 
/usr/lib/localedef/extensions/UTF-8.x
Work Around
N/A
Comments
N/A