-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Jira uses UTF-8 encoding for unicode characters. This means that some characters will take up multiple characters of space in the string. For example, π is considered 2 characters as it takes 4 bytes. With the current spec, it seems possible for some to take up 6 bytes which should be 3 characters? Although I couldn't find any examples of this.
We should adjust our string truncation to take this into account. I'm hoping there is some standard string encoding functiosn we can use to adjust this.
jira-bugzilla-integration/jbi/jira/utils.py
Lines 13 to 15 in ac3dec1
if max_length > 0 and len(jira_output) > max_length: | |
# Truncate on last word. | |
jira_output = jira_output[:max_length].rsplit(maxsplit=1)[0] |
Metadata
Metadata
Assignees
Labels
No labels