[GRASS-dev] Re: [GRASS GIS] #1349: Ps.map supports only english
GRASS GIS
trac at osgeo.org
Wed Apr 20 10:56:23 EDT 2011
#1349: Ps.map supports only english
-------------------------+--------------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: minor | Milestone: 6.5.0
Component: Ps.map | Version: unspecified
Keywords: encoding | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by glynn):
Replying to [comment:2 mlennert]:
> The problem is that
>
{{{
iconv -f UTF-8 -t ISO_8859-1 utf_file > iso_file
}}}
>
> will not work if the utf_file contains special caracters which are
defined in ISO-8859-2.
>
> I don't know how/if Postscript handles UTF-8. a2ps and enscript can
create Postscript files from text encoded in ISO-8859-2, but they cannot
transform UTF-8 text into Postscript files.
The '''real''' problem is that !PostScript's handling of encodings is an
unmitigated fiasco.
!PostScript itself defines precisely 2 encodings: !StandardEncoding is a
decidedly non-standard encoding used by !PostScript alone, while
!ISOLatin1Encoding is ISO-8859-1.
The !PostScript Language Reference Manual also describes some additional
encodings which aren't actually part of the language: CE (Central
European) is Windows codepage 1250, Symbol was designed mainly for the
Zapf Dingbats symbol font (similar to Wingdings on Windows), while Expert
and !ExpertSubset are basically ASCII plus an entirely arbitrary set of
symbols. These additional encodings aren't part of the language or the
implementation; they're just recommendations for font creators.
!StandardEncoding and !ISOLatin1Encoding are predefined names in
systemdict, whose values are encoding vectors (arrays of names, usable as
the Encoding property in a font dictionary). If you want to use any other
encoding, you first have to define the encoding vector yourself (which
requires knowing the !PostScript names for the various glyphs).
You also have to know the name of a font which has those glyphs and which
you can reasonably expect to be provided by the implementation (i.e. the
printer or the user's Ghostscript installation). The language only
requires the existence of Times, Helvetica, and Courier (and bold and
italic or oblique versions thereof) plus Symbol, and only requires those
fonts to provide the glyphs required for !StandardEncoding and
ISOLatin1Encoding (or, for the Symbol font, the Symbol encoding).
Version 3 of the reference manual also documents CID-keyed fonts, which
are required for languages with many glyphs (i.e. Chinese, Japanese,
Korean). However, it only documents the overall mechanism, not any
particular encodings. It's also rather incomplete, directing the reader to
Adobe technical notes on several occasions. Anyone who actually
understands this stuff probably works for either Adobe or a Japanese
printer manufacturer.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1349#comment:3>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list