Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

enscript + euro

186 views
Skip to first unread message

wg

unread,
Jun 10, 2012, 11:34:45 AM6/10/12
to
Hi folks,

with enscript (Ver-1.6.4) and ps2pdf I produce various documents.
Now it happens that I need to print the Euro-symbol.

Unfortunately I did not find an enscript Version supporting ISO-8859-15.

What are the solutions to print the Euro symbol with enscript und ps2pdf?



Thanks for readind and hints
Wolf

Aragorn

unread,
Jun 10, 2012, 12:29:47 PM6/10/12
to
On Sunday 10 June 2012 17:34, wg conveyed the following to
alt.os.linux...

> Hi folks,
>
> with enscript (Ver-1.6.4) and ps2pdf I produce various documents.
> Now it happens that I need to print the Euro-symbol.
>
> Unfortunately I did not find an enscript Version supporting
> ISO-8859-15.
>
> What are the solutions to print the Euro symbol with enscript und
> ps2pdf?

Use UTF-8 instead, like the rest of the world? ;-)

--
= Aragorn =
(registered GNU/Linux user #223157)

Richard Kettlewell

unread,
Jun 10, 2012, 3:11:26 PM6/10/12
to
Aragorn <str...@telenet.be.invalid> writes:
> wg conveyed the following to alt.os.linux...

>> with enscript (Ver-1.6.4) and ps2pdf I produce various documents.
>> Now it happens that I need to print the Euro-symbol.
>>
>> Unfortunately I did not find an enscript Version supporting
>> ISO-8859-15.
>>
>> What are the solutions to print the Euro symbol with enscript und
>> ps2pdf?
>
> Use UTF-8 instead, like the rest of the world? ;-)

It doesn't support that either, according to its man page.

--
http://www.greenend.org.uk/rjk/

Richard Kettlewell

unread,
Jun 10, 2012, 3:44:19 PM6/10/12
to
wg <w...@gmx.net> writes:
> with enscript (Ver-1.6.4) and ps2pdf I produce various documents. Now
> it happens that I need to print the Euro-symbol.
>
> Unfortunately I did not find an enscript Version supporting
>ISO-8859-15.
>
> What are the solutions to print the Euro symbol with enscript und
> ps2pdf?

texttops (and texttopdf) from
https://github.com/ewxrjk/text-tools
will use whatever input encoding is defined by your locale settings,
including ISO-8859-15 (just checked l-)

They do lack other features of enscript though.

--
http://www.greenend.org.uk/rjk/

Peter Köhlmann

unread,
Jun 10, 2012, 5:41:02 PM6/10/12
to
Wrong

Richard Kettlewell

unread,
Jun 11, 2012, 5:53:49 AM6/11/12
to
I don't see UTF-8 listed here:

-X name, --encoding=name
Use the input encoding name. Currently enscript supports the
following encodings:

88591, latin1
ISO-8859-1 (ISO Latin1) (enscript's default encoding).

88592, latin2
ISO-8859-2 (ISO Latin2)

88593, latin3
ISO-8859-3 (ISO Latin3)

88594, latin4
ISO-8859-4 (ISO Latin4)

88595, cyrillic
ISO-8859-5 (ISO Cyrillic)

88597, greek
ISO-8859-7 (ISO Greek)

88599, latin5
ISO-8859-9 (ISO Latin5)

885910, latin6
ISO-8859-10 (ISO Latin6)

ascii 7-bit ascii

asciifise, asciifi, asciise
7-bit ascii with some scandinavian (Finland, Sweden)
extensions

asciidkno, asciidk, asciino
7-bit ascii with some scandinavian (Denmark, Norway)
extensions

ibmpc, pc, dos
IBM PC charset

mac Mac charset

vms VMS multinational charset

hp8 HP Roman-8 charset

koi8 Adobe Standard Cyrillic Font KOI8 charset

ps, PS PostScript font's default encoding

pslatin1, ISOLatin1Encoding
PostScript interpreter's `ISOLatin1Encoding'

$ dpkg -l enscript
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii enscript 1.6.5.2-1 converts text to Postscript, HTML or RTF wit

--
http://www.greenend.org.uk/rjk/

J G Miller

unread,
Jun 11, 2012, 6:37:54 AM6/11/12
to
Why wrong?

The Linux from Scratch page on enscript version 1.6.4 (the version being
used by /original poster/ WG specifically states at

<http://www.linuxfromscratch.ORG/blfs/view/6.3/pst/enscript.html>

QUOTE

Caution

Enscript cannot convert UTF-8 encoded text to PostScript. The issue is
discussed in detail in the Needed Encoding Not a Valid Option section of
the Locale Related Issues page.

The solution is to use paps-0.6.8, instead of Enscript, for converting
UTF-8 encoded text to PostScript.

UNQUOTE

Peter Köhlmann

unread,
Jun 11, 2012, 7:16:54 AM6/11/12
to
pin enscript


Enscript converts ASCII files to PostScript and writes the generated
output to a file or sends it directly to the printer.

The Enscript configuration file is in /etc/enscript.cfg.

Warning: enscript is not able to convert complex unicode (UTF-8) text
to PostScript. Only language text which can be converted from UTF-8 to
latin encodings are supported with the help of a wrapper script. ~ ~


If a wrapper script is used (which is part of the package) or done directly
is quite irrelevant

Richard Kettlewell

unread,
Jun 11, 2012, 7:40:00 AM6/11/12
to
Peter Köhlmann <peter-k...@t-online.de> writes:
> pin enscript
>
>
> Enscript converts ASCII files to PostScript and writes the generated
> output to a file or sends it directly to the printer.
>
> The Enscript configuration file is in /etc/enscript.cfg.
>
> Warning: enscript is not able to convert complex unicode (UTF-8) text
> to PostScript. Only language text which can be converted from UTF-8 to
> latin encodings are supported with the help of a wrapper script. ~ ~
>
>
> If a wrapper script is used (which is part of the package) or done
> directly is quite irrelevant

That only copes with the same set of characters it ever did, just
encoded in UTF-8. It doesn't actually support the full Unicode range.
Describing it as "UTF-8 support" is thoroughly misleading. (And it
doesn't solve the OP's problem.)

--
http://www.greenend.org.uk/rjk/

Jasen Betts

unread,
Jun 12, 2012, 6:27:43 AM6/12/12
to
On 2012-06-10, wg <w...@gmx.net> wrote:
> Hi folks,
>
> with enscript (Ver-1.6.4) and ps2pdf I produce various documents.
> Now it happens that I need to print the Euro-symbol.
>
> Unfortunately I did not find an enscript Version supporting ISO-8859-15.
>
> What are the solutions to print the Euro symbol with enscript und ps2pdf?
>

Print the generic currency symbol instead and then do a find-and-replace on
the generated postscript?

--
⚂⚃ 100% natural

--- Posted via news://freenews.netfront.net/ - Complaints to ne...@netfront.net ---

wg

unread,
Jun 12, 2012, 11:12:12 AM6/12/12
to
On 12.06.2012 12:27, Jasen Betts wrote:
> On 2012-06-10, wg<w...@gmx.net> wrote:
>> Hi folks,
>>
>> with enscript (Ver-1.6.4) and ps2pdf I produce various documents.
>> Now it happens that I need to print the Euro-symbol.
>>
>> Unfortunately I did not find an enscript Version supporting ISO-8859-15.
>>
>> What are the solutions to print the Euro symbol with enscript und ps2pdf?
>>
>
> Print the generic currency symbol instead and then do a find-and-replace on
> the generated postscript?
>
Yes, this was my first idea too, however I do not have the faintest idea
how to do this :-(.
Any hint?

Jasen Betts

unread,
Jun 14, 2012, 3:57:00 AM6/14/12
to
postscript is a text format, print a doument using some other tool and
see how the symbols are written. then use sed or similar to make the
substitution.

Richard Kettlewell

unread,
Jun 14, 2012, 5:01:15 AM6/14/12
to
Jasen Betts <ja...@xnet.co.nz> writes:
> On 2012-06-12, wg <w...@gmx.net> wrote:
>> On 12.06.2012 12:27, Jasen Betts wrote:

>>> Print the generic currency symbol instead and then do a
>>> find-and-replace on the generated postscript?
>>
>> Yes, this was my first idea too, however I do not have the faintest
>> idea how to do this :-(. Any hint?
>
> postscript is a text format, print a doument using some other tool and
> see how the symbols are written. then use sed or similar to make the
> substitution.

You're missing the key bit of information, which is "what should I
replace the currency sign with". To put it in concrete terms, what
should "\244" become below?

$ cat foo.txt
pound sign: £
currency sign: ¤
$ iconv -f UTF-8 -t ISO-8859-1 < foo.txt > foo.latin1
$ hd foo.latin1
00000000 70 6f 75 6e 64 20 73 69 67 6e 3a 20 a3 0a 63 75 |pound sign: ..cu|
00000010 72 72 65 6e 63 79 20 73 69 67 6e 3a 20 a4 0a |rrency sign: ..|
0000001f
$ enscript -Xlatin1 -o foo.ps foo.latin1
[ 1 pages * 1 copy ] left in foo.ps
$ grep sign foo.ps
/space /exclam /quotedbl /numbersign
(pound sign: \243) s
(currency sign: \244) s

This is completely the wrong approach; the right answer is to use a tool
which can cope with the user's chosen encoding natively. I've already
mentioned one, I expect there are others.

--
http://www.greenend.org.uk/rjk/
0 new messages