[cups.general] cups-1.4.3 && printing ISO-8859-1 text files

Johannes Meixner jsmeix at suse.de
Fri Oct 15 02:11:32 PDT 2010


Hello,

On Oct 15 00:45 Matthias Apitz wrote (shortened):
> Using the above cups version 1.4.3 compiled from source
> I don't see how to print ISO-8859-1 text files directly

Since CUPS 1.3.4 only UTF-8 (which includes 7-bit ASCII)
is supported.

Consequences:

The cupsd accepts only UTF-8 encoded data.
Therefore applications communicating with the cupsd
such as printer setup tools or printer dialog tools
do no longer work if neither a plain 7-bit ASCII
nor a UTF-8 locale is used for the user who runs
such applications.

Printing Legacy Encoded Text Files:
The printing system no longer converts legacy encoded
text files such as ISO-8859-1, windows-1252,
and Asian encodings on its own.
Only UTF-8 and thus ASCII is supported.
To print a legacy encoded text file, you must convert it
from its encoding (only you can know it) to the universal
UTF-8 encoding before sending it to the CUPS server.
To print an ISO-8859-1 text file, you may use:
   iconv -f iso-8859-1 -t utf-8 filename.txt | lp -d printer
Printing of PDF or PS or graphics files (JPEG, PNG, etc.)
works as  before.


To automate printing legacy encoded text files
you may have a look at
http://en.opensuse.org/SDB:Using_Your_Own_Filters_to_Print_with_CUPS
to get some ideas and background information
how you might do to implement it on your own.
The crucial obstacle in general is that it is not possible
to determine in a reliably way which legacy encoding
a sequence of bytes in a text file actually is
(perhaps in your particular case it is different
but only you can know your particular case).
This obstacle is a good reason not to try to implement
automated printing of legacy encoded text files
(except you like to get toast in the encoding hell :-)
which is also the reason why CUPS did "the right thing"
and does no longer try to support the encoding hell.


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
AG Nuernberg, HRB 16746, GF: Markus Rex





More information about the cups mailing list