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.
Since 1.2 cups works internally with a UTF-8 encoding. Commands like lp and lpr should honor the current locale to decide which encoding is used for the input files.
The code for this decision resides in cups/language.c in the function cupsLangGet which, among other parameters, attempts to find out the current encoding. Configurations that rely on the usage of nl_langinfo(CODESET) fail unfortunately. Take a look at following if-statement at line 453 ff.:
ifdef CODESET
/*
On systems that support the nl_langinfo(CODESET) call, use
this value as the character set...
*/
if (!charset[0] && (csptr = nl_langinfo(CODESET)) != NULL)
{
/*
Copy all of the letters and numbers in the CODESET string...
*/
The problem is that at this point charset[0] will never be 0
as charset was already set to "UTF8" as default in line 415.
This bug can be solved by postponing the fall-back to "UTF8"
after having checked nl_langinfo(CODESET). Attached you'll find
a working patch which was tested for the latest stable release 1.2.3.
It should also work for the most current release.
Activity
michaelrsweet commentedon Sep 21, 2006
CUPS.org User: mike
Fixed in Subversion repository.