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

Problem with escape sequence \x for hex with spaces "\x{ 263A }"

by LanX (Saint)
on Jun 10, 2022 at 20:00 UTC ( [id://11144667]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     
    \x{263A}     [1,8]  hex char          (example shown: SMILEY)
    \x{ 263A }          Same, but shows optional blanks inside and
                        adjoining the braces
    
  2. or download this
      DB<55> p join ",",map {ord} split //, "\x{ 41 }"                    
    +                                                  
    0                                                                     
    +                                                    
    ...
    A                                                                     
    +                                                    
      DB<60> p "\x{ 41 }"                                                 
    +                                                  
    ^@
    
  3. or download this
      DB<65> use warnings; "\x{ 263A }"                                   
    +                                                  
    Non-hex character ' ' terminates \x early.  Resolved as "\x{00}" at (e
    +val
    
  4. or download this
    C:\tmp>%PERL% -w
    print $];
    ...
    Illegal hexadecimal digit ' ' ignored at - line 2.
    __END__
    5.024001
    
  5. or download this
    C:\tmp>%PERL_532% -w
    print $];
    ...
    Non-hex character ' ' terminates \x early.  Resolved as "\x{00}" at - 
    +line 2.
    __END__
    5.032001
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11144667]
Approved by kcott
Front-paged by kcott
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-24 06:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found