Handle non-ascii characters when generating fuzzing dictionary
This caused a failure when generating the dictionary for `tree-sitter-agda`.
This commit is contained in:
parent
71d8d79425
commit
f019cb2f0e
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ def main():
|
|||
|
||||
for lit in sorted(literals):
|
||||
if lit:
|
||||
print '"%s"' % ''.join([(c if c.isalnum() else '\\x%02x' % ord(c)) for c in lit])
|
||||
print '"%s"' % ''.join(['\\x%02x' % ord(b) for b in lit.encode('utf-8')])
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue