slurp with enc("utf16") doesn't work

2020-05-13 Thread Joseph Brenner
I just got to look into this one again a little further, and it does seem that reading a utf16 file like this doesn't work: my $contents = slurp( $file, :enc("utf16") ); Though this, however, does work: my $fh = $file.IO.open( :r, :enc("utf16") );

Re: need :enc help?I

2018-10-15 Thread Ralph Mellor
-- raiph On Mon, Oct 15, 2018 at 11:08 AM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > Hi All, > > Over on: > https://docs.perl6.org/routine/slurp > > This I understand > enc => "latin1" > > What is > :$enc > ? > > Many thanks, > -T >

Re: need :enc help?I

2018-10-15 Thread Laurent Rosenfeld via perl6-users
n: > https://docs.perl6.org/routine/slurp > > This I understand > enc => "latin1" > > What is > :$enc > ? > > Many thanks, > -T >

need :enc help?I

2018-10-15 Thread ToddAndMargo via perl6-users
Hi All, Over on: https://docs.perl6.org/routine/slurp This I understand enc => "latin1" What is :$enc ? Many thanks, -T

Re: enc ?

2018-10-15 Thread ToddAndMargo via perl6-users
On Sun, Oct 14, 2018 at 10:23 AM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: Hi All, Over on https://docs.perl6.org/routine/slurp # read entire file as Latin1 Str my $text_contents = slurp "path/to/file", enc => &quo

Re: enc ?

2018-10-14 Thread Ralph Mellor
ntents = slurp "path/to/file", enc => "latin1"; > > Where is the list of my options for "enc"? > > Many thanks, > -T >

enc ?

2018-10-14 Thread ToddAndMargo via perl6-users
Hi All, Over on https://docs.perl6.org/routine/slurp # read entire file as Latin1 Str my $text_contents = slurp "path/to/file", enc => "latin1"; Where is the list of my options for "enc"? Many thanks, -T