I can not do the following;
my Buf $b = 'abc'.encode;
Type check failed in assignment to '$b'; expected 'Buf' but got 'utf8'

But I can do this;
my Buf $b = 'abc'.encode ~ Buf.new();
Buf:0x<61 62 63>

Does the concatenation convert utf8 into Buf? Will there be a problem when it is converted back to string with decode. I've tested a few simple utf strings which seem to decode right.


Reply via email to