Page MenuHomePhabricator

codec encoding problems on win32
Closed, DuplicatePublic

Description

When running tests on windows, without setting config.transliteration_target in user_config, the following encoding problem appear.

ERROR: testReprUnicode (tests.page_tests.TestPageObject)

Traceback (most recent call last):

File "c:\pywiki\core\tests\page_tests.py", line 451, in testReprUnicode
  s = repr(page)
File "c:\pywiki\core\pywikibot\page.py", line 253, in __repr__
  self.title().encode(config.console_encoding))
File "c:\Python34\lib\encodings\cp850.py", line 12, in encode
  return codecs.charmap_encode(input,errors,encoding_map)

UnicodeEncodeError: 'charmap' codec can't encode character '\u014c' in position 0: character maps to <undefined>


Version: core-(2.0)
Severity: normal
OS: Windows XP

Details

Reference
bz70976

Event Timeline

• bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:52 AM
• bzimport set Reference to bz70976.
• bzimport added a subscriber: Unknown Object (????).

Why is this Python 3 specific? When the codec does not support a certain character in the title it'll also fail in Python 2.

Why is this Python 3 specific? When the codec does not support a certain character in the title it'll also fail in Python 2.

Umm, I forget.

XZise claimed this task.

Afaik this has been solved with 38589d30. And if we do want to solve it properly (see T66958) this problem cannot appear anyway.