19 November 2015
20 October 2015
Nested links
Testing 2 types of links:
Link 1: link 1
Link 2: link 2
Link 3: Download
Full Prescribing
Information,
including Patient
Information with
important
warnings
Link 2: link 2
Link 3: Download
Full Prescribing
Information,
including Patient
Information with
important
warnings
18 October 2015
25 August 2015
24 August 2015
14 July 2011
10 May 2008
Uploading Chinese Text to MySQL database
In SQL Server, if you want to insert Chinese or other language character to a table, it was pretty simple, just specify the column type as NVARCHAR, and when you insert you can just use "N'chinese text here" but I found out that there's no such thing as NVARCHAR in MySQL database and hence this article.
To insert Chinese character:
To insert Chinese character:
- Specify database character-set as UTF-8
- Specify table or column collation set as UTF-8
- In your web.config connection string, specify charset UTF-8
e.g. <add name="MySqlConnString" connectionstring="server=IPAddress;userid=mysqluser;password=pa$$w0rd;database=mydb;pooling=false;charset=utf8 "/>
This is to tell the application to use UTF-8 charset when talking to the database
Subscribe to:
Posts (Atom)