in reply to Re^6: Interleaving bytes in a string quickly
in thread Interleaving bytes in a string quickly

Okay. How could it "silently encode my bytes as utf"?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"
  • Comment on Re^7: Interleaving bytes in a string quickly

Replies are listed 'Best First'.
Re^8: Interleaving bytes in a string quickly
by ikegami (Patriarch) on Feb 26, 2010 at 22:39 UTC
    Perl has two types of strings. Strings of ≤8-bit values and strings of ≤32/64-bit values. If it uses the latter format to store your string of bytes, they will appears as if they have been UTF-8 encoded if you look at SvPVX.

      Yes. But given I'm reading the file (binary data) in raw mode, how would they get "silently encoded"?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        What file? I was talking about using SvPVX to access the bytes of a string of bytes.