[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [debian-printing] Packaging of vendor PPD files.



On Wed, 3 Mar 2004 19:07:04 Per Olofsson wrote:
> Are you aware of any PPD-using packages which support translated PPDs?

Worth a look at the the PPD spec, eg:
http://www.lprng.com/DISTRIB/RESOURCES/PPD/5003.PPD_Spec_v4.3.pdf

The spec defines "transation strings" and these are the parts that relate
to the "*LanguageEncoding:".

An application that uses PPD's should look for the "*LanguageEncoding:"
line and treat the transation strings as encoded in that system. The
encoding of the rest of the PPD is prioty much ASCII codes x for 32<x<127
.

Look in the spec for the exact wording.

I have got a python script that extracts the Transation Strings and
converts them into unicode (from MacStandard) and then converts them into
ISOLatin1.

This can easiy be changed to output another encoding (ie utf-8) and auto
detect the input encodeing as Python2.3 has fantastic encoding/reencoding
support.

The script could be extended to lookup the unicode strings in a transation
table and so transate the strings from one language to another.

You can find an early version of the script in hp-ppd debian source
package or later versions at:
http://www.cus.org.uk/~owen/debian/ppd/index.html



Reply to: