Follow-up Comment #1, bug#64071 (group groff): I'm thinking the way to do this is:
1. Add a function much like input.cpp's `encode_char_for_troff_output()` (as it is named in a pending push), `encode_char_for_system_output()`. 2. Have this function encode output much as the foregoing does. The seven ASCII specials get translated to ASCII. 3. Translate Unicode escape sequences of the form `\[u00xx]` as C string literal octal escape sequences. I'd prefer '\x', but that's allowed to be of arbitrary length, and without scanning ahead in the input, I expect this to be hard to handle. There is also the problem of ambiguity. Consider '\xffffoobar'. 4. Reject Unicode escape sequences of more than four hex bytes or where either of the first two hex digits is not zero. GNU troff does not futz with the libc locale, and any other approach would require doing so. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64071> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/