Broken characters in filenames only in some directories
- by Kaivosukeltaja
We have a web server running CentOS 5.8 that uses SVN for version control. When trying to switch to the latest revision, we got an error about the filenames of files in an upload directory:
svn: Error converting entry in directory 'adm/emails/upload' to UTF-8
svn: Valid UTF-8 data
(hex: 54 79)
followed by invalid UTF-8 sequence
(hex: f6 6b 69 72)
Upon investigating, we noticed there were some files that had broken filenames:
$ ls ~/public_html/adm/emails/upload/
Ty?el?m?trendit.csv
Ty?kirja1.csv
To get the update completed quickly, we simply mved the files into our home directory. Surprisingly, their filenames looked fine in their new location:
$ ls ~/
Työelämätrendit.csv
Työkirja1.csv
After the update we moved them back to where they were and their filenames were broken again. What could cause this and how can we fix it? The system's locale is set to LANG=en_US.UTF-8.