1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #433 resolved

visdiff: UnicodeEncodeError: 'ascii' codec can't encode character u'\xed'

Anonymous created an issue

{{{

!python

Mercurial version (1.8.1). TortoiseHg version (2.0.2) Command: --nofork vdiff CWD: R:\VFPjobs\REVIDA\PROV09 Extensions loaded: fixfrozenexts Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] Windows version: (6, 1, 7601, 2, 'Service Pack 1') Processor architecture: x86 Qt-4.7.1 PyQt-4.8.2 Traceback (most recent call last): File "tortoisehg\hgqt\run.pyo", line 469, in call File "tortoisehg\hgqt\visdiff.pyo", line 612, in run File "tortoisehg\hgqt\visdiff.pyo", line 348, in visualdiff File "tortoisehg\hgqt\visdiff.pyo", line 342, in dodiffwrapper File "tortoisehg\hgqt\visdiff.pyo", line 331, in dodiff File "tortoisehg\hgqt\visdiff.pyo", line 134, in launchtool File "subprocess.pyo", line 623, in init File "subprocess.pyo", line 833, in _execute_child UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 89: ordinal not in range(128)

}}}

Comments (14)

  1. Asion Tang

    I Get The Same Bug!

    This is mine:

    ** Mercurial version (1.8.1).  TortoiseHg version (2.0.2)
    ** Command: --nofork workbench
    ** CWD: D:\MyDocument\Documents\我的项目\MyProjects\SMS Shower
    ** Extensions loaded: fixfrozenexts, win32mbcs, win32text, convert, fold
    ** Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
    ** Windows version: (6, 1, 7601, 2, 'Service Pack 1')
    ** Processor architecture: x86
    ** Qt-4.7.1 PyQt-4.8.2
    Traceback (most recent call last):
      File "tortoisehg\hgqt\archive.pyo", line 260, in update_path
      File "tortoisehg\hgqt\archive.pyo", line 240, in add_rev
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 24: ordinal not in range(128)
    Traceback (most recent call last):
      File "tortoisehg\hgqt\repowidget.pyo", line 1242, in archiveRevision
      File "tortoisehg\hgqt\archive.pyo", line 161, in __init__
      File "tortoisehg\hgqt\archive.pyo", line 260, in update_path
      File "tortoisehg\hgqt\archive.pyo", line 240, in add_rev
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 24: ordinal not in range(128)
    

    To Steve Borho: I just didn't known WHERE to set HGENCODING=utf8 in my environment ,i have tried to set it in the [tortoisehg] or in the [extensions], but it doesn't works . if this setting could make the crash go away,please help me. thanks.

  2. Asion Tang

    I'm a beginner, with your help , i have tried to set my environment like this:
    hg --encoding utf8
    but it give me no feedback imformation what made me confused ,whether i have done it right. i also try to find out is there something changed in the "mercurial.ini" ,finally nothing.
    Could you please give me more materials ,let me know what things the '--encoding' setting doing.
    I just want to covert my SVN project to hg ,and this is my command and exception

    C:\>hg convert "file:///D:/MyDocument/Documents/我的项目/YeProjects/时间提醒软件
    "
    win32text is deprecated: http://mercurial.selenic.com/wiki/Win32TextExtension
    ** unknown exception encountered, please report by visiting
    **  http://mercurial.selenic.com/wiki/BugTracker
    ** Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
    ** Mercurial Distributed SCM (version 1.8.1)
    ** Extensions loaded: fixfrozenexts, win32mbcs, win32text, progress, fold, rebas
    e, convert, transplant
    Traceback (most recent call last):
      File "hg", line 36, in <module>
      File "mercurial\dispatch.pyo", line 16, in run
      File "mercurial\dispatch.pyo", line 36, in dispatch
      File "mercurial\dispatch.pyo", line 58, in _runcatch
      File "mercurial\dispatch.pyo", line 601, in _dispatch
      File "mercurial\dispatch.pyo", line 406, in runcommand
      File "mercurial\dispatch.pyo", line 655, in _runcommand
      File "mercurial\dispatch.pyo", line 609, in checkargs
      File "mercurial\dispatch.pyo", line 598, in <lambda>
      File "mercurial\util.pyo", line 433, in check
      File "hgext\convert\__init__.pyo", line 269, in convert
      File "hgext\convert\convcmd.pyo", line 409, in convert
      File "hgext\convert\convcmd.pyo", line 56, in convertsource
      File "hgext\convert\subversion.pyo", line 239, in __init__
      File "hgext\convert\transport.pyo", line 88, in __init__
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 32: ordinal
     not in range(128)
    


    with your help ,i went to see CharacterEncodingOnWindows ,issue the command 'chcp' get my windows console code page is '936' ,as you know ,i'm a Chinese.by the way,i also changed my code page to 'chcp 65001' ,at the wiki i learn that cp65001 just like the utf8,that is why i use it. and then i convert my SVN project like above command, it give me a new exception i had show in the follow picture.

    It makes me so depressed, i will wait for your reply.

  3. Anonymous

    After setting environment variable HGENCODING=utf-8, my tortoisehg2.0.3 works. Before set the environment variable, I also encounted the problem and couldn't use any function in visual interface.

  4. Anonymous
    ** Mercurial version (1.8.3).  TortoiseHg version (2.0.4)
    ** Command: --nofork userconf
    ** CWD: F:\侠义世界\webzhuxian
    ** Extensions loaded: fixfrozenexts
    ** Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
    ** Windows version: (6, 1, 7600, 2, '')
    ** Processor architecture: x86
    ** Qt-4.7.1 PyQt-4.8.3
    Traceback (most recent call last):
      File "tortoisehg\hgqt\settings.pyo", line 79, in showPopup
      File "tortoisehg\hgqt\settings.pyo", line 241, in findMergeTools
      File "tortoisehg\util\hglib.pyo", line 380, in mergetools
      File "mercurial\filemerge.pyo", line 32, in _findtool
      File "mercurial\win32.pyo", line 206, in lookup_reg
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xb9 in position 3: ordinal not in range(128)
    

    the same

  5. Log in to comment