Some customers using the PaperCut LPD service on Windows have reported jobs failing to process when they contain non-ASCII characters in either the jobname or the associated username. This can be caused by a limitation in the legacy Windows LPR client communicating with the LPD service using an arbitrary, Windows-specific encoding instead of UTF-8. (UTF-8 is a de facto international standard for encoding text in arbitrary languages, but software predating UTF-8 is still in common use.) Most customers who experience this problem should be able to fix it by editing the pc-lpd.config file to ensure it uses the following setting:
This should work as long as all clients of the PaperCut LPD service are set up to use the same locale as the one configured for the server running the PaperCut LPD service. Otherwise, you might need to either:
- explicitly set the preferred encoding in the pc-lpd.config file, from among the values listed in the comments in the file, and/or
- set up multiple queues with specially formatted names, where the name of the queue itself will be used by the PaperCut LPD service to determine the expected encoding.
The need for this change arises because there is no way for PaperCut to reliably determine the encoding when a client sends a control file in an arbitrary encoding. If all clients and the server use the same encoding, which we can read from the operating system (the meaning of “OSDefault”), the ambiguity is resolved. However, if a site hosts clients that use different encodings, PaperCut can resolve the ambiguity only if those clients explicitly select a queue that always expects client inputs to be encoded in a single specific encoding.
The format for a queue name that explicitly specifies the encoding it expects is:
- <queuename> can be any legal Windows print queue name (provided it is in ASCII!)
- -encoding- is this literal string
- <encodingname> is one of the following encoding names:
- shift_jis (alias for shift-jis)
- thai (alias for windows-874)
- central-europe (alias for windows-1250)
- latin-2 (alias for windows-1250)
- cyrillic (alias for windows-1251)
- latin-1 (alias for windows-1252)
- greek (alias for windows-1253)
- turkish (alias for windows-1254)
- latin-5 (alias for windows-1254)
- hebrew (alias for windows-1255)
- arabic (alias for windows-1256)
- baltic (alias for windows-1257)
- vietnam (alias for windows-1258)
- vietnamese (alias for windows-1258)
The implementation logic used now (as of release 16.2GR) works as follows:
- PaperCut reads the encoding specified in pc-lpd.config.
- If encoding is not specified in the queue name according to the format above, the encoding from pc-lpd.config is used.
- If either encoding has not been specified (in either the queue name or in the config file), or the name specified is not known to PaperCut, then “utf-8” is used.