From 6f29ab9b025c153f5e33a89007b248deb09f0868 Mon Sep 17 00:00:00 2001 From: Christophe Demko Date: Fri, 3 Jun 2016 16:57:29 +0200 Subject: [PATCH] Converting to unicode --- pandoc_numbering.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandoc_numbering.py b/pandoc_numbering.py index ce3348a..298cba1 100644 --- a/pandoc_numbering.py +++ b/pandoc_numbering.py @@ -13,7 +13,6 @@ import re import unicodedata import subprocess -from unidecode import unidecode count = {} information = {} @@ -54,7 +53,7 @@ def toJSONFilters(actions): json.dump(altered, sys.stdout) def removeAccents(string): - nfkd_form = unicodedata.normalize('NFKD', unicode(string, 'utf-8')) + nfkd_form = unicodedata.normalize('NFKD', u'' + string) return u"".join([c for c in nfkd_form if not unicodedata.combining(c)]) def toIdentifier(string):