YAML-PP-p5 icon indicating copy to clipboard operation
YAML-PP-p5 copied to clipboard

dump_string must not care about Perl's internal representation of a variable

Open 2shortplanks opened this issue 5 years ago • 26 comments

As of 0.0016 dump string actually cares what the internal UTF8 flag of a scalar is set to and behaves differently depending on what state it is in.

Perl's current internal representation should have no user visible effects. A library should be able to return a scalar containing the bytes \x{C3}\x{A9} with the UTF8 flag off, or a scalar containing \x{C3}\x{83}\x{C2}\x{A9} with the UTF8 flag on, and both be considered the byte sequence for é when decoded as UTF-8.

2shortplanks avatar May 20 '19 12:05 2shortplanks