Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Character in 'b' format wrapped in unpack

by BrowserUk (Patriarch)
on Mar 28, 2015 at 15:47 UTC ( [id://1121669]=note: print w/replies, xml ) Need Help??


in reply to Re: Character in 'b' format wrapped in unpack
in thread Character in 'b' format wrapped in unpack

Dratted Unicrap bites again!


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
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". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
  • Comment on Re^2: Character in 'b' format wrapped in unpack

Replies are listed 'Best First'.
Re^3: Character in 'b' format wrapped in unpack
by choroba (Cardinal) on Mar 28, 2015 at 15:51 UTC
    Use bytes.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      Good call. I'd completely forgotten about that pragma. Thanks.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      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". I'm with torvalds on this
      In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
Re^3: Character in 'b' format wrapped in unpack
by ikegami (Patriarch) on Mar 29, 2015 at 23:12 UTC
    The only involvement of Unicode is the use of UTF-8 when you provided invalid data to print. That usually means you forgot to encode the argument, so Perl does it for you (but warns you that it did.) Don't pass invalid data to print, and Unicode won't be involved.
      The only involvement of Unicode is the use of UTF-8 when you provided invalid data to print

      Utter twaddle!

      The unicrap 'manifests' regardless of whether you call print:

      C:\test>perl -MDevel::Peek -E"$x = '--*--'; substr($x,2,1) = chr(~0); +Dump( $x )" SV = PVMG(0x250e68) at 0x2669c8 REFCNT = 2 FLAGS = (SMG,POK,pPOK,UTF8) IV = 0 NV = 0 PV = 0x252e48 "--\377\200\217\277\277\277\277\277\277\277\277\277\27 +7--"\0 [UTF8 "--\x{ffffffffffffffff}--"] CUR = 17 LEN = 24 MAGIC = 0x2b66a8 MG_VIRTUAL = &PL_vtbl_utf8 MG_TYPE = PERL_MAGIC_utf8(w) MG_LEN = -1

      Perl has silently and unwantedly f***** my data. Broken!


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      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". I'm with torvalds on this
      In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-23 15:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found