http://qs1969.pair.com?node_id=1220286

mithaldu has asked for the wisdom of the Perl Monks concerning the following question:

Edit: vr below has provided the correct answer: https://www.perlmonks.org/?node_id=1220300


I'm on windows and trying to rename some files from Shift_JIS to UTF8, and Perl is giving me the hardest time trying to do this because my system's codepage is Latin1.

I've tried googling various ways around this, but i'm in a situation where i've completely lost overview. So i'm hoping that someone here can give me a more concrete hint.

As follows, i have examples of the string as i get it from the Win32::LongPath api, along with its codepoint values; on the left. On the right is the ascii string of the filename as windows' own `dir` provides it, also with codepoints.

It is notable that the visuals of the string on the left are roughly what you get if you view the string on the right with a DOS ASCII font. So it looks like the Win32::LongPath api took the original string, and "upconverted" "invisible" characters to some utf8 equivalent?

What would be the name of this process?
Is there a reverse mapping of it?

Image form of the names: https://i.imgur.com/1tUzUrn.png

â{âNé┴Äqé╠Ä¿é⌐é½2 ƒ{ƒN‚ÁŽq&#13 +0;ÌŽ¨‚©‚«2 226 131 123 123 226 131 78 78 233 130 9524 193 196 142 113 113 233 130 9568 204 196 142 191 168 233 130 8976 169 233 130 189 171 50 50