From 7415707c3399ce128e073e089debeec494cf8982 Mon Sep 17 00:00:00 2001 From: Denis Kuzmenok Date: Thu, 13 Jan 2022 21:52:50 +0100 Subject: [PATCH] Added a try/except to catch unicode errors. --- burst/normalize.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/burst/normalize.py b/burst/normalize.py index bc67ee35..ada2aa93 100644 --- a/burst/normalize.py +++ b/burst/normalize.py @@ -184,20 +184,23 @@ def normalize_string(string, charset=None, replacing=False): string = unicode(string, errors='ignore') pass - string = remove_control_chars(string) - string = fix_bad_unicode(string) - string = unquote(string) - string = string.replace(u'