Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have a volume in AFS format, in which the encodings are quite messed up. ASCII, Latin-1, ISO-8859-1 and UTF-8 all co-exist and it is more or less arbitrary which format is used. Some files are saved in one encoding, and other files in the same directory are in another, etc...

Is there any clean way in which I can convert the entire tree, starting at a specified root folder and walking recursively, to UTF-8?

The tree is very large, making a manual inspect-and-act solution impossible; I have to do this with a recursive scripting solution.

I'm connecting to the file system over ssh, if that matters.

share|improve this question

closed as too localized by Eric Carvalho, Kevin Bowen, Eliah Kagan, vasa1, Seth Apr 2 '13 at 3:20

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

I don't know - maybe it doesn't. But a lot of other things are different on this system compared to what I'm used to from Ubuntu (rights management, for example), so I included the information in case it was relevant. –  Tomas Lycken Jan 22 '12 at 13:55
@Rinzwind: Just noticed that the title was misleading, though. Fixed that. –  Tomas Lycken Jan 22 '12 at 13:55
you can convert with iconv by the way so all you need is a bash script traversing directories and issueing the command. –  Rinzwind Jan 22 '12 at 14:01
@Rinzwind: Unfortunately, it's not that simple - iconv requires me to know what encoding I'm converting from, so I first have to find a way to discover that. It also requires me to direct the output to a file name, which I don't know how to do directly... –  Tomas Lycken Jan 22 '12 at 14:11
This question appears to be abandoned and unanswered, are you still looking for an answer? If this question no longer applies then you can either delete it or answer it yourself if you've solved the problem. Thanks! –  Eric Carvalho Apr 1 '13 at 1:45

Browse other questions tagged or ask your own question.