Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Dec 2014 19:20:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 196286] New: utf-8 variants of libc.cat missing
Message-ID:  <bug-196286-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D196286

            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@FreeBSD.org
          Reporter: eserte12@yahoo.de

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

$ cat locale.c=20
#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=20=20=20=20=20=20=20=20=20=20=20=20=20
Ger=C3=A4t 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) =3D $_ =3D~ m{(ISO885=
9-\d+)};
($tofile =3D $_) =3D~ s{ISO8859-\d+}{UTF-8}; system "piconv -f $from -t UTF=
-8 $_ >
$tofile"; $? =3D=3D 0 or die } '

Regards,
    Slaven

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-196286-8>