By raiph
It turns out that the same NFG mechanism developed to support graphemes works for this non-grapheme scenario too:
“… POSIX doesn’t promise you’ll get UTF-8, or even ASCII. It promises … a bunch of bytes. We can now cope with this properly – surprisingly enough, thanks to the power of NFG. We now have a special encoding, UTF-8 Clean-8-bit, which turns bytes that are invalid as UTF-8 into synthetics, from which we can recover the original bytes again at output. This means that any filename, environment variable, and so forth can be roundtripped through Perl 6 problem-free. You can concat “.bak” onto the end of such a string, and it’ll still work out just fine.”
From https://6guts.wordpress.com/2015/11/21/what-one-christmas-el…
Read more here: https://news.ycombinator.com/item?id=10643130
raiph comments on "Perl 6 Introduction"
No comments:
Post a Comment