tumstech / cc2svn

Automatically exported from code.google.com/p/cc2svn
0 stars 0 forks source link

ERROR: 'ascii' codec can't decode byte 0x96 in position 24: ordinal not in range(128) #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
 Trying to migrate clearcase to svn.
I was getting "ERROR: 'ascii' codec can't decode byte 0x96 in position 24:
ordinal not in range(128)"

Modified the script to print dump : 
./cc2svn.py -run
Traceback (most recent call last):
  File "./cc2svn.py", line 927, in main
    converter.process(ccRecord)
  File "./cc2svn.py", line 618, in process
    self.setRevisionProps(ccRecord)
  File "./cc2svn.py", line 532, in setRevisionProps
    self.revProps.setMessage(ccRecord.comment)
  File "./cc2svn.py", line 461, in setMessage
    self.properties.set("svn:log", toUTF8(message));
  File "./cc2svn.py", line 198, in toUTF8
    return codecs.utf_8_encode(text)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0x96 in position 24:
ordinal not in range(128)
2009/11/16 18:33:57: ERROR: 'ascii' codec can't decode byte 0x96 in
position 24: ordinal not in range(128)

Original issue reported on code.google.com by zenpr...@gmail.com on 16 Nov 2009 at 1:55

GoogleCodeExporter commented 9 years ago
It was failing as the clearcase file has a special character in check in 
comment.
"Resolution for Bugzilla � Bug 430"

Original comment by zenpr...@gmail.com on 17 Nov 2009 at 12:16

GoogleCodeExporter commented 9 years ago
I've run into this same problem and it appears also to be caused by files 
having non utf8 characters in them.  Shouldn't the file contents just be passed 
through verbatim?

This also makes me wonder if filenames with non utf8 characters would cause 
problems as well.

A proper fix for this would probably require the incoming code page to be 
specified, though even that could be wrong.

Original comment by trent.a....@gmail.com on 18 Jun 2010 at 11:39

GoogleCodeExporter commented 9 years ago
Some fixes handling comments and filenames with swedish characters:
- Print stacktrace on errors
- Try decoding cc commit comments using ascii, utf8 and latin1 (iso-8859-1)
- Try decoding cc filenames and encode in utf8 in svndump.txt
- Escape ' with '\'' in filenames in cleartool get shell

Original comment by m3037...@gmail.com on 27 Apr 2012 at 9:17

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks. The patch applied in r10

Original comment by vadim.go...@gmail.com on 13 May 2012 at 8:45