Open
Description
Version: 0.6.2
MacOS 10.14.4
Node v10.15.2
I have a SQL script encoded in UTF-8 that contains insert statements with unicode strings that are inserting in a NVARCHAR field. When I run this script, the data inserted in the table is malformed.
Example:
CREATE TABLE homeInstitution
(
id INT IDENTITY(0,1) NOT NULL PRIMARY KEY,
institution NVARCHAR(128) NOT NULL,
deletedDate DATETIME NULL,
);
INSERT [dbo].[homeInstitution] ([institution], [deletedDate]) VALUES (N'Lycée ÀÉÙÇÊÏ', NULL)
- Save this into a UTF-8 encoded file
- Connect to mssql, run the script:
.run myfile.sql
select * from homeInstitution
Result:
mssql> select * from homeInstitution;
id institution deletedDate
-- ------------- -----------
0 Lycée ������ null
1 row(s) returned
- If I convert the file to ISO-8859-1 format, the data is inserted correctly
Metadata
Metadata
Assignees
Labels
No labels