[cups.bugs] [CRIT] STR #1751: logic error during lpstat -a processing

inger.altlinux inger at altlinux.org
Tue Jun 6 05:18:29 PDT 2006


[STR New]

1. cups lpstat utility uses  _cupsLangPrintf() function to output results
2.  _cupsLangPrintf accepts utf8 strings only
3. utility also uses strftime() function to perform current system time
4. strftime() function with "%c" format will create string with my local,
_ not utf8_ characters (koi8-r encoding)

As a result _cupsLangPrintf will fail and I see nothing on the screen.

How to reproduce it:
$ locale 
LANG=ru_RU.KOI8-R
LC_CTYPE="ru_RU.KOI8-R"
LC_NUMERIC="ru_RU.KOI8-R"
LC_TIME="ru_RU.KOI8-R"
LC_COLLATE="ru_RU.KOI8-R"
LC_MONETARY="ru_RU.KOI8-R"
LC_MESSAGES="ru_RU.KOI8-R"
LC_PAPER="ru_RU.KOI8-R"
LC_NAME="ru_RU.KOI8-R"
LC_ADDRESS="ru_RU.KOI8-R"
LC_TELEPHONE="ru_RU.KOI8-R"
LC_MEASUREMENT="ru_RU.KOI8-R"
LC_IDENTIFICATION="ru_RU.KOI8-R"
LC_ALL=
$ lpstat -a
$

However:

$ LC_ALL=C lpstat -a
loc accepting requests since Mon Jun  5 15:35:26 2006
samsung accepting requests since Mon Jun  5 15:44:58 2006
$ LC_ALL=ru_RU.utf8 lpstat -a|iconv -futf8
loc accepting requests since Пнд 05 Июн 2006 15:35:26
samsung accepting requests since Пнд 05 Июн 2006 15:44:58
$

Link: http://www.cups.org/str.php?L1751
Version: 1.2.1





More information about the cups-devel mailing list