Well, deprecating using :utf8 with sysread and stuff seems very reasonable to me. OTOH, I do see problems with your statement. In fact, it doesn't even make much sense to me (sorry)
As a rule of thumb, and to avoid confusion, stick to the use of utf8 binmode for unicode text streams only
All strings in the Perl programming language are unicode text strings, and all streams produce those, so what exactly do you mean by "unicode text streams"? You probably meant something like "use only read, readline, print on streams marked (using binmode, open etc.) with utf-8".
if you don't have a compelling need for that, you can use lower level system IO via sysopen/sysread/syswrite and be done with it. In the end, bytes at rest in files are just bytes. If you aren't trying to encode your text as UTF-8 strict, you can safely use system IO without adding any additional IO disciplines/layers and you should be fine.
Just delete that part, IMO. People who understand what using thin wrappers over (system) read, pread implies (wrt buffering, for example) do not need to read that, and people who don't understand don't need to use sysread and syswrite, but they might think it's an advice to use those.
With system IO, no translations will occur on your input/output streams that could cause your file content to be mangled. You can write raw text or even binary streams and never worry.
That's confusing to me. "Mangled" in Perl pretty much always means "improper upgrading or downgrading". If the new changes cause the string to not be downgraded when using syswrite - well, that would be just wrong! but I'm sure that won't be the case - so "raw text" can still get mangled... just delete it, too, IMO.

So, basically, I don't like any of it :) Yeah, sorry, but it's just written in a pretty confusing manner, and there definitely shouldn't be any recommendation or encouragement to use sys functions.


In reply to Re: UTF-8 and systemIO are not friends anymore by Anonymous Monk
in thread UTF-8 and systemIO are not friends anymore by Tommy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.