Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Decoding, Encoding string, how to? (internal encoding)

by ikegami (Pope)
on Apr 03, 2009 at 01:34 UTC ( #755158=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    +-----------------------------------------------------------------+
    |                                                                 |
    ...
    |  +--------------------+     upgrade     +--------------------+  |
    |                                                                 |
    +-----------------------------------------------------------------+
    
  2. or download this
    use Encode qw(is_utf8 encode decode);
    binmode STDOUT,':encoding(iso-8859-1)';
    my $str = "This's a \x{201c}test\x{201d}";  # This is a "decoded" str.
    print "$utf8\n";                            # Encoded by :encoding
    
  3. or download this
    use Encode qw(is_utf8 encode decode);
    my $str = "This's a \x{201c}test\x{201d}";  # This is a "decoded" str.
    print encode('iso-8859-1', "$utf8\n");      # Include the LF.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://755158]
help
Chatterbox?
[Corion]: So Hyperboria is an envrypted, decentralized IPv6 mesh network. I'm interested and want to look how good coverage is in my area. But the API for querying Hyperboria is only reachable over Hyperboria itself. Thanks but no thanks.

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2017-06-23 07:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (536 votes). Check out past polls.