Windows media shares and filename encoding
Diagnose filename encoding
Section titled “Diagnose filename encoding”Microsoft’s built-in Client for NFS writes filenames using the system ANSI codepage (CP1252 on Western-European installs), rather than UTF-8. NFS stores the bytes unchanged, so Windows-written names can contain invalid UTF-8 even when the media itself plays correctly.
| Character | UTF-8 (correct) | CP1252 (what Windows writes) |
|---|---|---|
ä | c3 a4 | e4 |
ö | c3 b6 | f6 |
ü | c3 bc | fc |
ß | c3 9f | df |
In a mixed library, Linux-written names remain correct while Windows-written names reach the scanner with replacement characters. Those names affect title matching and the labels on unmatched items.
Fixing the write path
Section titled “Fixing the write path”- Write over SMB (recommended). Export the directory with Samba and point Windows tooling at it. SMB handles Unicode natively; Linux/container readers can keep their NFS mounts.
- Replace the NFS client.
ms-nfs41-clientsupports NFSv4.2 and UTF-8, including characters above the BMP. It requires Cygwin and an unsigned kernel driver (Secure Boot off). Its documentednfsd.execrashes require a reboot; benchmark throughput against SMB. For a machine-wide mount restored at boot, use/etc/fstab.msnfs41client. Thenfs_globalmount -poption persists a per-user connection that doesn’t restore on a headless server. - Switch Windows to a UTF-8 codepage. In Region → Administrative → Change system locale, enable Beta: Use Unicode UTF-8 for worldwide language support, then reboot. This sets the ANSI codepage to 65001. It can break older non-Unicode applications; check your download client afterward.
Repairing names you already have
Section titled “Repairing names you already have”None of the above is retroactive. Fix existing filenames on the NFS server with
convmv:
# Dry run — convmv only prints what it would do unless you pass --notestconvmv -r -f cp1252 -t utf8 /path/to/library
# Apply, once the proposed renames look rightconvmv -r -f cp1252 -t utf8 --notest /path/to/libraryRenaming changes the path, so run a scan afterwards to pick the files up under their corrected names.
See Performance tuning for scan concurrency and NFS mount settings.