[GRASS-dev] [bug #5195] (grass) ps.map sets encoding to iso-8859-1

Glynn Clements glynn at gclements.plus.com
Mon Oct 9 23:45:50 EDT 2006

Request Tracker wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=5195
> -------------------------------------------------------------------------
> Subject: ps.map sets encoding to iso-8859-1
> Platform: GNU/Linux/x86
> grass obtained from: CVS
> grass binary for platform: Compiled from Sources
> GRASS Version: cvs_head_20060921
> On line 92 of ps/ps.map/prolog.ps the encoding is set to ISOLatin1Encoding.
> If I understand correctly (and some testing confirms this) this
> means that the instructions file for ps.map has to be encoded in
> iso-8859-1 (or similar) to work, i.e. to be able to print accented
> characters. If you are in a UTF-8 environment, ps.map creates a ps
> file which doesn't show correct accented characters be it in iso or
> in utf.
> Is there any reason why ps.map hardcodes the encoding ? Is it
> possible to automatically use the users encoding ?

The reason why we force the font's encoding to ISOLatin1Encoding is
that the default encoding for most Latin fonts is StandardEncoding,
which (contrary to its name) is a completely non-standard encoding
which (AFAICT) is not used by anything except PostScript.

The value of the Encoding property is an array of 256 glyph names, so
you can use any unibyte encoding (e.g. ISO-646-*, ISO-8859-*,
windows-12?? etc).

If you want to support more complex encodings, you need to use
CID-keyed fonts. Apart from being rather complex, CID-keyed fonts may
not be supported by PostScript printers sold outside of South-East

In short, allowing the encoding to be changed to other unibyte
encodings is simple enough. Anything else will require a willing
volunteer (i.e. not me), and will need to be implemented in such a way
that users don't end up accidentally producing documents which show up
fine in (recent versions of) Ghostscript but which will be rejected by
every PostScript printer on this half of the planet.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list