MSBuild / SQLCMD Encoding Woes, Part 3

I’m not the only one with this problem. Greg Knierim posted some feedback to the VS 2008 team about what appears to be the exact same issue.

At this point I think I have two options:

  1. Assiduously save each .sql file in code page 1200 (Unicode, UTF-16)
  2. Write up some garbage script in my custom MSBuild task that saves the input files in an acceptable encoding before SQLCMD gets to them.

Any other ideas?

Advertisements

3 Responses to “MSBuild / SQLCMD Encoding Woes, Part 3”


  1. 1 Greg Knierim February 12, 2008 at 6:57 pm

    I ended up opening each of the VS2008 SQL Script templates in Notepad and saving them as ANSI. See my blog entry here:
    http://gknierim.spaces.live.com/blog/cns!637DFB9107823C9B!143.entry

  2. 2 Anthony Stevens February 12, 2008 at 7:08 pm

    Great tip, Greg. I just tried it. Instead of Notepad, I just opened them in VS 2008, saved them with codepage 1200 (Unicode, UTF-16), and it worked great.

    Thanks!

  3. 3 Anthony Stevens February 12, 2008 at 7:10 pm

    Great tip, Greg. I just tried it. Instead of Notepad, I just opened them in VS 2008, saved them with code page 1200 (Unicode, UTF-16), and it worked flawlessly.

    Thanks!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





%d bloggers like this: