Re: Issue with umlauts and escapes in mm letter IA and WA macros
"G. Branden Robinson" <[email protected]> Mon, 30 Mar 2026 18:49:07 -0500
| Newsgroups | gmane.comp.printing.groff.general |
|---|---|
| Message-ID | <20260330234907.iakmnohkkj2jgnt6@illithid> |
Hi Alexis,
At 2026-03-29T13:02:45+0200, Alexis (surryhill) wrote:
> please find attached a slightly modified version of
> contrib/mm/examples/letter.mm that uses UTF-8 umlauts and their
> groff escape equivalents in the IA and WA macro calls.
I think we can probably just change the existing implementations.
> I was surprised to find that the escape sequences, e.g. \(:a or
> \[u00E4], are visible verbatim in the UTF-8 and PDF output for
> any text in the IA and WA "body". Text passed as arguments
> to the IA and WA macro, i.e. name and title, are rendered correctly.
I was surprised by that, too, when updating the groff_mm(7) page.
> Looking at the implementation of IA, IE, WA, and WE in
> contrib/mm/m.tmac I see that IA and WA call .eo to disable escape
> sequences and IE and WE call .ec to enable them again.
Yes.
> A plausible explanation for the observed and from my end unexpected
> behaviour that I am able to reproduce with groff version 1.23.0 as
> well as version 1.24.1.
Yup. Totally expected once you know that `eo` has been invoked.
> Non-ASCII characters in international addresses seem such a common
> use-case that I fail to see the motivation for the current approach.
>
> So, for what reason(s) are escape sequences disabled in the internal
> and writer address macros?
I had assumed that this was for DWB 3.3 mm compatibility, and thought,
'huh, I guess DWB did things this way because the mm macro package was
originally a USG ("Unix System/Support Group") thing, and they didn't
trust the input when performing a now largely forgotten automated
operation known as a "mail merge"'.
https://en.wikipedia.org/wiki/Mail_merge
But that guess seems to be wholly wrong. It might be what Jörgen Hägg
had in mind, but it's not what DWB 3.3 did. Its mm package never
invokes the `eo` or `ec` requests at all.
https://github.com/n-t-roff/DWB3.3/blob/master/macros/mm/mmn.sr
https://github.com/n-t-roff/DWB3.3/blob/master/macros/mm/mmt.sr
I think the thing to do here is regard this usage of `eo` and `ec` as a
bug in groff mm, because it is incompatible with DWB 3.3 mm for no
advantage that I can think of.
What do our other mm users think?
Regards,
Branden
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmnLC+wACgkQ0Z6cfXEm bc7TAg//c/5ubOUkn2n+YCXjUL4UFFjHhyEAduOOHiplmB9xfRWhkCKqSK69ZUG/ rt8I51yQD8YHiHD7nb6/V5fnBqgoFceiMBP8s2437GN5rkV9ScadD4660vhDG50J wQcYkHKahL9grrsQ3DlUvHWa6YC0rahSu38m0T7qiQ4adHjjIBracww8HGo9huia 09vfUPvqfqp8UW08soVF6ACYj3pH8uZf6da+lLii+mb3q8u18xCQlo4nYXXBOIHc AGWoKtfoqX+b6sDFLgGQEbe9dvjYwhyJfrMre3OiZRb1zCwyXyAHOsjLKELy7dW+ 4Gmu4eOTFFXrJQgYye/6O7+4zTTCGBX5Zq3gxRbSMqxP9JzD9zObLuUiCxispeEk 5V7q6BnBRnXRxtDm9aBLPSibUiPHx20lEuAAtnlpOc5Nca8NlTiCVd2556pSICm3 E4lZ4hBK21j0iY7tfVhBIXgYq7NY8O/vHruEaxASgZNaUeXXcURYkAzdXrnDTodp 3QepRUN7hbFYPE90S24Yt/nq6OnZe1jZlYVayhPrq+FEuOskr/WUR43tUOwzcjZk 9u3iQ9J86hpIsJpjjlAguouqIkH1LqxKSWM96lNASK3c0XRFQzeXsutvFDXscwrf FQIr2zyxYkBs1ucpWZrBx9HzL9HGdKu/U3n8HbGNBDZCPth47Pg= =l6UY -----END PGP SIGNATURE-----