Linux – Which filename encoding should I use to be compatible with Windows, Mac and Linux

linuxmacunixwindows

I'm using a Linux server as fileshare.
These files are accessed by Windows computers with a Samba server, accessed by Macs with a netatalk server (afpd) and also trough ssh an sftp for Windows, Macs and Linux system.

It seems like some of these systems care about the use of characters in filenames and some don't..

There is a tool called 'convmv' to convert filenames from one to another, but which one should I use?

Should I setup the Samba server for a defined file encoding? Same for netatalk?

Best Answer

No, you shouldn't setup a specific filesystem in samba.

Linux usually uses UTF-8. You should use that. Samba negotiates automatically with it's clients the encoding and converts the filenames on the fly.

I have no idea regarding netatalk, but it shouldn't be necessary.

Regarding sftp, simply don't use it for windows. Windows assumes that files will be encoded with an encoding like codepage 1252. Use samba that will do the needed conversions on the fly and you'll save yourself a lot of problems.

Best of luck,
João Miguel Neves

Related Topic