[cups.bugs] [HIGH] STR #3900: Can't print file whose name contains german umlaut with non-utf-8 encoding

Martin Jacobs martin.jacobs at nexgo.de
Mon Jul 25 12:41:18 PDT 2011


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

How to reproduce:

echo "A-Umlaut" > ä.txt
lpr ä.txt

result: lpr: Fehler ? kein Zugriff auf ?ä.txt? ? Datei oder Verzeichnis
nicht gefunden

Additional info: echo $LANG gives de_DE at euro
GLIBC 2.3.6, GCC 3.4.6, file system is reiserfs and uses iso-8859-1
encoded file names.

A check with strace gives as result, that lpr seems to implicitely convert
command line argument into UTF-8 representation:

access("\303\244.txt", R_OK)            = -1 ENOENT (No such file or
directory)

Seems to be by design, function _cupsSetLocale(), to be found in
langprintf.c, converts whole command line to UTF-8.


Same error is reported in linux.debian.bugs.dist as Bug#623269 with debian
release, kernel 2.6.38, GLIBC 2.11.2 ...

Workaround:

LANG=C lpr ä.txt

then file is printed as expeced

Link: http://www.cups.org/str.php?L3900
Version: 1.4.7





More information about the cups mailing list