Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Win32 encoding conversion mystery

by Anonymous Monk
on Aug 13, 2018 at 17:23 UTC ( [id://1220298]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Win32 encoding conversion mystery
in thread Win32 encoding conversion mystery

What is it supposed to give you?
  • Comment on Re^3: Win32 encoding conversion mystery

Replies are listed 'Best First'.
Re^4: Win32 encoding conversion mystery
by mithaldu (Monk) on Aug 13, 2018 at 17:36 UTC
    I need the string as it is represented on the right side in the OP post, as those are the actual cp932 bytes, which i can convert to real UTF8. I could get these by using windows `dir`, so they are in the file system data, but dir's applications are limited. At the same time all the windows api calls seem to give me are the "mangled for visualizing" utf8 mojibake.
        I knew all of that already, and that was not what my question asked or what i needed. It did not mention cp437 at all, which is what my left-hand string needed to be encoded as, as vr pointed out in his correct answer here: https://www.perlmonks.org/?node_id=1220300

      I need the string as it is represented on the right side in the OP post

      Why? Just use the wide interface I mentioned instead

        Because that gives me the string on the left side in OP, which is the same as the one in this code which i wrote on your recommendation.

        This byte sequence cannot be converted to UTF-8 displaying japanese characters without first moving through 437, which is what the right hand side gives. Just saying "use the wide interface" is completely useless.

        Worst of all:

        You somehow managed to miss that i said i'm using Win32::LongPath in the OP post, which already uses the wide interface, AND ALSO the very fact that i JUST gave you code that does EXACTLY what you suggest. Why do you continue to pretend i'm not already using the wide interface. This is extremely rude.

        In fact, it seems to me as if you made your recommendation without ever having worked with japanese files encoded as described, which makes your blunt insistence on "use the thing you're already using" even more rude.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1220298]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-16 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found