Prev · NextSTR #4252: charset cannot be specified by document-format in Send-Document

Status:4 - Pending
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:3 - Applies to all machines and operating systems
Subsystem:Multiple
Summary:charset cannot be specified by document-format in Send-Document
Version: -feature
Created By:twaugh.redhat
Assigned To:mike
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails


Trouble Report Files:

No files


Trouble Report Dialog:

Name/Time/Date/Text
twaugh.redhat: 09:34 Jan 03, 2013
 
Printing e.g. an ISO-8859-1 encoded text file like this no longer works:

lp -o "document-format=text/plain;charset=iso-8859-1" ...

The job's document-format attribute ends up as 'text/plain', and the CHARSET environment variable is set to UTF-8.

Originally reported here:
  https://bugzilla.redhat.com/show_bug.cgi?id=890242

 
mike: 11:23 Jan 03, 2013
 
FWIW, this usage has never worked or been supported in the standard CUPS software. We have always tied the charset value to the locale, and even then we gave up trying to support anything but UTF-8 and ASCII back in CUPS 1.2.

Will talk about this a bit internally to see if we want to try to do anything with this bug, but long term there is no future in using obsolete charsets...

 
h.blischke: 11:44 Jan 03, 2013
 
Provided you (or the OP) uses the texttops filter supplied by CUPS, you could use my wrapper script written in Perl, which uses the Perl modules Encode and Encode::Guess to translate whatever input to UTF-8 and print that. In case the guess fails, the job attribute
encoding=xxxx
can be used to explicitely specify the input encoding.

It is necessary to rename the original texttops filter to "orig.texttops".

This wrapper has not been tested with the OpenPrinting texttopdf filter.

Drop me an e-mail to h dot blischke at acm dot org if you are interested (perhaps even to include the wrapper into some RH rpm).

Helge

 
mike: 11:58 Jan 11, 2013
 
Moving this to a feature request for a future CUPS release, basically to pass through any parameters at the end of the specified document-format. It will still be up to the filter to interpret the parameters.