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

Problem with encoding when default encoding is ascii #53

Open
niclasnors opened this issue Mar 27, 2023 · 0 comments
Open

Problem with encoding when default encoding is ascii #53

niclasnors opened this issue Mar 27, 2023 · 0 comments

Comments

@niclasnors
Copy link

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

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

No branches or pull requests

1 participant