Re:BCHS: OpenBSD, C, httpd and SQLite web stack
by da39a3ee on Wednesday January 19, 2022 @01:01PM
(#29997398)
Thanks. However, now help2man is outputting the unicode character correctly, but `man $help2manOutput` is displaying things like `a(R)` and `a` instead of the unicode character. I've also tried with the `LOCALE=en_US.UTF-8` env var set.
Re:BCHS: OpenBSD, C, httpd and SQLite web stack
by enriquto on Wednesday January 19, 2022 @01:21PM
(#29997733)
This sounds like a problem with your pager, that is used to scroll the output of man pages in the terminal. Do accents appear correctly on other manpages in your system? If I recall correctly, on macos catalina I had to set my locale variable LC_CTYPE (and not LOCALE) so that the less pager recognized the accents.
Re:BCHS: OpenBSD, C, httpd and SQLite web stack
by da39a3ee on Wednesday January 19, 2022 @01:51PM
(#29998235)
I don't think it's a pager problem for the following reasons:
- If I do `man help2manOutput | cat` then it does not page, but I still see `a` and `a(R)` in place of the desired unicode characters
- `less help2manOutput` renders them correctly
- In general I have no problem viewing unicode characters in less: I'm familiar with env vars such as LESS and PAGER.
Re:BCHS: OpenBSD, C, httpd and SQLite web stack
by enriquto on Wednesday January 19, 2022 @02:15PM
(#29998570)
This is not the most appropriate place for this sort of fine-grained debugging. I'd suggest to try your generated manpage on another computer to see if it displays correctly. The only thing that I can say is that "it works for me" but of course this answer is not useful :)
The main site of development for help2man seems to be this:
https://salsa.debian.org/bod/help2man
I'm sure they'll accept pull requests that fix problems. Happy hacking!
The problem with non-ascii characters can be solved, though. Just add an option like "-L en_US.UTF-8" to the help2man call.