Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm having to deal with a Windows Server (NTFS) file server and our backup application appears to be failing with certain files.

According to this https://en.wikipedia.org/wiki/NTFS#Internals NTFS apparently supports file names encoded in UTF-16 but according to their support team, our backup application only supports UTF-8. I'd like to confirm whether this is actually the problem by seeing the file name encoding for myself.

The files that are failing appear to be using plain English A-Z letters and other ASCII characters. No accents or non-English letters etc. I suppose even though the letters appear to be plain A-Z the file name could still be encoded in UTF-16.

Does anyone know of a utility or script that can recursively go through all files in a directory and show the encoding of the file name?
Then I could try renaming to UTF-8 to see if the backup can proceed.

I'm not a Windows developer so can't write this up myself. Presumably the encoding of the file name should be stored in the FS somewhere and therefore it should be possible to expose this.

share|improve this question
    
This feels like a huge red herring. I find it very hard to believe the problem lies with filename encoding. –  Dan Jul 2 '13 at 15:52
    
Yes me too. If I can confirm that the encoding of all the files is the same then this gives me ammo to go back to the support team of the backup software so they can investigate further. –  benbradley Jul 2 '13 at 15:54
    
I find this hard to believe, too. How long are the filenames/paths? –  Katherine Villyard Jul 2 '13 at 16:17
    
File names on NTFS are always UTF-16. –  Ryan Ries Jul 2 '13 at 16:19
    
I would bet on either the fully qualified file name is > 255 characters, or the files were created on some sort of Unix variant that, while supports reading/writing NTFS, can use illegal filename characters that Windows APIs would not allow. –  Ryan Ries Jul 2 '13 at 16:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.