This is a discussion on How to set-up sql server 2000 in win2k3 Server to store big-5 Chinese data within the SQL Server forums, part of the Microsoft SQL Server category; --> I am using Windows 2003 Server English Version. I wanna store the big-5 data so I install the sql ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I am using Windows 2003 Server English Version. I wanna store the big-5 data so I install the sql server 2000 as if i install it in the Windows 2000 with Server Collation of the Chinese_Taiwan_Stroke_CL_AS. However, the data are stored into the database server in unicode instead of big-5 in that of windows 2000 OS. I would like to ask how i can set so that the Sql Server 2000 can store the big-5 data |
| |||
| (micmic.chion@gmail.com) writes: > I am using Windows 2003 Server English Version. I wanna store the big-5 > data so I install the sql server 2000 as if i install it in the Windows > 2000 with Server Collation of the Chinese_Taiwan_Stroke_CL_AS. > However, the data are stored into the database server in unicode > instead of big-5 in that of windows 2000 OS. > > I would like to ask how i can set so that the Sql Server 2000 can store > the big-5 data First of all, my knowledge and experience of Chinese and its character sets is very limited, so bear with me. I was under the impression that for non-Unicode characters sets, East Asian languages are stored in varchar as double-byte character sets. Unicode is stored in nvarchar. So you would probably use varchar for your data. Could this be the answer? -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp |
| |||
| I am using the varchar for the fields of table which i wanna save big-5 data. When i entered the chinese data, the data can be saved. But when i read the data from the web boswer (ie. IE ), i need to change the encoding from unicode instead of big-5 in order to viewing it Is it due to the language of the OS (ie. WIndows 2003)? |
| |||
| (micmic.chion@gmail.com) writes: > I am using the varchar for the fields of table which i wanna save big-5 > data. > > When i entered the chinese data, the data can be saved. But when i read > the data from the web boswer (ie. IE ), i need to change the encoding > from unicode instead of big-5 in order to viewing it > > Is it due to the language of the OS (ie. WIndows 2003)? Hm, if the columns in the database are varchar, then you just cannot get Unicode into them. So my guess is that you do have Big-5 in the database, and then something happens on the way to the web browser. You could verify this by looking in Qurey Analyzer and doing a SELECT on the table. If it looks OK, then I would guess it is Big-5. Do run it even further you could do: select convert(varbinary, big5col) and the see whether the codes are Big-5 or Unicode. (This presumes that you actually knows the codes for some characters.) If my theory is correct that the data in the database is Big5, then we need to find out why you get Unicode in the browser. Unfortunately, I know almost as little about web servers as I know Chinese. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp |
| |||
| I try the method you mentioned in both MS SQL Server in Windows 2000 server and Windows 2K3. select convert(varbinary, big5col) It is found that the binary is the same. I have found out that if you add the following in the heading of the page, this page can show the big-5 character. <%@ codepage=950 %> As the string stored in database is in unicode format, if you set the codepage as big-5 format, the data will be changed as big-5 and show in the webpage. Thank you for your great sugegstion Ref: Chinese-simpified version: http://www.evget.com/articles/evget_1092.html Erland Sommarskog 寫道: > (micmic.chion@gmail.com) writes: > > I am using the varchar for the fields of table which i wanna save big-5 > > data. > > > > When i entered the chinese data, the data can be saved. But when i read > > the data from the web boswer (ie. IE ), i need to change the encoding > > from unicode instead of big-5 in order to viewing it > > > > Is it due to the language of the OS (ie. WIndows 2003)? > > Hm, if the columns in the database are varchar, then you just cannot > get Unicode into them. So my guess is that you do have Big-5 in the > database, and then something happens on the way to the web browser. > > You could verify this by looking in Qurey Analyzer and doing a > SELECT on the table. If it looks OK, then I would guess it is > Big-5. Do run it even further you could do: > > select convert(varbinary, big5col) > > and the see whether the codes are Big-5 or Unicode. (This presumes that > you actually knows the codes for some characters.) > > If my theory is correct that the data in the database is Big5, then > we need to find out why you get Unicode in the browser. Unfortunately, > I know almost as little about web servers as I know Chinese. > > > > > -- > Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se > > Books Online for SQL Server SP3 at > http://www.microsoft.com/sql/techinf...2000/books.asp |
| ||||
| (micmic.chion@gmail.com) writes: > I try the method you mentioned in both MS SQL Server in Windows 2000 > server and Windows 2K3. > > select convert(varbinary, big5col) > > It is found that the binary is the same. > > I have found out that if you add the following in the heading of the > page, > this page can show the big-5 character. > ><%@ codepage=950 %> > > > As the string stored in database is in unicode format, if you set the > codepage as big-5 format, the data will be changed as big-5 and show in > the webpage. > > > Thank you for your great sugegstion I'm glad to have been to help about something I hardly know at all! -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp |