Python Mercurial审查委员会Unicodeincodeer:&x27;charmap';编解码器可以';t编码字符u'\ufffd&x27;在位置31:字符映射到<;未定义>;

Python Mercurial审查委员会Unicodeincodeer:&x27;charmap';编解码器可以';t编码字符u'\ufffd&x27;在位置31:字符映射到<;未定义>;,python,python-3.x,python-2.7,mercurial,Python,Python 3.x,Python 2.7,Mercurial,我似乎在mercurial中打开了一个.py文件(使用记事本++),只是出于好奇,想检查mercurial hg扩展如何工作,我现在无法使用review board:这是我面临的错误。我甚至替换了reviewboard文件夹,但编译后的python文件似乎产生了问题。 如果有办法重新编译这些文件以重置编码,我很高兴: chcp 65001 set PYTHONIOENCODING=utf-8 我还尝试在我的windows命令行上按某些帖子中的建议设置编码,以解决编码问题: #!python *

我似乎在mercurial中打开了一个.py文件(使用记事本++),只是出于好奇,想检查mercurial hg扩展如何工作,我现在无法使用review board:这是我面临的错误。我甚至替换了reviewboard文件夹,但编译后的python文件似乎产生了问题。 如果有办法重新编译这些文件以重置编码,我很高兴:

chcp 65001
set PYTHONIOENCODING=utf-8
我还尝试在我的windows命令行上按某些帖子中的建议设置编码,以解决编码问题:

#!python
** Mercurial version (4.6.1).  TortoiseHg version (4.6.1)
** Command: --nofork workbench
** CWD: C:\hiteshi\Latest\GM_dev
** Encoding: cp1252
** Extensions loaded: fetch, gestalt, kilnauth, big-push, kiln, caseguard, hgflow, strip, mq, reviewboard, histedit, shelve, largefiles, tortoisehg.util.configitems
** Python version: 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='')
** Processor architecture: x64
** Qt-5.9.2 PyQt-5.9.1 QScintilla-2.10.2.dev1711012104
Traceback (most recent call last):
  File "tortoisehg\hgqt\postreview.pyo", line 361, in accept
  File "tortoisehg\hgqt\postreview.pyo", line 274, in postReviewOpts
  File "tortoisehg\hgqt\postreview.pyo", line 263, in getSummary
  File "tortoisehg\util\hglib.pyo", line 117, in fromunicode
  File "encodings\cp1252.pyo", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\ufffd' in position 31: character maps to <undefined>
#!python
**Mercurial版本(4.6.1)。乌龟版(4.6.1)
**命令:--nofork工作台
**CWD:C:\hiteshi\Latest\GM\u dev
**编码:cp1252
**加载的扩展名:fetch、格式塔、kilnauth、大推送、kill、caseguard、hgflow、strip、mq、reviewboard、histedit、shelve、largefiles、tortoisehg.util.configitems
**Python版本:2.7.13(v2.7.13:a06454b1afa1,2016年12月17日,20:53:40)[MSC v.1500 64位(AMD64)]
**Windows版本:sys.getwindowsversion(主版本=6,次版本=2,内部版本=9200,平台版本=2,服务包版本=“”)
**处理器架构:x64
**Qt-5.9.2 PyQt-5.9.1 QSCINTILA-2.10.2.dev1711012104
回溯(最近一次呼叫最后一次):
文件“tortoisehg\hgqt\postreview.pyo”,第361行,在accept中
PostReviewPts中第274行的文件“tortoisehg\hgqt\postreview.pyo”
getSummary中第263行的文件“tortoisehg\hgqt\postreview.pyo”
fromunicode格式的文件“tortoisehg\util\hglib.pyo”,第117行
文件“encodings\cp1252.pyo”,第12行,编码
UnicodeEncodeError:“charmap”编解码器无法对位置31中的字符u'\ufffd'进行编码:字符映射到

我们发现了一个问题,即中的Tortoise Hg更新版本(4.6)与审查委员会版本不兼容,似乎这个问题已经在Tortoise Hg论坛上提出。。解决方案1)将Hg恢复到以前的版本4.5。或者2)使用导出到补丁选项手动更新审查板

您可以重新安装Mercurial来修复此问题吗?正准备这样做,但考虑过询问是否有更好的方法来完成此操作,花费更少的时间。无论如何,谢谢。我们收到了问题,Tortoise Hg更新版(4.6)在与审查委员会版本不兼容的情况下,这个问题似乎已经在Tortoise Hg论坛上提出。。解决方案1)将Hg恢复到以前的版本4.5。或2)使用导出到补丁选项手动更新审查板