[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Converting CVS 2 SVN probs

From: Michael Wood <mwood_at_its.uct.ac.za>
Date: 2003-03-04 11:34:35 CET

On Tue, Mar 04, 2003 at 10:18:38AM +0100, mailing.lists@gmx.net wrote:
> hi
>
> i have a problem converting my cvs repo in svn.
>
> the convertign process starts normally;
> after a while this error is fired up:
>
> Traceback (most recent call last):
[snip]
> File "./cvs2svn.py", line 517, in commit
> l = unicode(log, ctx.encoding)
> UnicodeError: ASCII decoding error: ordinal not in range(128)
>
> as far as i understand is the log entry in the cvs too long for
> unicode. how can i solve this, so that the converting process will
> successfully ends?

No, it's not the log message that's too long. There is a character in
the log message that has a value greater than 127 and you're trying to
convert it from ascii, probably (the default encoding used by cvs2svn.)
I'm not up to speed on the whole character encoding and Unicode thing,
but I suspect you just need to pass --encoding=blah to cvs2svn, where
blah is something like iso8859-1 or whatever.

e.g.:
$ python
Python 2.1.3 (#1, Sep 7 2002, 15:29:56)
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> x = chr(200)
>>> unicode(x, 'ascii')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
UnicodeError: ASCII decoding error: ordinal not in range(128)
>>> unicode(x, 'iso8859-1')
u'\xc8'

-- 
Michael Wood <mwood@its.uct.ac.za>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 4 11:35:24 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.