Debian, How to convert filesystem from ISO-8859-1 into UTF-8?

Posted by Johan on Server Fault See other posts from Server Fault or by Johan
Published on 2009-08-17T09:45:54Z Indexed on 2012/10/05 21:41 UTC
Read the original article Hit count: 274

Filed under:
|
|

I have a old pc that is running Debian stable, that is in need of a upgrade. The problem is that it is using latin1 (ISO-8859-1) for everything, and since the rest of the world has moved to UTF-8 I plan to convert this computer as well.

And for this question I will focus in on the files that are served with Samba, and some has some latin1 characters in the filenames (like åäö).

Now my plan is to move all data of this old computer onto and a brand new one that is running Debian stable (but with UTF-8).

Does anybody have a good idea?

Thanks Johan


Note: later I plan to use iconv to convert the content of some files with something like this:

iconv --from-code=ISO-8859-1 --to-code=UTF-8 iso.txt > utf.txt

However I don't know of a good way to convert the filesystem it self.

Note: Normally I usaly just scp from one computer to the next, but then I end up with latin1 characters in the utf-8 filesystem...


Update: Did a small test round with a hand full of files (with funny chars) in the filenames, and that seemed like it could work.

convmv -r -f ISO-8859-1 -t UTF-8  *

So it was only to execute with the --notest

convmv -r -f ISO-8859-1 -t UTF-8 --notest *

Nothing more to it.

© Server Fault or respective owner

Related posts about debian

Related posts about filesystems