I did a little digging in C++ code and found that the error message
("Wrong language code") is produced in libapt; the problem affects not
only synaptic but also its command-line twin "apt-get". The message is
produced  in "apt-pkg/indexfile.cc" in line 99, in the
"pkgIndexFile::CheckLanguageCode()" method. This method's comment does
not give a pattern for language codes but a list of "common cases":
"de_DE, de...@euro, de_DE.UTF-8, de_de.ut...@euro, de_DE.ISO8859-1,
tig_ER", adding "more in /etc/gdm/locale.conf" (which I cannot find on
my system).

The problem, however, is not in "CheckLanguageCode()" but in the
"LanguageCode()" method, which parses the language code from the LANG
value (only the result is then checked in "CheckLanguageCode()"). Unless
the language is one of "en", "pt", "sv", or "zh" it uses the underscore
to extract the language code. With no underscore found it uses the whole
value of LANG, including the encoding. The obvious fix would be to look
for a period when no underscore is found. I will try if I can get this
to work; should not be too hard.

-- 
wrong language code: eo.utf8
https://bugs.launchpad.net/bugs/560956
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to