The stupid question is the question not asked | |
PerlMonks |
Win32 encoding conversion mysteryby mithaldu (Monk) |
on Aug 13, 2018 at 10:52 UTC ( [id://1220286]=perlquestion: print w/replies, xml ) | Need Help?? |
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
Back to
Seekers of Perl Wisdom
|
|