Thanks for the earlier advice. will switch to using this method > sqlite3 old.db .dump > dump.sql > sqlite3 new.db < dump.sql
I presume this can be adopted as the way to dump and recreate the database on other platforms as well - OSX and Linux as well as windows and is compatible with older versions of the operating systems and also sqlite3 shell utility Regards Simon -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Clemens Ladisch Sent: 13 July 2016 18:26 To: [email protected] Subject: Re: [sqlite] [Windows] 3.13.0 recreate db from .dump file corrupts records with extended characters S.Ajina wrote: > Can confirm that sqlite3.exe version 3.8.6 works ok restoring database > from a .dump dump.sql file using these commands > > echo .dump | sqlite3_v3.8.6 test.original.db > dump_v3.8.6.sql > sqlite3_v3.8.6 -init dump_v3.8.6.sql test.restored.v3.8.6.db > > Doing the same with the current version of sqlite3.exe (version > 3.13.0) corrupts the database records when there are extended > characters > > echo .dump | sqlite3_v3.13.0 test.original.db > dump_v3.13.0.sql > sqlite3_v3.13.0 -init dump_v3.13.0.sql test.restored.v3.13.0.db > > Release Notes show changes in this area in version 3.10.0 which may > have made the change Translate between MBCS and UTF8 when running in > cmd.exe on Windows The old version of the sqlite3 shell assumes that screen and keyboard I/O could be done with UTF-8. This assumption was wrong. The new version converts screen and keyboard I/O between UTF-8 and the console's code page. So the output redirection with > no longer uses UTF-8. To fix this, use the same mechanism for both output and input: sqlite3 old.db .dump > dump.sql sqlite3 new.db < dump.sql or (echo .output dump.sql && echo .dump) | sqlite3 old.db sqlite3 -init dump.sql new.db Regards, Clemens _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

