I use MS SQL 2008 Express to connect to a shared MS SQL 2008 server, where I have a database. The default collation value for the database is currently SQL_Latin1_General_CP1_CI_AS . Ultimately, I would like to store English, Korean, Chinese and any other language imaginable in the database. I started by using the following SQL code (which I found here: http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/5d2ea1a2-32e1-4a82-b6e3-17d2b898babc/ ) to check:
create table zhongwen(mingzi nvarchar(10)) go insert into zhongwen values (N'有方') insert into zhongwen values (N'李杰') insert into zhongwen values (N'空炮鸡蛋') go select * from zhongwen go create procedure zhongwenfind (@mingzi nvarchar(10)) AS SELECT mingzi FROM zhongwen WHERE mingzi = @mingzi go exec zhongwenfind N'李杰' go drop table zhongwen go drop procedure zhongwenfind go
When I run this code in MS SQL 2008 Express, the results display only a few thin boxes. If I copy a set of thin boxes and paste them here (stack overflow asks textarea), they appear as the correct characters (here I go: 空 炮 鸡蛋). Is it possible to install MS SQL 2008 Express to display them correctly?
More importantly, when I run my PHP site, which ultimately needs to display characters correctly for the public, I only get question marks (????). I am using mssql_query() to query the db. I have the following code at the top of my HTML5 HEAD:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
... and the following code in my PHP:
header('Content-Type:text/html; charset=UTF-8');
... but I only see question marks. So, to summarize, 2 questions:
1) How to display this screen in MS SQL 2008 Express?
2) How to display this screen in PHP / HTML?
Thanks in advance!
php sql-server-2008 utf-8 character-encoding collation
gcdev
source share