WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Problem with encoding when default encoding is ascii #53

@niclasnors

Description

@niclasnors

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions