Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: using binmode() to override default encoding specified in "use open"

by Anonymous Monk
on Jul 22, 2020 at 10:45 UTC ( #11119634=note: print w/replies, xml ) Need Help??


in reply to using binmode() to override default encoding specified in "use open"

Try UTF-8
  • Comment on Re: using binmode() to override default encoding specified in "use open"

Replies are listed 'Best First'.
Re^2: using binmode() to override default encoding specified in "use open"
by raygun (Beadle) on Jul 22, 2020 at 12:21 UTC

    Hm. :encoding() not being a function, and perldoc encoding talking about something unrelated, it wasn't immediately clear where to find :encoding()'s documentation. I ended up choosing utf8 over UTF-8 because perldoc Encode::Supported, which I found when casting about for encoding info, indicated the former form was canonical. But now I suspect I should have been looking at perldoc Encode instead.

    But I'm still not completely sure. Perl's encoding documentation is a twisty maze of little passages, all different, and I've not yet found a signpost definitively stating "These are the legal arguments to :encoding() and what they mean."

      That is incorrect. "utf8" is an extension to UTF-8 used by Perl internally. "UTF-8" is the standard encoding. (The names are case-insensitive.)

      I have no idea why that pages says they are equivalent. They are not. See :encoding(UTF-8) vs :encoding(utf8) vs :utf8.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2020-09-27 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (142 votes). Check out past polls.

    Notices?