I have written a man page in the nroff syntax. The text is in English but I want to make sure that a name containing the character "ö" is displayed correctly (even on a non-UTF-8 system). Is there a way to specify this character in nroff, similar to ö
in HTML? Or can I specify the encoding in the file?

- 10,773
- 7
- 38
- 60
2 Answers
GNU troff (groff), which seems to be the de facto standard, accepts the named glyph \[:o]
for the character "ö":

- 10,773
- 7
- 38
- 60
I don't know troff but maybe this helps:
accent mark input output
acute accent e\*' é grave accent e\*` è circumflex o\*^ ô cedilla c\*, ç tilde n\*~ ñ question \*? exclamation \*! umlaut u\*: ü digraph s \*8 ß hacek c\*v macron a\*_ underdot s\*. o-slash o\*/ ø angstrom a\*o å yogh kni\*3t Thorn \*(Th Þ thorn \*(th þ Eth \*(D- Ð eth \*(d- ð hooked o \*q ae ligature \*(ae æ AE ligature \*(Ae Æ oe ligature \*(oe OE ligature \*(Oe
These new diacritical marks will not appear or will be placed on the wrong letter if .AM is not at the top of your file. If .AM is at the top of your file, the default -ms accent marks will be placed on the wrong letter. Choose one set or the other and use it consistently.
As an aid in producing text that will format correctly with both nroff and troff, there are some new string definitions that define dashes and quotation marks for each of these two formatting programs. The (*- string will yield two hyphens in nroff, but in troff it will produce an em dash--like this one. The *Q and (*U strings will produce open and close quotes in troff, but straight double quotes in nroff. (In typesetting, the double quote character is traditionally considered bad form.)

- 856
- 16
- 28