[Bug 196286] New: utf-8 variants of libc.cat missing

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Dec 26 19:20:25 UTC 2014


            Bug ID: 196286
           Summary: utf-8 variants of libc.cat missing
           Product: Base System
           Version: 10.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: eserte12 at yahoo.de

There are UTF-8 variants of /usr/share/nls/*/libc.cat for European languages,
which is a little bit surprising when switching locale from ISO885-X to UTF-8:

$ cat locale.c 
#include <locale.h>
#include <stdio.h>
#include <string.h>

int main() {
    setlocale(LC_MESSAGES, "de_DE.ISO8859-1");
    printf("%s\n", strerror(6));
    setlocale(LC_MESSAGES, "de_DE.UTF-8");
    printf("%s\n", strerror(6));
    return 0;
$ cc -o locale locale.c
$ ./locale             
Gerät ist nicht konfiguriert
Device not configured

Actually, providing the missing message catalogs is quite easy and may be
automated using a script like the following:

    perl -w -e 'for (glob("*ISO8859-*msg")) { ($from) = $_ =~ m{(ISO8859-\d+)};
($tofile = $_) =~ s{ISO8859-\d+}{UTF-8}; system "piconv -f $from -t UTF-8 $_ >
$tofile"; $? == 0 or die } '


You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list