This commit is contained in:
Kovid Goyal 2017-07-08 08:59:34 +05:30
parent 90cfbc5229
commit 42543e57ec
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -65,7 +65,6 @@ __docformat__ = 'restructuredtext en'
import re, string
from calibre.constants import preferred_encoding
from calibre.utils.mreplace import MReplace
utf8enc2latex_mapping = {
@ -2855,7 +2854,7 @@ class BibTeX:
# http://bibdesk.sourceforge.net/manual/BibDesk%20Help_2.html
self.invalid_cit = re.compile(u'[ "@\',\\#}{~%&$^]')
self.upper = re.compile(u'[' +
string.uppercase.decode(preferred_encoding) + u']')
string.ascii_uppercase + u']')
self.escape = re.compile(u'[~#&%_]')
def ValidateCitationKey(self, text):
@ -2929,4 +2928,3 @@ class BibTeX:
text.pop(i)
text = ''.join(text)
return text