1

I can write Arabic using Ubuntu, but now I got this problem: I copied some Arabic files (books and music) from another hard disk and all the names turned into "??? ?? ?????.pdf" what makes it impossible to use them. Imagine all your files have these names "?????"...

Right now, I would have to open each file, look for the real name, then rename them one by one. Any better idea for this? Can I install any tool, then copy them again?

Thank you so much

2
  • When you say copied from another hard disk, did you use a different installation? Are you opening them with a different program? Are the originals still working?
    – Dan
    Aug 8, 2013 at 13:57
  • 2
    Let me guess... you copied it from a Windows disc?
    – Rinzwind
    Aug 8, 2013 at 14:15

1 Answer 1

2

The problem is text encoding - the text encoding of the file system you have copied from is not the same of the target file system.

I'd guess that the file system you have transferred from is a native Windows file system with file names in a localised encoding, and that the target file system is a Linux file system with UTF-8 filenames (UTF-8 should support most languages).

You probably want the convmv program (this is available from the Ubuntu repositories) - you'll need to work out what the source encoding of the file names is (should be in the list you get from running convmv --list, I'm not familiar with Arabic but a quick search suggests it's cp1256.)

e.g. (and you may need to experiment a little with the options to get this right)

# this should rename all files in current folder, recursively
convmv -f cp1256 -t utf-8 -r . 

http://www.j3e.de/linux/convmv/man/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .