You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 7, 2024. It is now read-only.
CREATE TABLE [dbo].[foo] (
[id] INTNOT NULL IDENTITY(1,1),
[value] NVARCHAR(256) NOT NULL,
);
INSERT INTO [dbo].[foo] (value) VALUES (N'Hello Wörld');
mssql-scripter -S localhost -d test -U sa --data-only > ./backup.sql
The resulting file is utf-8 encoded, but the sql values are broken.
ö is converted to 0xE2 0x94 0x9C 0xE2 0x95 0xA2
USE [test]
GO
SET IDENTITY_INSERT [dbo].[foo] ON
INSERT [dbo].[foo] ([id], [value]) VALUES (1, N'Hello W├╢rld')
SET IDENTITY_INSERT [dbo].[foo] OFF
Subsequent restores of the backup create garbage values, eg. after the first restore Hello Wörld. If this value is then dumped and restored again, it will start to grow fast. eg. second restore Hello W├╢rld.
Update / Workaround
This issue might be limited to running mssql-scripter in powershell. Replacing the output redirect > with -f avoids the problem.
mssql-scripter -S localhost -d test -U sa --data-only -f ./backup.sql
USE [test]
GO
SET IDENTITY_INSERT [dbo].[foo] ON
INSERT [dbo].[foo] ([id], [value]) VALUES (1, N'Hello Wörld')
SET IDENTITY_INSERT [dbo].[foo] OFF
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Probably related to #113
mssql-scripter -S localhost -d test -U sa --data-only > ./backup.sql
The resulting file is utf-8 encoded, but the sql values are broken.
ö
is converted to0xE2 0x94 0x9C 0xE2 0x95 0xA2
Subsequent restores of the backup create garbage values, eg. after the first restore
Hello W├╢rld
. If this value is then dumped and restored again, it will start to grow fast. eg. second restoreHello W├╢rld
.Update / Workaround
This issue might be limited to running
mssql-scripter
in powershell. Replacing the output redirect>
with-f
avoids the problem.mssql-scripter -S localhost -d test -U sa --data-only -f ./backup.sql
The text was updated successfully, but these errors were encountered: