pawelrychlik/jira-dependency-graph

Problem with encoding when default encoding is ascii

niclasnors opened this issue · 0 comments

Hi,
Noticed when I was running this script toward our Jira instant that we had fields that could be encoded in other characters that was not always within the range of ascii.

Did test out the following addition to make sure it got formatted as UTF-8 instead, which seems to work fine:

Line 99:
if islink: return '"{}\\n({})"'.format(issue_key.encode('utf-8'), summary.encode('utf-8')) return '"{}\\n({})" [href="{}", fillcolor="{}", style=filled]'.format(issue_key.encode('utf-8'), summary.encode('utf-8'), jira.get_issue_uri(issue_key).encode('utf-8'), get_status_color(status).encode('utf-8'))**

The only addition here is the .encode ('UTF-8') to overcome the error I had before regarding Ascii enconding failure.

If you think it sounds like a good option it would be nice to include