CUPS and iso-8859-1

Helge Blischke h.blischke at srz.de
Fri Jan 4 05:41:47 PST 2008


Thomas Küstermann wrote:
>>Youz need to force every client to use utf-8 as the
>>character set specified in the IPP request.
> 
> 
> As I thought...
> I want to add some information: The CUPS server is self compiled from source. The client I am using is the java client from the CUPS source package (under directory <cups>/scripting/java/). It uses 'iso-8859-1' in every request to the specified server. It is possible to change it to 'utf-8' to get it working but that what I want to prevent.
> If I try this client in collaboration with a CUPS server from different binaries (earlier releases) from different distributions (e.g Ubuntu) it works fine.
> There are a bunch of charset files (as you've already mentioned) under '/usr/share/cups/charset'. These files are missing in actual releases of CUPS (only 'utf-8' is provided). To copy the 'missing' charset files to the self compiled CUPS server does not solve the problem.
> 
> Is there a way to teach CUPS 'iso-8859-1' or should the java sources be patched?
> 
> Thanks for every solution,
> Thomas
> 

It seems to be hard coded in the sources.
You'll probably have a source file
scripts/java/src/org/cups/Cups.java .
You'll see there several code instances to create an
IPP request, wich contains something like
---snip---
      a = new IPPAttribute( IPPDefs.TAG_OPERATION, IPPDefs.TAG_CHARSET,
                             "attributes-charset" );
       a.addString( "", "iso-8859-1" );
---snip---
(my 1.1.x sources are 1.1.19). Change the "iso-8859-1" to "utf-8",
compile again and reinstall your java stuff.

Good luck!

Helge



-- 
Helge Blischke
Softwareentwicklung

H.Blischke at acm.org

Pflichtangaben seit 1.1.2007: Satz-Rechen-Zentrum Hartmann+Heenemann GmbH&Co. KG Sitz Berlin AG 
Charlottenburg HRA 8089 Komplementärin Satz-Rechner-Betriebsgesellschaft mbH Sitz Berlin AG 
Charlottenburg HRB 4905 Geschäftsführer Walter Fock




More information about the cups mailing list