summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2015-05-26 13:55:45 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2015-05-26 13:56:22 (GMT)
commitb4def397b3d73830bcd1a223f36bed50fe38c796 (patch)
tree43cb915d86e96df750c95c39726917cbaadb56f5
parent5f51402243dc688403078a5a3441569f6c0c254f (diff)
downloadtabellioOOo-b4def397b3d73830bcd1a223f36bed50fe38c796.zip
tabellioOOo-b4def397b3d73830bcd1a223f36bed50fe38c796.tar.gz
tabellioOOo-b4def397b3d73830bcd1a223f36bed50fe38c796.tar.bz2
combine unicode combining characters (#7356)
-rwxr-xr-xlegi2pdf/lib/legi2pdf/pdfGenerator.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/legi2pdf/lib/legi2pdf/pdfGenerator.py b/legi2pdf/lib/legi2pdf/pdfGenerator.py
index 95464d0..c42c89d 100755
--- a/legi2pdf/lib/legi2pdf/pdfGenerator.py
+++ b/legi2pdf/lib/legi2pdf/pdfGenerator.py
@@ -301,6 +301,19 @@ def convertLegi2Tex(input, outputFileName, annexes, d, draft=0, toc=True,
(u'&#x201C;', u'\guillemotleft'), (u'\u201C', u'«'),
(u'&#x201D;', u'\guillemotright'), (u'\u201D', u'»'),
(u'&#x2011;', u'-'), (u'\u2011', u'-'),
+ (u'a\u0300', u'à'),
+ (u'e\u0300', u'è'),
+ (u'u\u0300', u'ù'),
+ (u'e\u0301', u'é'),
+ (u'a\u0302', u'â'),
+ (u'e\u0302', u'ê'),
+ (u'i\u0302', u'î'),
+ (u'o\u0302', u'ô'),
+ (u'u\u0302', u'û'),
+ (u'e\u0308', u'ë'),
+ (u'i\u0308', u'ï'),
+ (u'i\u0308', u'ü'),
+ (u'c\u0327', u'ç'),
(u'TABELLIO--', u'\hyp{}'),]:
doc = doc.replace(before, after)