in reply to UTF-8 in filenames

On windows, file names on NFTS volumes are internally stored in UTF-16, and there are APIs which let you use that (but core perl does not).

On Unixish systems, any string that doesn't contain a null byte or a slash can be used as file names. They can be in UTF-8, but which character encoding they are stored in is only a convention - the file systems don't store such meta data.

If you view directory contents with ls, you have to make sure that the current locale and the encoding which your terminal accept are the same as your file names are encoded in.

If you want to store your filenames in ASCII instead, you can use Text::Unidecode to get a decent ASCII representation of the file name.

Perl 6 projects - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^2: UTF-8 in filenames
by vitoco (Hermit) on Aug 26, 2009 at 21:19 UTC
    If you want to store your filenames in ASCII instead, you can use Text::Unidecode to get a decent ASCII representation of the file name.

    Great! That was the hint I needed. Thanks a lot...