-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Thanks for putting this example up! It was encouraging to see that this approach can work.
One problem: the code that removes SET QUOTED_IDENTIFIERS in the mssql-scripter's output in _importdb.ps1 also changes the file encoding to the default Windows encoding (win-1251 in my case).
I use the following code adapted from StackOverflow instead:
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding($False)
gci -Path ./Planning/*.sql | ForEach-Object {
$fn = $_.FullName
#write-host $fn
$processed = ( Get-Content -Path $fn ) -replace 'SET.*(ON|OFF)$', ''
[System.IO.File]::WriteAllLines($fn, $processed, $Utf8NoBomEncoding)
}
I also hope that mssql-scripter can learn not to include the SET statements in the first place - filed microsoft/mssql-scripter#208
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels