Initial support to decode old, ambiguous data files, missing an encoding declaration, with the help of the user.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13781 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler
2006-04-14 17:38:57 +00:00
parent d9c78bd0fe
commit 14ce276877
19 changed files with 3311 additions and 22 deletions

View File

@@ -116,6 +116,7 @@ typedef enum {
ERR_FILEIO_BACKUP_ERROR, /**< couldn't make a backup of the file */
ERR_FILEIO_WRITE_ERROR, /**< couldn't write to the file */
ERR_FILEIO_READ_ERROR, /**< Could not open the file for reading. */
ERR_FILEIO_NO_ENCODING, /**< file does not specify encoding */
/* network errors */
ERR_NETIO_SHORT_READ = 2000, /**< not enough bytes received */

View File

@@ -1113,6 +1113,7 @@ qof_session_load (QofSession *session,
err = qof_session_get_error(session);
if ((err != ERR_BACKEND_NO_ERR) &&
(err != ERR_FILEIO_FILE_TOO_OLD) &&
(err != ERR_FILEIO_NO_ENCODING) &&
(err != ERR_SQL_DB_TOO_OLD))
{
/* Something broke, put back the old stuff */