2007-03-18 Don Allingham <don@gramps-project.org>

* src/ViewManager.py: use tooltips for buttons when text disabled (bug 959)
	* src/Editors/_EditSourceRef.py: fix help button (bug 960),  delete the cancel
	on the comment tab.
	* src/Editors/_EditReference.py: make sure help button is sensitive if used.
	* src/GrampsDbUtils/_GedcomParse.py: check for UTF16 BOM
	* src/ArgHandler.py: use STOCK_NEW for create of db (bug 947)
	* src/DbLoader.py: use STOCK_NEW for create of db (bug 947)



svn: r8304
This commit is contained in:
Don Allingham
2007-03-19 04:19:49 +00:00
parent 69180989ef
commit 0d778ae075
7 changed files with 25 additions and 11 deletions

View File

@@ -143,6 +143,9 @@ ADDR3_RE = re.compile('(.+)([\n\r]+)(.+)\s*,(.+)')
TRUNC_MSG = _("Your GEDCOM file is corrupted. "
"It appears to have been truncated.")
BAD_UTF16 = _("Your GEDCOM file is corrupted. "
"The file appears to be encoded using the UTF16 "
"character set, but is missing the BOM marker.")
#-------------------------------------------------------------------------
#
@@ -255,6 +258,8 @@ class StageOne:
self.enc = "UTF16"
self.ifile.seek(0)
self.reader = codecs.EncodedFile(self.ifile, 'utf8', 'utf16')
elif line[0] == "\x00" or line[1] == "\x00":
raise Errors.GedcomError(BAD_UTF16)
else:
self.ifile.seek(0)
self.reader = self.ifile