You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Date/time display error for non-UTF-8 locales with lpstat #1751
Activity
michaelrsweet commentedon Jun 6, 2006
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?
michaelrsweet commentedon Jun 6, 2006
CUPS.org User: inger.altlinux
Yes, all works well (without any additional iconv in command line)
$ LC_TIME=ru_RU.utf8 lpstat -a
loc accepting requests since �нд 05 ��н 2006 15:35:26
samsung accepting requests since �нд 05 ��н 2006 15:44:58
michaelrsweet commentedon Jun 6, 2006
CUPS.org User: mike
OK, I believe I have a fix for this now; please test the attached patch or current SVN trunk...
michaelrsweet commentedon Jun 7, 2006
CUPS.org User: inger.altlinux
works well on my system, thank you.
michaelrsweet commentedon Jun 7, 2006
"str1751.patch":
Index: lpstat.c
--- lpstat.c (revision 5633)
+++ lpstat.c (working copy)
@@ -71,26 +71,59 @@
*/
int
-main(int argc, /* I - Number of command-line arguments */
/*
Set the locale so that times, etc. are displayed properly.
* Unfortunately, while we need the localized time value, we don't
* want to use the localized charset for the time value, so we need
* to set LC_TIME to the locale name with .UTF-8 on the end (if
*/
setlocale(LC_ALL, "");
+#ifdef LC_TIME
+#endif /* LC_TIME */
http = NULL;
num_dests = 0;
dests = NULL;