R CARON is another good one
authorDan Scott <dan@coffeecode.net>
Fri, 29 Jul 2011 18:19:30 +0000 (14:19 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 7 May 2013 18:37:00 +0000 (14:37 -0400)
Signed-off-by: Dan Scott <dscott@laurentian.ca>
tools/ebooks/prep_ebook_records.py

index 79b1739..9fd228a 100644 (file)
@@ -378,14 +378,17 @@ def clean_diacritics(field):
         # COMBINING CEDILLA
         tmpsf = tmpsf.replace(u'\xb0c', u'c\u0327')
 
-        # S WITH COMBINING ACUTE ACCENT (lowercase)
-        tmpsf = tmpsf.replace(u'\xd4s', u'\u015b')
-        # S WITH COMBINING ACUTE ACCENT (uppercase)
+        # S WITH COMBINING ACUTE ACCENT
         tmpsf = tmpsf.replace(u'\xd4S', u'\u015a')
+        tmpsf = tmpsf.replace(u'\xd4s', u'\u015b')
 
         # COMBINING BREVE
         tmpsf = tmpsf.replace(u'\xe6i', u'i\u0306')
 
+        # R CARON
+        tmpsf = tmpsf.replace(u'\xdaR', u'\u0158')
+        tmpsf = tmpsf.replace(u'\xdar', u'\u0159')
+
         new_field.add_subfield(subfield[0], tmpsf)
         if r'\x' in repr(tmpsf):
             global RECORD_COUNT