[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#121900: xlibs: glibc locales not listed in X's locale.alias



Package: xlibs
Version: 4.2.1-12.1
Severity: normal

It looks as if many of the locales in the original list submitted for
this bug are not supported by the X libraries.  There are also some
though where it is just a case of the necessary alias not appearing in
the X locale.alias file.  As far as I can see these are:

# Previously missing aliases generated for Debian by locale_fix
da_DK.ISO-8859-15       da_DK.ISO8859-15
en_GB.ISO-8859-15       en_GB.ISO8859-15
sv_SE.ISO-8859-15       sv_SE.ISO8859-15

Do we need to wait for upstream to fix these or can we add them to the
debian version of the locale.alias file as a temporary patch?

For reference, the above list was generated by the this perl script:

#! /usr/bin/perl

my $c_suppt = '/usr/share/i18n/SUPPORTED';
my $x_suppt = '/usr/X11R6/lib/X11/locale/locale.dir';
my $x_alias = '/usr/X11R6/lib/X11/locale/locale.alias';

# Read C library supported locales.

open(C_SUPPT, '<', $c_suppt)
    or die "unable to open libc supported locales '$c_suppt' - $!";
my %c_suppt;
while (<C_SUPPT>)
{
    chomp;
    next if m/^\s+$/;
    my ($key, $charset) = split;
    $c_suppt{$key} = $charset;
}
close(C_SUPPT);

# Read X Lib supported locales.

open(X_SUPPT, '<', $x_suppt)
    or die "unable to open Xlib supported locates '$x_suppt' - $!";
my %x_suppt;
while (<X_SUPPT>)
{
    chomp;
    next if m/^\s*#/;
    next if m/^\s+$/;
    my ($dir, $key) = split;
    $x_suppt{$key} = $dir;
}
close(X_SUPPT);

# Read the X LIb Alias file.

open(X_ALIAS, '<', $x_alias)
    or die "unable to open Xlib locale aliases '$x_alias' - $!";
my %x_alias;
while (<X_ALIAS>)
{
    next if m/^\s*#/;
    next if m/^\s+$/;
    my ($alias,$locale) = split;
    $x_alias{$alias} = $locale;
}
close(X_ALIAS);

# Find which C locates are not mapped to X locales.

my %aliases;
foreach my $locale (sort keys %c_suppt)
{
    unless (exists $x_suppt{$locale} || exists $x_alias{$locale})
    {
	# There is no mapping for this locale name.

	my $alias = $locale;
	if ($locale =~ /^(.*)\@euro$/)
	{
	    # The C library supported file should tell which character
	    # set this locate uses.

	    $alias = $1.'.'.$c_suppt{$locale};
	}
	$alias =~ s/ISO[-_]/ISO/;
	if (exists $x_suppt{$alias})
	{
	    $aliases{$locale} = $alias;
	}
	else
	{
	    print STDERR "unmappable: $alias\n";
	}
    }
}
if (%aliases)
{
    print "# Previously missing aliases generated for Debian by locale_fix\n";
    foreach my $alias (sort keys %aliases)
    {
	print "$alias\t$aliases{$alias}\n";
    }
}

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux tuborg 2.6.0-test9 #1 Tue Oct 28 13:54:50 GMT 2003 i686
Locale: LANG=en_GB.ISO-8859-15, LC_CTYPE=en_GB.ISO-8859-15

Versions of packages xlibs depends on:
ii  libc6                       2.3.2.ds1-10 GNU C Library: Shared libraries an
ii  libfreetype6                2.1.5-3      FreeType 2 font engine, shared lib
ii  xfree86-common              4.2.1-12.1   X Window System (XFree86) infrastr

-- no debconf information




Reply to: