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
+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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.