I have a NFS server running on a Fedora 29 machine and other machines on my network (an Ubuntu box and a Debian VM) mount it properly.

But when I mount it on an OpenBSD VM, the charset is wrong, for example:

openBSD# ls -la a*o
-rw-rw-r--  1 renan  renan  0 Mar  4  2019 a????o

The ???? should be 'çã' (the file name is ação).

My command line on the OpenBSD was mount -o tcp -t nfs /mnt/data.

What to do? I went through mount's man page and there is no way to set the charset to use, apparently.

  • Have you changed it to a BR locale? – Rui F Ribeiro Mar 4 at 23:40
  • @RuiFRibeiro setting the locale to a pt_BR one worked. I will write a more thorough answer. – Renan Mar 5 at 0:12

From the locale manpage:

Programs in the OpenBSD base system ignore the locale except for the character encoding, and it is not recommended to use any of these variables except that the following non-default setting is supported as an option:

export LC_CTYPE=en_US.UTF-8

Then, setting LC_CTYPE to be pt_BR.UTF-8 works and I get the correct filenames now.

  • 1
    Excellent you pulled it off as I am not in OpenBSD anymore. +1. I think there was a "standard" place/file to define that. – Rui F Ribeiro Mar 5 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.