Isn't this a bug?
% blead -CS -le 'print qq(print "\xB0C";)'
print "°C";
% blead -CS -le 'print qq(print \x27\xB0C\x27;)'
print '°C';
% blead -C0 -le 'print qq(print "\xB0C";)' | blead -Mutf8 -CS -l
Malformed UTF-8 character (unexpected continuation byte 0xb0, with no preceding start byte) at - line 1.
C
% blead -C0 -le 'print qq(print \x27\xB0C\x27;)' | blead -Mutf8 -CS -l
#C
That is, it correctly detects the bad UTF-8 when
it's in double quotes, but not when it's in single ones.
Isn't this an error?
--tom
Thread Next