Hi, I just started writing a new Python script called "Tiny Jira Exporter" (see https://github.com/bks07/tiny-jira-exporter) and am having trouble finding an answer.
My code looks like this:
self._issues = self._jira.search_issues(jql_query, maxResults=max_results)
...
for issue in self._issues:
summary = issue.fields.summary
However, whenever the summary contains a special character like German umlauts, things get complicated.
I also tried the following:
character_set = chardet.detect(summary.encode())
encoded_string = summary.encode(character_set["encoding"])
return_string = encoded_string.decode("utf-8")
And also this:
character_set = chardet.detect(summary.encode())
encoded_string = summary.encode(character_set["encoding"])
return_string = bytes(value,character_set["encoding"]).decode("utf-8")
However, it's not working and I cannot find an answer elsewhere.
Best, Boris
I solved the riddle. The strings were shown correctly when I displayed them via print(). However, the error occurred when writing them to CSV using the Panda module.
data_frame = pd.DataFrame.from_dict(data)
date_frame.to_csv(location, index=False, sep=";", encoding="latin-1")
Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.
Register today!Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.