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

Attachment: signature.asc
Description: PGP signature

Reply via email to