Skip to content

Commit 9b78f8a

Browse files
authored
Merge pull request jxmorris12#37 from aokellermann/bug/FixUnicode
Fix Unicode
2 parents 804fc31 + b07d1c4 commit 9b78f8a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎language_tool_python/match.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import unicodedata
12
from collections import OrderedDict
23
from functools import total_ordering
34

@@ -56,6 +57,8 @@ def __init__(self, attrib):
5657
attrib['replacements'] = [r['value'] for r in attrib['replacements']]
5758
# Rename error length.
5859
attrib['errorLength'] = attrib['length']
60+
# Normalize unicode
61+
attrib['message'] = unicodedata.normalize("NFKC", attrib['message'])
5962
# Store objects on self.
6063
for k, v in attrib.items():
6164
setattr(self, k, v)

0 commit comments

Comments
 (0)