PerlIO::fse mediates encodings between Perl and Filesystem. It converts filenames into native forms if the filenames are utf8-flagged. Otherwise, PerlIO::fse does nothing, looking on it as native forms.

PerlIO::fse attempts to get the filesystem encoding(fse) from $ENV{PERLIO_FSE}, and if defined, it will be used. Or you can use PerlIO::fse $encoding directive to set fse.

If you use Windows (including Cygwin), you need not to set $ENV{PERLIO_FSE} because the current codepage is detected automatically. However, if $ENV{PERLIO_FSE} is set, PerlIO::fse will give it priority.

This module started in a part of PerlIO::Util, but now is an independent distribution. There are two reasons for this.

First, PerlIO::fse is unstable. I have seen segmentation fault in the test suit in some perls, but could not find what causes the problem. This problem should be resolved.

Second, authough automatic encoding detection is available in Windows system, it can be implemented in non-Windows, and it should be. This feature may require many tests, but I don't want to increment the version of PerlIO::Util.