[cups-devel] [UNKN] STR #4388: no or malformed output from lpstat in other locale than utf8

ml at goppold.net ml at goppold.net
Mon Mar 10 13:49:28 PDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

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

[STR New]

Hi,

_cupsSetLocale set iso-8859-15 (cups lang code 14) and strftime formats the
output in this encoding but _cupsLangPrintf call cupsUTF8ToCharset and
assumes UTF8 input for iconv and this failed as follows:


prod:~ # lpadmin -p test0102 -v file:///tmp/test0102 -E
prod:~ # cupsdisable test0102
prod:~ # lp -d test0102 /etc/hosts
request id is test0102-1046762 (1 file(s))
prod:~ # lpstat -o test0102
test0102-1046762        root              2048   Mon Mar 10 07:50:30 2014
prod:~ # LC_ALL=de_DE at euro lpstat -o test0102
<<NO OUTPUT!>>


With the attached patch i get the expected result:


test:~ # lpadmin -p test0102 -v file:///tmp/test0102 -E
test:~ # cupsdisable test0102
test:~ # lp -d test0102 /etc/hosts
request id is test0102-61294 (1 file(s))
test:~ # lpstat -o test0102
test0102-61294          root              2048   Mon Mar 10 07:49:48 2014
test:~ # LC_ALL=de_DE at euro lpstat -o test0102
test0102-61294          root              2048   Mo 10 Mär 2014 07:49:48
CET


The patch call the new _cupsstrftime  whereever it is necessary due to the
format but can also be called in all other cases.

Link: https://www.cups.org/str.php?L4388
Version: 1.5.4
Attachment: https://www.cups.org/strfiles.php/3295/cups-1.5.4-strftime.patch
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJTHiVYAAoJENujp6sI12Ij268P/AkhFvfR3M6rQksRx3AEhtNA
sicMVbHKo5I4LSmrN1Jx60qPk1qgw8viOCKEmr/CVlAkEDp8ttjlubLga7HfPxcN
I+EJKfuZXjYgvx9rzCqHfjXs1iJFYzFjrSJaYz8V0CQQn0XhjQC8edTLtrlwDDPa
SdvoljDskTvjXiaCp9OIPZQHfblMg+PSHeFzERUwoobdrpDnVdOFUO87Gzao4CjE
imeLhr3mTvKYLK8g1YQaoVSTSrpghYQI8LNU5FHn5SL5Bus8VkzH5wl121N0RKn8
wS7FPZLSPnq5Y4Ub9U2YTXB3rAIUl4TZsCajLNDLoIDxQElpQG/xgkda/E6i2zVE
nn691myseTJwgk6CeKRtvjdi9pZKdzKfbYIti0vzhme0u9MPzuGz4EFxRS9TSZH9
v6x2//vBnxURhTex/1OKu2EOPhD4QOd9+Umzzc8hiWKp3oIf7IpwaWRF+8+vtZZV
Jtis/MrWh4lGIExH5D5a2MqwY7hrmg5ijSThTrMSIcWgtmyFaMHbwJs3xzmAWNG6
0ZDpQgxviIysacQ3iWZ4JpCUN96iqfH+a/3mZS0TzikvPLuaNRjn+Q9EQBMwuvK0
YrSyIzgTfwnDv7fLZwmk9LRPCRKUXiB2tc24isQtU+1/MS5qIwlq3rsBEwwdE+bB
grae8BbQQc85g94zpnSM
=fpTC
-----END PGP SIGNATURE-----




More information about the cups-devel mailing list