From: Dan Scott Date: Fri, 29 Jul 2011 21:54:08 +0000 (-0400) Subject: Replace C with acute accent as well X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c3d105a52fa082002b4b9af2b5f5fe5bdaf6ac3a;p=contrib%2FConifer.git Replace C with acute accent as well Signed-off-by: Dan Scott --- diff --git a/tools/ebooks/prep_ebook_records.py b/tools/ebooks/prep_ebook_records.py index 5c0af4d470..43d756e3b9 100644 --- a/tools/ebooks/prep_ebook_records.py +++ b/tools/ebooks/prep_ebook_records.py @@ -363,12 +363,21 @@ def clean_diacritics(field): # Let the substitutions commence - maybe move to a map table? # COMBINING MACRON - tmpsf = subfield[1].replace(u'\xd5a', u'a\u0304') + tmpsf = subfield[1].replace(u'\xd5A', u'A\u0304') + tmpsf = tmpsf.replace(u'\xd5a', u'a\u0304') + tmpsf = tmpsf.replace(u'\xd5E', u'E\u0304') tmpsf = tmpsf.replace(u'\xd5e', u'e\u0304') + tmpsf = tmpsf.replace(u'\xd5I', u'I\u0304') tmpsf = tmpsf.replace(u'\xd5i', u'i\u0304') + tmpsf = tmpsf.replace(u'\xd5O', u'O\u0304') tmpsf = tmpsf.replace(u'\xd5o', u'o\u0304') + tmpsf = tmpsf.replace(u'\xd5U', u'U\u0304') tmpsf = tmpsf.replace(u'\xd5u', u'u\u0304') + # LATIN LETTER C WITH ACUTE + tmpsf = tmpsf.replace(u'\xd4C', u'\u0106') + tmpsf = tmpsf.replace(u'\xd4c', u'\u0107') + # COMBINING MODIFIER LETTER HALF RING tmpsf = tmpsf.replace(u'\xb1', u'\u02be')