Update to SQLCmdScriptExpander => 0.2.0.0 is out
(Updated version available here)
As suggested by M Merrill in my former post of SQLCMDScriptExpander (which can be found here), I added an option for providing the encoding of files. So I created another option where you can specify the encoding from the following options:
/Encoding:[ ASCII |
BigEndianUnicode |
Default |
Unicode |
UTF32 |
UTF7 |
UTF8 ]
This will generate a file with the chosen encoding and will make sure that your special characters are honored. If no encoding is passed, it will fallback to the default value as of your settings on the machine. For more information, visit the encoding information page of MSDN here.
Thanks for the valueable input and feedback ! The new bits can be downloaded here.
-Jens
Comments
- Anonymous
February 22, 2013
The comment has been removed - Anonymous
February 22, 2013
Hi Frank, thanks for the Feedback. To the points:
- Thanks for reporting, I will fix that.
- I understand that this does not make sense in most cases, will recreate the file instead.
- That seems to be a bug which I will also fix.
- Replaced with what actually ? The replacement would have to be done on runtime of the script. A script can be e.g. ´called with SQMCMD, there you have the -v command to pass in values for parameters. I didn not want to copy any existing functionality, just add missing functionality in my tools. So here is how I use it and what I suggest you. -Expand the files with the ScriptExpander tool. -Once being expanded, call the created script from SQLCMD and use the -v Switch to pass in parameters. For the other things, watch out the next Version which I will tag as the Frank Edition ;-) -Jens
Anonymous
April 07, 2014
This does not appear to support ( characters in the file name referenced by the :r commandAnonymous
November 05, 2014
The comment has been removedAnonymous
November 05, 2014
Hi, and thanks for the feedback. Wow this is a really old piece of code :-) Let see if a can reassemble the pieces again.I don´t have any exhaustive loggging in the solution but I will take a look at the error outlined and let you know.Anonymous
November 06, 2014
Hi Jens, after further investigation this seems to be similar to Andrew's case where there are some valid characters that the code is not dealing with (in my case it seems to be a hyphen).