Hi Marcel,
On 06/18/2015 11:17 AM, mt1957 wrote:
Sorry I've been too fast, It's in the doc. However, why can't I assign
it to a Buf with automatic coercion from utf8 to Buf which is more generic?
The docs are wrong; it should be Blob, not Buf.
I've fixed it in
https://github.com/perl6/doc/com
Sorry I've been too fast, It's in the doc. However, why can't I assign
it to a Buf with automatic coercion from utf8 to Buf which is more generic?
Marcel
On 06/18/2015 11:12 AM, mt1957 wrote:
L.s.
At http://doc.perl6.org/type/Str#method_encode it says that string
encoding returns a Buf.
It
L.s.
At http://doc.perl6.org/type/Str#method_encode it says that string
encoding returns a Buf.
It returns a utf8 instead see repl session below.
> my Str $s = 'abcdef';
abcdef
> my Buf $b = $s.encode;
Type check failed in assignment to '$b'; expected 'Buf' but got 'utf8'
in block at :1
M