Ticket #87 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

cvs --> mercurial: Configuration error: 'ascii' codec can't encode character u'\xdc'

Reported by: ThurnerRupert Owned by: lele
Priority: major Milestone: VersionOne
Component: tailor Version: 0.9
Keywords: Cc:

Description

what could make tailor think reverting to "ascii" is wise?

17:19:09 [C] Upstream change application failed
Configuration error: 'ascii' codec can't encode character u'\xdc' in position 11: ordinal not in range(128): it seems that the encoding used by either the source ("ISO8859-1") or the target ("UTF-8") repository cannot properly represent at least one of the characters in the upstream changelog. You need to use a wider character set, using "encoding" option, or even "encoding-errors-policy".

we also tried to hardcode the encoding to UTF-8. the effect was that source and target are stated as "UTF-8" (which is not true) and the same "ascii" error.

the log message of that change was empty, the only strange thing i see was that a windows cvs client removed a file called "~$$CSS Übersicht.~vsd"

cvs to mercurial synch happens on unix, creating the file with escaping by "\" works as shown below:

$ locale
LANG=
LC_CTYPE="en_US.ISO8859-1"
LC_NUMERIC="en_US.ISO8859-1"
LC_TIME="en_US.ISO8859-1"
LC_COLLATE="en_US.ISO8859-1"
LC_MONETARY="en_US.ISO8859-1"
LC_MESSAGES="en_US.ISO8859-1"
LC_ALL=en_US.ISO8859-1
$ touch "~\$\$CSS Übersicht.~vsd"
$ ls
~$$CSS Übersicht.~vsd        

hg version is 0.9.1, or 0.9.2 (with patch from #86).

Change History

comment:1 Changed 6 years ago by edgar.alves

I've already sent the patch to lele, but here is the diff in case you're in a hurry:

  • vcpx/changes.py

    diff -rN -u old-tailor/vcpx/changes.py new-tailor/vcpx/changes.py
    old new  
    5454        else: 
    5555            s += ' from ' + self.old_name 
    5656        s += ')' 
     57        if isinstance(s, unicode): 
     58            s = s.encode('ascii', 'replace') 
    5759        return s 

comment:2 Changed 6 years ago by lele

  • Status changed from new to closed
  • Resolution set to fixed

I applied Edgar's patch, as in [1303].

comment:3 Changed 6 years ago by ThurnerRupert

thanks a lot, it works now!

Note: See TracTickets for help on using tickets.