Unicode character in PJL job title

Michael Sweet mike at easysw.com
Tue Sep 5 06:17:21 PDT 2006


Helge Blischke wrote:
> Michael Sweet wrote:
>> Stefan Rijnhart wrote:
>>
>>> Hi all,
>>>
>>> Using a Kyocera KM-2030 in PCL mode with a vendor supplied PPD with
>>> cups 1.2.2. Also occurs when using a Brother 5170DN.
>>>
>>> When printing a webpage with a Unicode character in its title from
>>> Mozilla Firefox, the character ends up in the PJL job title. Upon
>>> encountering this character, the printer starts printing one line or
>>> so of the PJL header before aborting.
>>>
>>> The unicode character seem to violate the PJL specs, which I think
>>> allows ASCII values {9,32-255} only. My question is, is this a Cups
>>> problem or a Firefox problem?
>>
>>
>> First, ASCII is only 0-127.
>>
>> Second, PJL as implemented by HP printers allows for UTF-8.  It may
>> be that we need to filter out UTF-8 characters from the PJL JOB
>> command we send for non-HP printers...
>>
>> Please file a bug report at:
>>
>>     http://www.cups.org/str.php
>>
>> so that we can track the issue.
>>
>> Thanks!
>>
> 
> Other printers require something like "§PJL SET STRINGCODESET = UTF8"
> (which is, btw, not documented in HP's PJL reference).

Right, we might just need to add a CUPS attribute to PPD files for
this:

     *cupsPJLCharsetUTF8: "@PJL SET STRINGCODESET = UTF8<0A>"

If the attribute is not present, then we just replace all non-ASCII
characters in the job name with "?".

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups-devel mailing list