Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: fix for utf-8 support in input files #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Spenser309
Copy link

@Spenser309 Spenser309 commented Sep 17, 2020

Allow input files with utf-8 encoding. Seeing the following without this patch and a utf-8 char in the XML input.

00:13:46.300  + xunitmerge junit-premerge-0.xml junit-premerge-1.xml junit-premerge-2.xml junit-premerge-3.xml junit.xml
00:13:46.300  Traceback (most recent call last):
00:13:46.300    File "/usr/local/bin/xunitmerge", line 26, in <module>
00:13:46.300      merge_xunit(args.report, args.output)
00:13:46.300    File "/usr/local/lib/python3.6/dist-packages/xunitmerge/xmerge.py", line 120, in merge_xunit
00:13:46.300      trees.append(etree.parse(f))
00:13:46.300    File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 1196, in parse
00:13:46.300      tree.parse(source, parser)
00:13:46.300    File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 597, in parse
00:13:46.300      self._root = parser._parse_whole(source)
00:13:46.300    File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
00:13:46.300      return codecs.ascii_decode(input, self.errors)[0]
00:13:46.300  UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 3636: ordinal not in range(128)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant