The way I expect it to work, is that Unicode strings don't get encodings, but byte buffers and I/O handles do. If you give a Buf an encoding, you can treat it as a Str, as long as the encoding is consistent. Using a real Str may perform much better, because Perl 6 can encode it internally however it wishes, and can make many more assumptions (for optimization purposes).
Giving a Unicode string an "encoding" property is the wrong way around, but it can take quite some time and experience before one realises that.
In reply to Re^5: How to reverse a (Unicode) string
by Juerd
in thread How to reverse a (Unicode) string
by moritz
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |