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 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 <unit> at <unknown file>:1
Marcel