Re: Malformed UTF-8?

2018-06-16 Thread ToddAndMargo
On Sat, Jun 16, 2018 at 1:09 AM ToddAndMargo > wrote: rakudo-pkg-Fedora28-2018.05-01.x86_64.rpm $ perl6 -v This is Rakudo version 2018.05 built on MoarVM version 2018.05 implementing Perl 6.c. What did I do wrong, this time? Malformed UTF-8

Re: Malformed UTF-8?

2018-06-16 Thread ToddAndMargo
On 06/16/2018 08:37 AM, The Sidhekin wrote: On Sat, Jun 16, 2018 at 5:19 PM, Brandon Allbery > wrote: Something's wrong with the data file you are reading. Perl 6 is expecting UTF-8 encoding and getting something else (usually an ISO-8859 encoding).   A

Re: IO ???

2018-06-16 Thread Xin Cheng
Thank you all for answering! Regards Ziping > On Jun 16, 2018, at 1:13 PM, Elizabeth Mattijsen wrote: > >> On 16 Jun 2018, at 10:59, Xin Cheng wrote: >> I am wondering why the IO::Path class doesn't have a "close" method. After I >> read from a file by >> >> $filename.IO.lines -> $line; >>

Re: IO ???

2018-06-16 Thread Elizabeth Mattijsen
> On 16 Jun 2018, at 10:59, Xin Cheng wrote: > I am wondering why the IO::Path class doesn't have a "close" method. After I > read from a file by > > $filename.IO.lines -> $line; > > Am I supposed to close the file, or it is automatically closed for me after > the reading? If you read all of

Re: IO ???

2018-06-16 Thread Brandon Allbery
If you're performing an I/O operation on an IO::Path, either it's a metadata operation (e.g. file tests) or you are operating on the whole file (e.g. .lines). In the former case there is no handle; in the latter, the handle exists only while .lines is active; that is, it exists only within the impl

Re: IO ???

2018-06-16 Thread Xin Cheng
I am wondering why the IO::Path class doesn't have a "close" method. After I read from a file by $filename.IO.lines -> $line; Am I supposed to close the file, or it is automatically closed for me after the reading? I tried something like $filename.IO.close; It is a runtime error. It seems to

Re: Malformed UTF-8?

2018-06-16 Thread The Sidhekin
On Sat, Jun 16, 2018 at 5:19 PM, Brandon Allbery wrote: > Something's wrong with the data file you are reading. Perl 6 is expecting > UTF-8 encoding and getting something else (usually an ISO-8859 encoding). > Are you sure it's a data file? I thought I recognized that code, and it was handlin

Re: Malformed UTF-8?

2018-06-16 Thread Brandon Allbery
Something's wrong with the data file you are reading. Perl 6 is expecting UTF-8 encoding and getting something else (usually an ISO-8859 encoding). On Sat, Jun 16, 2018 at 1:09 AM ToddAndMargo wrote: > rakudo-pkg-Fedora28-2018.05-01.x86_64.rpm > $ perl6 -v > This is Rakudo version 2018.05 built