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

Re: Why won't Perl convert (Latin1 | ISO-8859-1) to (UTF-8 | utf8)?

by moritz (Cardinal)
on Jun 05, 2013 at 19:02 UTC ( #1037281=note: print w/ replies, xml ) Need Help??


in reply to Why won't Perl convert (Latin1 | ISO-8859-1) to (UTF-8 | utf8)?

When looking at your file, use hexdump. hexdump never lies to you, contrary to many terminals, browsers, text editors and other tools.

Chances are that the conversion works, but whatever you use to identify the encoding lies to your.


Comment on Re: Why won't Perl convert (Latin1 | ISO-8859-1) to (UTF-8 | utf8)?
Re^2: Why won't Perl convert (Latin1 | ISO-8859-1) to (UTF-8 | utf8)?
by taint (Chaplain) on Jun 06, 2013 at 14:20 UTC
    @space_monk, @Anonymous Monk, & @moritz
    Thanks for taking the time to respond.
    I use my Editor, and file(1); as in:
    file ./index.html file -i ./index.html file --mime-type ./index.html file --mime-encoding ./index.html
    As to my Editor; it has always correctly reported the loaded file(s) properties in the past,
    and I have no reason to think it suddenly decided to stop. :)

    --chris

    #!/usr/bin/perl -Tw
    use perl::always;
    my $perl_version = "5.12.4";
    print $perl_version;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2014-12-26 11:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls