http://www.perlmonks.org?node_id=955194


in reply to Re^4: Windows NTFS UTF-16LE File-Operations
in thread Windows NTFS UTF-16LE File-Operations

You need to encode back to octets the return of Win32::GetLongPathName(), because say is printing out octets. Win32::FindFile is most likely doing that for you already.

Which encoding you choose should depend on what your console expects (to be able to redisplay the characters).

Try:
perl -MEncode -E "say encode( 'UTF-8', Win32::GetLongPathName( $_ ) ) +for glob '*'"

If 'UTF-8' doesn't work out, choose another encoding that works well with your console. Bear in mind that the UTF-8 encoding may be fine as-is, and that the console just needs better fonts (which is not your case, because I infer that you can see the characters displayed properly using Win32::FindFile).