Comment 18 for bug 18434

Revision history for this message
Mikel Ward (mikelward) wrote :

I had "LANGUAGE=en_AU:en" in /etc/environment, but it seems "en_AU" implies "en"
as a fallback.

% LANGUAGE=en_AU scrollkeeper-get-content-list en_AU
I/O warning : failed to load external entity
"/var/lib/scrollkeeper/en_AU/scrollkeeper_cl.xml"
I/O warning : failed to load external entity
"/var/lib/scrollkeeper/en/scrollkeeper_cl.xml"
/tmp/scrollkeeper-michael/contents.0

I'm going to set "LANGUAGE=en_AU" as a workaround and see what else breaks. :-)

It's also interesting that scrollkeeper-get-content-list always seems to fail if
LANGUAGE contains two elements, but not if it contains one or three:

% LANGUAGE=en_AU:en scrollkeeper-get-content-list en_AU
*** glibc detected *** free(): invalid next size (fast): 0x0804b868 ***
/usr/bin/scrollkeeper-get-content-list: line 16: 30416 Aborted
scrollkeeper-get-cl $1 scrollkeeper_cl.xml

% LANGUAGE=en_AU:en_US:en scrollkeeper-get-content-list en_AU
I/O warning : failed to load external entity
"/var/lib/scrollkeeper/en_AU/scrollkeeper_cl.xml"
I/O warning : failed to load external entity
"/var/lib/scrollkeeper/en/scrollkeeper_cl.xml"
I/O warning : failed to load external entity
"/var/lib/scrollkeeper/en_US/scrollkeeper_cl.xml"
I/O warning : failed to load external entity
"/var/lib/scrollkeeper/en/scrollkeeper_cl.xml"
I/O warning : failed to load external entity
"/var/lib/scrollkeeper/en/scrollkeeper_cl.xml"
/tmp/scrollkeeper-michael/contents.0

This works for any combination of languages I've tried, including
LANGUAGE=en_US:en_AU:en, LANGUAGE=en_US:en_AU:C, or other weird values such as
LANGUAGE=en:en:en.

Looks like a simple iteration bug.

It would also be nice if LANGUAGE were documented somewhere such as locale(1)
and/or locale(5).