Subject: lib/2334: NLS catalogs are byte-order-dependant
To: None <gnats-bugs@NetBSD.ORG>
From: None <>
List: netbsd-bugs
Date: 04/16/1996 05:32:28
>Number:         2334
>Category:       lib
>Synopsis:       NLS catalogs are byte-order-dependant
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 16 05:50:03 1996
>Originator:     Nathan J Williams
>Release:        1.1
System: NetBSD sweet-potato-water-buffalo 1.1 NetBSD 1.1 (PIKACLIENT) #1: Tue Feb 6 21:37:31 EST 1996 nathanw@sweet-potato-water-buffalo:/afs/ i386

	The NLS catalog code depends on the byte order in the catalog
files. These files are stored in /usr/share/nls, with /usr/share
supposedly indicating that they are architecture-independant. Trying to
share the files between machines of different byte order (such as i386
and sun3) causes one of them to not be able to read the catalog files
and produce locale-specific error messages through the nls system.

	The bug, as such, is that architecture-dependant files
shouldn't be in /usr/share. 

	Mount /usr/share on a NetBSD/sun3 system from a NetBSD/i386 system.
Set NLSPATH to something unusual, /usr/share/nls/Pig/,
and try something that produces an error, 'cat /no-such-file'. The
output will include an NLS error and a non-Pig Latin locale error:

cat: /no-such-file: Message Catalog System: /usr/share/nls/Pig/
is version 16777216, we need 1.
No such file or directory.

instead of the expected:
cat: /no-such-file: Onay uchsay ilefay orway irectoryday

	Make the nls code byte-order-independant.  The file 
src/lib/libc/nls/msgcat.h has byte-order flags, as if someone started to
do this and never really got around to it.