|XP is just a number|
Re^3: Perl Windows vs Cygwin installsby Eliya (Vicar)
|on Mar 23, 2012 at 23:56 UTC||Need Help??|
It still matters with newer perls, too.
It's kind of a pity the patch you linked to doesn't really fix the issue it (apparently) set out to fix, i.e. the long standing bug with encodings like UTF-16 in combination with the :crlf layer.
I just checked it with 5.15.8, and I still see the same "unexpected" behavior, as it always has been. That is, when na´vely pushing a UTF-16 layer to enable UTF-16 functionality (on Windows), corrupted files are produced on writing, and carriage returns are not being removed upon reading:
--- writing ---
Wrong! correct encoding should be:
--- reading ---
Wrong! \r should've been removed.
(Note that because I tested this on Unix, I had to push :crlf myself. With a native Windows perl, the layer would of course already have been in place — i.e., you'd just say ">:encoding(UTF-16LE)" or "<:encoding(UTF-16LE)" (as anyone unaware of the issue would likely have tried).)
Personally, I think allowing another :crlf to be pushed on the stack (as it is now after the patch) is not the right approach to fix the issue, because you still have to manually rearrange the layers to get correct results. I fail to see the benefit of being allowed to have two :crlf layers now.