If I run `sudo man -L fr_CA.utf8 -caM /usr/share/man 6 nethack' from the command line, no cache file is created and so the bug does not happen. If I create a small script that runs the same command, but clears the environment, I get a junk man page. Here is a such a script:
So a possible solution would be for catman to add a LANG environment variable to the execve call to man. I don't know enough about the usage cases of catman; is the locale supposed to be valid? Is it good enough to be used for system-wide purposes? Otherwise, should catman fake an utf-8 locale?
If I run `sudo man -L fr_CA.utf8 -caM /usr/share/man 6 nethack' from the command line, no cache file is created and so the bug does not happen. If I create a small script that runs the same command, but clears the environment, I get a junk man page. Here is a such a script:
#!/usr/bin/python "/usr/bin/ man", ["man", "-L", "fr_CA.utf8", "-caM", "/usr/share/man", "6", "nethack"], {})
import os
os.execve(
If I restore the environment variable about the locale, a cat file is created, but I do not get the bug:
#!/usr/bin/python "/usr/bin/ man", ["man", "-L", "fr_CA.utf8", "-caM", "/usr/share/man", "6", "nethack"], {'LANG': 'fr_CA.utf8'})
import os
os.execve(
So a possible solution would be for catman to add a LANG environment variable to the execve call to man. I don't know enough about the usage cases of catman; is the locale supposed to be valid? Is it good enough to be used for system-wide purposes? Otherwise, should catman fake an utf-8 locale?