zopencommunity / man-dbport

Tool for generating manual pages for Unix programs
Apache License 2.0
0 stars 2 forks source link

man should be working in utf8 rather than mapping down to single byte #25

Closed MikeFultonDev closed 1 year ago

MikeFultonDev commented 1 year ago

The code is converting UTF8 files into ISO8859-1 / IBM-1047 and it would be good to keep it in UTF8. Two examples are groff (which has to map UTF8 angled brackets to < and >) and man --locale=fr vim which forces you to change your terminal setting to western ASCII to properly display characters (rather than a more natural UTF8 default)

MikeFultonDev commented 1 year ago

Another problem pointed out by @lbdyck can be seen with man -K mount

After the man page is displayed, garbage is written to the terminal and ctrl-c is required to quit. You can also see some odd characters (perhaps the close-quote?) not being displayed properly:

image

MikeFultonDev commented 1 year ago

If I switch my display to 'western (ASCII)' then the characters display correctly, but I still see some odd text on the screen afterward

image

and then:

image

MikeFultonDev commented 1 year ago

fixed in 'cleanuppatches'

Japanese: image

Russian: https://files.slack.com/files-pri/T27SFGS2W-F05A1SV9J2G/image.png

French (in UTF-8): image

German: image

Italian: image

Polish: image

Turkish: image

MikeFultonDev commented 1 year ago

Another note - if working with UTF-8 characters and you use iterm2 on a mac (or perhaps other terminal emulators), turn on 'use ligatures'. Now Turkish looks like: image