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") );
--
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
>
n:
> https://docs.perl6.org/routine/slurp
>
> This I understand
> enc => "latin1"
>
> What is
> :$enc
> ?
>
> Many thanks,
> -T
>
Hi All,
Over on:
https://docs.perl6.org/routine/slurp
This I understand
enc => "latin1"
What is
:$enc
?
Many thanks,
-T
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
ntents = slurp "path/to/file", enc => "latin1";
>
> Where is the list of my options for "enc"?
>
> Many thanks,
> -T
>
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