From b6fe7af0c81093fe7d37327212d011ad354e0f5a Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 24 Jun 2003 23:07:14 +0000 Subject: [PATCH] * src/plugins/WriteGedcom.py: Allow iso-8859-1 (ANSI) encoding * src/plugins/gedcomexport.glade: Allow iso-8859-1 (ANSI) encoding svn: r1772 --- gramps2/src/plugins/WriteGedcom.py | 7 +++ gramps2/src/plugins/gedcomexport.glade | 73 +++++++++++++++----------- 2 files changed, 49 insertions(+), 31 deletions(-) diff --git a/gramps2/src/plugins/WriteGedcom.py b/gramps2/src/plugins/WriteGedcom.py index 7e8e83090..1184f1c09 100644 --- a/gramps2/src/plugins/WriteGedcom.py +++ b/gramps2/src/plugins/WriteGedcom.py @@ -62,6 +62,9 @@ from QuestionDialog import ErrorDialog def keep_utf8(s): return s +def iso8859(s): + return s.encode('iso-8859-1') + #------------------------------------------------------------------------- # # Calendar month names @@ -447,6 +450,8 @@ class GedcomWriter: if self.topDialog.get_widget("ansel").get_active(): self.cnvtxt = ansel_utf8.utf8_to_ansel + elif self.topDialog.get_widget("ansi").get_active(): + self.cnvtxt = iso8859 else: self.cnvtxt = keep_utf8 @@ -557,6 +562,8 @@ class GedcomWriter: self.g.write("1 DATE %s %s %s\n" % (date[2],string.upper(date[1]),date[4])) if self.cnvtxt == ansel_utf8.utf8_to_ansel: self.g.write("1 CHAR ANSEL\n") + elif self.cnvtxt == iso8859: + self.g.write("1 CHAR ANSI\n") else: self.g.write("1 CHAR UTF-8\n") self.g.write("1 SUBM @SUBM@\n") diff --git a/gramps2/src/plugins/gedcomexport.glade b/gramps2/src/plugins/gedcomexport.glade index 3f5b225b1..833ea3f88 100644 --- a/gramps2/src/plugins/gedcomexport.glade +++ b/gramps2/src/plugins/gedcomexport.glade @@ -91,7 +91,7 @@ 12 True - 11 + 12 3 False 6 @@ -144,8 +144,8 @@ 2 3 - 6 - 7 + 7 + 8 fill @@ -172,8 +172,8 @@ 1 2 - 6 - 7 + 7 + 8 fill @@ -200,8 +200,8 @@ 1 2 - 7 - 8 + 8 + 9 fill @@ -230,8 +230,8 @@ 2 3 - 7 - 8 + 8 + 9 fill @@ -258,8 +258,8 @@ 1 2 - 8 - 9 + 9 + 10 fill @@ -306,8 +306,8 @@ 2 3 - 8 - 9 + 9 + 10 fill @@ -378,8 +378,8 @@ 0 3 - 5 - 6 + 6 + 7 fill @@ -400,8 +400,8 @@ 1 3 - 9 - 10 + 10 + 11 fill @@ -422,8 +422,8 @@ 1 3 - 10 - 11 + 11 + 12 fill @@ -473,6 +473,29 @@ + + + + 2 + True + True + AN_SI (ISO-8859-1) + True + GTK_RELIEF_NORMAL + True + False + True + ansel + + + 1 + 3 + 5 + 6 + fill + + + 0 @@ -655,10 +678,6 @@ GTK_PROGRESS_LEFT_TO_RIGHT 0 0.1 - False - False - 0.5 - 0.5 1 @@ -675,10 +694,6 @@ GTK_PROGRESS_LEFT_TO_RIGHT 0 0.1 - False - False - 0.5 - 0.5 1 @@ -695,10 +710,6 @@ GTK_PROGRESS_LEFT_TO_RIGHT 0 0.1 - False - False - 0.5 - 0.5 1