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 (????).
jayvdb created this task.Sep 17 2014, 11:40 PM
XZise added a subscriber: XZise.May 24 2015, 10:48 AM

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.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 18 2015, 6:00 PM

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 closed this task as Resolved.Oct 2 2015, 9:49 AM
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.