-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date/time display error for non-UTF-8 locales with lpstat #1751
Comments
CUPS.org User: mike Changing priority to match severity and summary to match actual problem... Looks like we are going to have to hack lpstat to force a UTF-8 locale for LC_TIME. Does the following produce the correct results on your system?
|
CUPS.org User: inger.altlinux Yes, all works well (without any additional iconv in command line) $ LC_TIME=ru_RU.utf8 lpstat -a |
CUPS.org User: mike OK, I believe I have a fix for this now; please test the attached patch or current SVN trunk... |
CUPS.org User: inger.altlinux works well on my system, thank you. |
"str1751.patch": Index: lpstat.c--- lpstat.c (revision 5633) int
/*
+#ifdef LC_TIME
http = NULL; |
Version: 1.2.1
CUPS.org User: inger.altlinux
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
$
The text was updated successfully, but these errors were encountered: