Subject: | Printable function does not return hex represented values |
Strings::Escape::Printable returns an octal representation rather than
the defined hex.
An easy to read fix would be to replace the substitution in the
printable subroutine:
s/([\r\n\t\"\\\x00-\x1f\x7F-\xFF])/\\$Printable{$1}/sg;
With:
if ( /[\r\n\t\"\\]/ ){
s/([\r\n\t\"\\])/\\$Printable{$1}/sg;
}
else {
s/([\x00-\x1f\x7F-\xFF])/\\x$Printable{$1}/sg;
}