cmdSql.exe Utility input file's with no unicode bytemarks fail to -
03-27-2007
, 06:17 PM
Dear MSFT
I have TSQL scripts from SQL 2000. In the past, I used the ISQL utility to
execute and the scripts worked. I changed the host from ISQL to the new
cmdSql.exe utility(SQL 2005 sp2 applied). The scripts seemed to work because
I received no error messages. Eventually I discovered some of the script were
not run at all. What I found was that some of input file's which were Unicode
did not load. The Unicode input files which did not load did not have the
BOM. The ones which did work did have the BOM to identify the input file
encoding. (see BOM details
http://blogs.msdn.com/oldnewthing/ar.../24/95235.aspx)
I wrote a C# command to identify Unicode source file with detect
(little-endian) encoding with no BOM and the missing, and (big-endian)
encoding with no BOM and prefix the proper BOM. The corrected scripts worked
after adding the BOM.
My feature request for the sqlCmd.exe utility is for support for Unicode
input files with little-endian and big-endian encodings with no BOM, or at
minimum throw an exit (1) error if the input file source Unicode page cannot
be determined.
--
Robert Livermore B.Sc. MCSE+I MCSD MCDBA
Cetaris
www.cetaris.com |