Therefore, it seems this experiment might be worth trying: in a
terminal window, do
export LANG=pt_BR.UTF-8
then try "locale" again and see if LC_ALL appears set.
(...) try starting gretl from the terminal, using the shell script named
"gretl" in Gretl.app/Contents/Resources/bin . Do accented
filenames then work? If so, the problem is associated with no
value being given to LC_ALL.