Comment 1 for bug 615045

Revision history for this message
ooze (zoe-gauthier) wrote :

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
import os
os.execve("/usr/bin/man", ["man", "-L", "fr_CA.utf8", "-caM", "/usr/share/man", "6", "nethack"], {})

If I restore the environment variable about the locale, a cat file is created, but I do not get the bug:

#!/usr/bin/python
import os
os.execve("/usr/bin/man", ["man", "-L", "fr_CA.utf8", "-caM", "/usr/share/man", "6", "nethack"], {'LANG': 'fr_CA.utf8'})

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?