sinclairtarget / um

Create and maintain your own man pages so you can remember how to do stuff
MIT License
1.8k stars 42 forks source link

unicode problem #22

Open TheMasterOfMagic opened 6 years ago

TheMasterOfMagic commented 6 years ago

I edited the page like this image and when I read it, it outputs like this image am I missing something or um dose not support unicode character now?

sinclairtarget commented 6 years ago

Yeah, it's entirely possible that Um itself messed this up. It's also possibly that the man program doesn't know what to do with unicode in a .roff file. Will look into it.

Thanks!

ernstki commented 2 years ago

Yeah, it's entirely possible that Um itself messed this up. It's also possibly that the man program doesn't know what to do with unicode in a .roff file. Will look into it.

Not your fault. The default groff on macOS doesn't support Unicode (ref).

With a recent groff from MacPorts or Homebrew, you can get proper display of UTF-8 symbols with something like this:

kramdown -i markdown ~/.um/pages/shell/rsync.md -o man | groff -k -Tutf8 -man | less

…but that kind of defeats the purpose of um. The -k option is key here, but that option is not present in the groff that comes with macOS, which is too old.

Not sure the way forward for um, because this isn't necessarily a problem with Kramdown or um, it's the OS-default groff that's the obstacle.