Skip Menu |

This queue is for tickets about the String-Escape CPAN distribution.

Report information
The Basics
Id: 19765
Status: resolved
Priority: 0/
Queue: String-Escape

People
Owner: EVO [...] cpan.org
Requestors: cebratcher [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2002.001
Fixed in: (no value)



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; }
Hello and thank you for the feedback on String::Escape, After a long delay, I have addressed this issue in version 2010.001 as follows: To avoid breaking existing code, I've left the output of the current functions the same, but I've added new backslash() / unbackslash() functions that use "correct" Perl-style hex escape sequences. -Simon