Re: postscript terminal - how to typeset a unicode character (correct syntax)?



Christian wrote:

Hello,

I am using the latest Gnuplot precompiled binary (4.3.0 - dated July
2009) for Windows. The help system says that one can request Unicode
characters by setting "set encoding utf8". I want to typeset greek
characters, e.g. an uppercase "Delta". (Please do not redirect me to the
Symbol font now ... this is not what I want.) After reading the help
section on 'postcript adobeglyphnames' I tried both - requesting the
Delta via "/Delta" or "/uni0394", including some combinations of slashes
and backslashes. No success - please see my sample input:

###
set encoding utf8
set term postscript eps enhanced "Helvetica,14" adobeglyphnames

PostScript itself does not normally support unicode characters or
UTF8 encoding. You need to construct a special font file, as described
briefly in the file .../term/PostScript/unicode_maps.README, and then
pass it to the postscript terminal by adding to the 'set term postscript'
command, e.g.:

set term postscript ... fontfile 'arialuni.ps' font 'ArialUnicodeMS'

IMHO, it is not worth the effort to make up for the lack of UTF support
in the PostScript language. It is far easier to use a more modern
alternative like PDF that does support it.


BTW: Entering the character 'Delta' directly into an utf-encoded gnuplot
input file does not work either since gnuplot does not seem to accept
unicode input files (it complains about unknown characters at the
beginning of the input file).

Gnuplot is perfectly happy with UTF-8 encoded files.
That is, in fact, the default for most linux systems.
However, some Windows programs place extra characters at the start
of a file containing an encoding they don't recognize. It is possible
that is what has happened to your input file. Just delete the junk at
the beginning of the file and you should be fine.



Regards -
Christian

.



Relevant Pages

  • Re: Copy multiples files to a single file in seperate pages..
    ... Each input file is large enough to fit into a single ... merge the PS or even the PDF files into one large file. ... I hope all of them are Unicode only, because I would guess you probably ... there were any non-Unicode characters in those files. ...
    (comp.lang.perl.misc)
  • Re: Unicode Support
    ... >> (I know this is a poor example, but think about other languages, eg ... First things first, when you register your RosAsm windows classes, you ... the messages with ANSI / UNICODE parameters in ANSI or UNICODE form... ... with their alphabet characters, as with the numbers and punctuation...so, ...
    (alt.lang.asm)
  • =?windows-1252?Q?Re=3A_Encrypting_Unicode_=96_Using_ASCII_as_a_Surrogat?= =?windows-1252?Q?e
    ... characters of an exotic eastern language using an ASCII keyboard. ... communicate in large volume with China or Japan using CJK from Unicode ... present the message text to Alice as a string of hexadecimal numbers ... by the computer as an external file and enciphered by a stream cipher ...
    (sci.crypt)
  • =?windows-1252?Q?Encrypting_Unicode_=96_Using_ASCII_as_a_Surrogate_Al?= =?windows-1252?Q?pha
    ... characters of an exotic eastern language using an ASCII keyboard. ... It is true to say that any keyboard of any language can be simulated ... communicate in large volume with China or Japan using CJK from Unicode ... by the computer as an external file and enciphered by a stream cipher ...
    (sci.crypt)
  • =?windows-1252?Q?Re=3A_Encrypting_Unicode_=96_Using_ASCII_as_a_Surrogat?= =?windows-1252?Q?e
    ... characters of an exotic eastern language using an ASCII keyboard. ... communicate in large volume with China or Japan using CJK from Unicode ... present the message text to Alice as a string of hexadecimal numbers ... by the computer as an external file and enciphered by a stream cipher ...
    (sci.crypt)