Skip to content

Commit 6ff8deb

Browse files
committed
Add code to handle encoding issue.
1 parent e981f3d commit 6ff8deb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

about_code_tool/genabout.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,11 @@ def format_output(input_list):
611611
value = about_dict_list[item].replace('\n', '\n ')
612612
if (value or item in about.MANDATORY_FIELDS) and not item\
613613
in about.ERROR_WARN_FIELDS and not item == 'about_resource':
614+
# It will cause error if value has different coding
615+
try:
616+
value = unicode(value, errors='ignore')
617+
except:
618+
pass
614619
context += item + ': ' + value + '\n'
615620

616621
component.append(about_file_location)

0 commit comments

Comments
 (0)