develooper Front page | perl.i18n | Postings from February 2006

Re: Using :encoding and :crlf together?

Thread Previous | Thread Next
Ciaran Hamilton
February 7, 2006 04:38
Re: Using :encoding and :crlf together?
Message ID:

> I won't post again about this unless I manage to solve the problem. 
> Sorry again for spamming the list.

I've managed to find a workaround, and I believe that what I've seen is 
a bug. I've submitted a report via perlbug.

The workaround is to install PerlIO::eol from CPAN and use ":eol(CRLF)" 
instead of ":crlf":


open(FILE, ">:encoding(UTF-16):eol(CRLF)", "test");
print FILE "Test \x{A3}45!\n";
print FILE "Test!\n";

The above file works perfectly and the test file contains the expected 

I haven't managed to test this on ActiveState yet as it's not in PPM. 
I've submitted a request for it to be on PPM. :D

  - Ciaran.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About