Browse Source

Make SQL Server inserted strings Unicode

Since the column is nvarchar, the string constants that are inserted
should be prefixed with N like N'foo' instead of 'foo'. This fixes the
Japanese string.
Malcolm Evershed 12 years ago
parent
commit
e3c2b0a8c2
1 changed files with 12 additions and 12 deletions
  1. 12 12
      config/create-sqlserver.sql

+ 12 - 12
config/create-sqlserver.sql

@@ -40,16 +40,16 @@ CREATE TABLE Fortune (
 )
 GO
 
-INSERT INTO Fortune (message) VALUES ('fortune: No such file or directory');
-INSERT INTO Fortune (message) VALUES ('A computer scientist is someone who fixes things that aren''t broken.');
-INSERT INTO Fortune (message) VALUES ('After enough decimal places, nobody gives a damn.');
-INSERT INTO Fortune (message) VALUES ('A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
-INSERT INTO Fortune (message) VALUES ('A computer program does what you tell it to do, not what you want it to do.');
-INSERT INTO Fortune (message) VALUES ('Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
-INSERT INTO Fortune (message) VALUES ('Any program that runs right is obsolete.');
-INSERT INTO Fortune (message) VALUES ('A list is only as strong as its weakest link. — Donald Knuth');
-INSERT INTO Fortune (message) VALUES ('Feature: A bug with seniority.');
-INSERT INTO Fortune (message) VALUES ('Computers make very fast, very accurate mistakes.');
-INSERT INTO Fortune (message) VALUES ('<script>alert("This should not be displayed in a browser alert box.");</script>');
-INSERT INTO Fortune (message) VALUES ('フレームワークのベンチマーク');
+INSERT INTO Fortune (message) VALUES (N'fortune: No such file or directory');
+INSERT INTO Fortune (message) VALUES (N'A computer scientist is someone who fixes things that aren''t broken.');
+INSERT INTO Fortune (message) VALUES (N'After enough decimal places, nobody gives a damn.');
+INSERT INTO Fortune (message) VALUES (N'A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
+INSERT INTO Fortune (message) VALUES (N'A computer program does what you tell it to do, not what you want it to do.');
+INSERT INTO Fortune (message) VALUES (N'Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
+INSERT INTO Fortune (message) VALUES (N'Any program that runs right is obsolete.');
+INSERT INTO Fortune (message) VALUES (N'A list is only as strong as its weakest link. — Donald Knuth');
+INSERT INTO Fortune (message) VALUES (N'Feature: A bug with seniority.');
+INSERT INTO Fortune (message) VALUES (N'Computers make very fast, very accurate mistakes.');
+INSERT INTO Fortune (message) VALUES (N'<script>alert("This should not be displayed in a browser alert box.");</script>');
+INSERT INTO Fortune (message) VALUES (N'フレームワークのベンチマーク');
 GO