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: 18228
Status: resolved
Worked: 1.5 hours (90 min)
Priority: 0/
Queue: SVN-Notify

People
Owner: Nobody in particular
Requestors: tow [...] conject.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 2.53
  • 2.54
Fixed in: 2.55



Subject: SVN-Notifiy loops forever if it encounters a non UTF-8 char in the pipe from svnlook
Hi, first thanks for the great tool, it's really awesome! The problem I encountered is that svnnotify goes into an endless loop spitting out: utf8 "\xFC" does not map to Unicode at /usr/local/lib/perl5/site_perl/5.8.6/SVN/Notify/HTML/ColorDiff.pm line 117, <PIPE> line 70. We run svnnotify with --charset utf-8. The reason for this is, that we have text files with different encodings in our repository, most of them are utf-8 encoded (xml, templates...) but some (java sources, properties files) are iso8859-1 encoded. Now in this case there was a commit that included a java file with a german umlaut character in it (which maps to \xFC in ISO8859-1 and is not parseable as utf-8), so the error is understandable and correct. What is really annoying is that it keeps svnnotifiy from terminating and causes the commit to hang if it's run from the post-commit hook. For now I don't really care whether the umlaut is shown in the resulting mail correctly or not, so just mapping any unreadable char from the svnlook output to something like a '?' char would be fine. I am currently trying to pipe svnlook output through some custom script that 'sanitizes' the svnlook output to valid utf-8, but it would be nice if svnnotify would handle this gracefully! Cheers, Tobias
Subject: Re: [rt.cpan.org #18228] SVN-Notifiy loops forever if it encounters a non UTF-8 char in the pipe from svnlook
Date: Sun, 19 Mar 2006 11:15:30 -0800
To: bug-SVN-Notify [...] rt.cpan.org
From: David Wheeler <david [...] kineticode.com>
On Mar 18, 2006, at 06:10, Guest via RT wrote: Show quoted text
> I am currently trying to pipe svnlook output through some custom > script > that 'sanitizes' the svnlook output to valid utf-8, but it would be > nice > if svnnotify would handle this gracefully!
Hrm, I'm not sure how to handle this properly, unless it's to just tell svnnotify to assume binary files. Then the characters won't show up properly in your email, but at least it shouldn't choke anymore. So let's see if the :raw IO layer works for you. Please try this patch. Index: Notify.pm =================================================================== --- Notify.pm (revision 2726) +++ Notify.pm (working copy) @@ -1629,7 +1643,7 @@ if ($pid) { # Parent process. Set the encoing layer and return the file handle. - binmode(PIPE, ':encoding(' . $self->charset . ')') if PERL58; + binmode PIPE, ':raw' if PERL58; return *PIPE; } else { # Child process. Execute the commands. Let me know if it works. If it does, I'll add a feature to SVN::Notify that supports the :raw IO layer. Best, David
On Sun Mar 19 14:15:49 2006, david@kineticode.com wrote: Show quoted text
> On Mar 18, 2006, at 06:10, Guest via RT wrote: > > So let's see if the :raw IO layer works for you. Please try this
patch. Show quoted text
>
Hi, thanks for the quick response! Yes, this solves the "being stuck" problem! Of course the iso8859-1 characters are shown garbled in the mail, but that's expected... All UTF-8 contents show up correct. For the time being this is really everything that I expect SVN-Notify to handle. Producing a _consistent_ output in a given charset is something tha svn should provide, but unfortunately the support for different character sets in svn is very weak...let's hope that svn handling of text content will improve in the future with something like keeping some encoding information per file treated as text... It would be great, if you could add this as some sort of switch to future versions! Thanks, Tobi
Subject: Re: [rt.cpan.org #18228] SVN-Notifiy loops forever if it encounters a non UTF-8 char in the pipe from svnlook
Date: Mon, 20 Mar 2006 09:00:52 -0800
To: bug-SVN-Notify [...] rt.cpan.org
From: David Wheeler <david [...] kineticode.com>
On Mar 20, 2006, at 07:09, Guest via RT wrote: Show quoted text
> It would be great, if you could add this as some sort of switch to > future versions!
The next version will have a new option, --io-layer, which you should set to "raw". Best, David
Check out the new --io-layer option added in 2.55. Set it to 'raw' to get the same behavior as in the patch I sent to you.