mirror of https://github.com/CGAL/cgal
decode is not available in python 3
trivial bugfix for master
This commit is contained in:
parent
63945bdac9
commit
aac974b83d
|
|
@ -142,7 +142,7 @@ def protect_upper_case(title):
|
||||||
def protect_accentuated_letters(authors):
|
def protect_accentuated_letters(authors):
|
||||||
res=authors.replace(u"é",r"{\'e}").replace(u"ä",r"{\"a}").replace(u"ö",r"{\"o}").replace(u"ñ",r"{\~n}").replace(u"ã",r"{\~a}").replace(u"ë",r"{\"e}").replace("%","")
|
res=authors.replace(u"é",r"{\'e}").replace(u"ä",r"{\"a}").replace(u"ö",r"{\"o}").replace(u"ñ",r"{\~n}").replace(u"ã",r"{\~a}").replace(u"ë",r"{\"e}").replace("%","")
|
||||||
try:
|
try:
|
||||||
res.decode('ascii')
|
res.encode('ascii')
|
||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
stderr.write("WARNING: a non ascii character has been found in author string for bibtex (probably a non-handled accentuated letter)."
|
stderr.write("WARNING: a non ascii character has been found in author string for bibtex (probably a non-handled accentuated letter)."
|
||||||
"Check the new package added and update the function protect_accentuated_letters in Documentation/scripts/generate_how_to_cite.py\n\n")
|
"Check the new package added and update the function protect_accentuated_letters in Documentation/scripts/generate_how_to_cite.py\n\n")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue