tjko / jpegoptim

jpegoptim - utility to optimize/compress JPEG files
http://www.iki.fi/tjko/projects.html
GNU General Public License v3.0
1.56k stars 116 forks source link

Rendered man page incorrectly displays command line switches #159

Open jheino3 opened 11 months ago

jheino3 commented 11 months ago

First of all, my locale is set to "en_US.UTF-8" if that makes a difference.

man jpegoptim displays command line switches as Unicode HYPHEN rather than HYPHEN-MINUS. When copy-pasting a command from the rendered man page, it creates cryptic errors such as this:

Command: jpegoptim ‐‐dest=./p file.jpg

Resulting error: jpegoptim: file not found: ‐‐dest=./p

Looking at the documentation for "man", it appears that every '-' in jpegoptim.1 should be replaced with '\-'

This would would render the character '-' as HYPHEN-MINUS, allow copy-pasting of options without error. I'm kind of out of my element here, but I believe this is the problem and solution.

Thanks

tjko commented 10 months ago

Interesting, I just tested on MacOS (LANG=en_US.UTF-8) and on Linux (LC_ALL=en_US.UTF-8) and couldn't reproduce this.

What OS are you seeing this on?