[svk-devel] Re: How to fix "Can't decode commit message as ascii" ?

Axel Kollmorgen axel at kollmorgen.net
Sun Sep 30 10:31:10 EDT 2007

On 18.12.2006 23:20, Peter Murray wrote:
> On 12/15/06 10:31 AM, Peter Murray wrote:
>> I am trying to mirror a remote CVS repository using SVK and I am
>> stumbling up against a "Can't decode commit message as ascii." error.
>> I've tried svk 1.08 and the latest beta released a few days ago, and
>> both exhibit the same problem:
> With a problem to solve and no quick answers from this group or through
> web search and code inspection, I ended up suppressing the problem by
> going into the code and commenting out the 'die' statement that was
> triggering the error message.  Since my goal was to mirror the
> repository into Subversion without the log messages out of the CVS
> repository, this seems to work fine for me.  At some point it would be
> nice to correct the underlying issue, though, if anyone has any suggestions.

better: in lib/SVK/Util.pm, sub from_native(), change

  my $buf = eval { $enc->decode ($_[0], 1) };


  my $buf = eval { $enc->decode ($_[0], 0) };

that way, you *do* get the cvs commit message into svn, with "a
substitution character in place of a malformed character" [1]. it would
even be possible to determine or guess [2] the wrong source encoding and
properly decode it to svn.

[1] http://perldoc.perl.org/Encode.html#_CHECK_-=-Encode::FB_DEFAULT-(-==-0)
[2] http://perldoc.perl.org/Encode/Guess.html


More information about the svk-devel mailing list