bug-a2ps
[Top][All Lists]
Advanced

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

Re: Incorrect title and footer encoding for de_DE locale


From: Reuben Thomas
Subject: Re: Incorrect title and footer encoding for de_DE locale
Date: Wed, 20 Mar 2024 17:11:08 +0100

On Wed, 20 Mar 2024 at 14:59, Stefan <stefan6419846@gmail.com> wrote:

If a2ps itself has support for localization, id est providing headers
and footers in the locale configured by the user, as it currently is,
I expect these values to use the proper encoding.

It's true that I cannot see anywhere in the code or documentation that the encoding of the localized time is dealt with. I guess the assumption is that your output encoding will match your locale. Since a2ps does not support UTF-8, that can't happen in your case. So, you have to change the locale.

Or, you could use paps, which does support UTF-8: https://github.com/dov/paps

at the moment. a2ps just uses the current locale and writes the header
and footer into the Postscript file directly if headers are enabled
(what I want).

a2ps will re-encode text when you tell it that the input is in a particular encoding and the output is in a different encoding. For example:

echo "écrit" |recode utf8..CP-850 | faketime "2023-02-24" a2ps --encoding IBM-CP850 -o foo.ps

then the date comes out as "fM-ivr." Here, the "é" has been treated as non-printable, presumably because a2ps's encoding routines are not clever enough to map it from one encoding to the other.

It is unlikely that a2ps as it stands will ever be fixed to understand multibyte encodings; I have however suggested how current packages could be combined to make a replacement: https://savannah.gnu.org/task/?16517

Meanwhile, feel free to file a bug about a2ps's failure to check the encoding of the locale. However, fixing that bug would not help you; the best case is that a2ps would simply issue a warning or refuse to run in a UTF-8 locale.

--
https://rrt.sc3d.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]