Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the SVN-Notify CPAN distribution.

Report information
The Basics
Id: 31019
Status: rejected
Priority: 0/
Queue: SVN-Notify

People
Owner: Nobody in particular
Requestors: sarcone [...] mac.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: SVN-Notify script fails with certain UTF-8 chars
Date: Tue, 27 Nov 2007 16:33:51 -0800
To: bug-SVN-Notify [...] rt.cpan.org
From: Chris Sarcone <sarcone [...] mac.com>
Hi -- I'd like to report a bug against SVN-Notify. Specifically, the ColorDiff.pm script. We have files with certain UTF-8 characters in them which causes the ColorDiff.pm script to output the following errors: Warning: 'post-commit' hook failed with error output: utf8 "\xA9" does not map to Unicode at /Library/Perl/5.8.6/SVN/Notify/ HTML/ColorDiff.pm line 117, <PIPE> line 4. utf8 "\xA9" does not map to Unicode at /Library/Perl/5.8.6/SVN/Notify/ HTML/ColorDiff.pm line 117, <PIPE> line 6. It appears that ColorDiff.pm calls encode_entities() with a set of unsafe_chars set to "&<>"'. I believe the files I've seen the script return this mapping error on are: "•" = \x2022 "—" = \x2014 "©" = \xA9 "§" = \xA7 Should ColorDiff.pm add these characters to the available set of chars, or call encode_entities() without the unsafe_chars argument perhaps? Thanks, Chris Sarcone sarcone@mac.com
On Tue Nov 27 19:34:25 2007, sarcone@mac.com wrote: Show quoted text
> I'd like to report a bug against SVN-Notify. Specifically, the > ColorDiff.pm script. We have files with certain UTF-8 characters in > them which causes the ColorDiff.pm script to output the following > errors: > > Warning: 'post-commit' hook failed with error output: > utf8 "\xA9" does not map to Unicode at /Library/Perl/5.8.6/SVN/Notify/ > HTML/ColorDiff.pm line 117, <PIPE> line 4. > utf8 "\xA9" does not map to Unicode at /Library/Perl/5.8.6/SVN/Notify/ > HTML/ColorDiff.pm line 117, <PIPE> line 6. > > It appears that ColorDiff.pm calls encode_entities() with a set of > unsafe_chars set to "&<>"'. I believe the files I've seen the script > return this mapping error on are: > > "•" = \x2022 > "—" = \x2014 > "©" = \xA9 > "§" = \xA7 > > Should ColorDiff.pm add these characters to the available set of > chars, or call encode_entities() without the unsafe_chars argument > perhaps?
Hrm. My understanding of the second argument to `encode_entities()` is that it identifies which characters to escape. So SVN::Notify::HTML only escapes &, <, >, and ". All other characters are fine. So could it be that those characters you listed here are not actually utf-8? Because I cannot otherwise see where the problem would come from. Thanks, David
Subject: Re: [rt.cpan.org #31019] SVN-Notify script fails with certain UTF-8 chars
Date: Wed, 6 Feb 2008 17:42:56 -0800
To: bug-SVN-Notify [...] rt.cpan.org
From: Chris Sarcone <sarcone [...] mac.com>
David -- Show quoted text
> Hrm. My understanding of the second argument to `encode_entities()` is > that it identifies which characters to escape. So SVN::Notify::HTML > only > escapes &, <, >, and ". All other characters are fine. So could it be > that those characters you listed here are not actually utf-8? > Because I > cannot otherwise see where the problem would come from.
I looked into this more and sure enough, those aren't valid UTF-8 codes. Any plans to support some non-UTF-8 characters? -- Chris
Subject: Re: [rt.cpan.org #31019] SVN-Notify script fails with certain UTF-8 chars
Date: Wed, 6 Feb 2008 19:25:25 -0800
To: bug-SVN-Notify [...] rt.cpan.org
From: "David E. Wheeler" <david [...] justatheory.com>
On Feb 6, 2008, at 17:43, Chris Sarcone via RT wrote: Show quoted text
> I looked into this more and sure enough, those aren't valid UTF-8 > codes. > > Any plans to support some non-UTF-8 characters?
SVN::Notify supports whatever encoding you want. Check out the -- charset option. Best, David