Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Can Perl convert ISO-? | WIN-? | MAC-? to UTF-8?

by Khen1950fx (Canon)
on May 23, 2013 at 06:04 UTC ( [id://1034875]=note: print w/replies, xml ) Need Help??


in reply to Can Perl convert ISO-? | WIN-? | MAC-? to UTF-8?

I think that you might need to use String::BOM.
#!/usr/bin/perl -l use strict; use warnings; use String::BOM qw(strip_bom_from_file); my $file = '/path/to/file'; print strip_bom_from_file($file);

Replies are listed 'Best First'.
Re^2: Can Perl convert ISO-? | WIN-? | MAC-? to UTF-8?
by taint (Chaplain) on May 23, 2013 at 06:26 UTC
    Greetings Khen1950fx , and thank you for your reply.
    That's good advice. But if I understand what you've offered, it would strip the BOM
    (ByteOrderMarker) from the file(s). While that was probably the case somewhere in their
    past. None of them appear to have one now.

    Thank you again, for your response

    --chris

    #!/usr/bin/perl -Tw
    use perl::always;
    my $perl_version = "5.12.4";
    print $perl_version;
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^2: Can Perl convert ISO-? | WIN-? | MAC-? to UTF-8?
by Anonymous Monk on May 23, 2013 at 06:30 UTC

    I think that you might need to use String::BOM

    Why do you think that? Which portion of the OPs question is that supposed to solve?

Log In?
Username:
Password:

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

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

    No recent polls found