Tuesday, July 25, 2006

Unicode SQL Scripts and TortoiseMerge

Version control is a vital part of collaborative software development. Being able to compare differences between files and resolving differences is a vital aspect of maintaining code in a repository. We use Subversion which is only supplied with a command line interface. The ability to expand and build upon open source programs like Subversion has allowed development of Tortoise SVN, a second program that acts as a GUI interface to Subversion. Its tight integration with Windows file explorer allows easy access to all the functionality of the commandline version.

Comparing differences between your current edition of a file and those in the repository is handled extremely well by Tortoise SVN. TortoiseMerge places the files side by side, you can compare differences per line. However, it needs to know how to display different file formats and currently Unicode isn't supported by TortoiseMerge. We only became aware of this after trying to compare SQL scripts that had been exported from the UniPhi database.

Exporting stored procedures, views and tables from Microsoft SQL Server Enterprise Manager using Generate SQL Script defaults to Unicode file format. By changing the file format to ANSI under the Options tab, you can start visually comparing files that use this format.
Post a Comment