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.
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.psthen 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.