Php reads chinese display black spots from sql server 2005 using odbc

61 1

I use php to read chinese from sql server and display it in the web page by using php. The page code is encoded as 1m 8, and the page source code file is encoded as 1m 8, and I use the mb convert encoding function to convert the read to utf8 in the chrome. But under ie8, you can display chinese, but there's a black dot behind the chinese, but there's no black spot to look at the source code. What's this reason. Thank you.

2 Answers

119 4

In database design, it's important to note that a problem is. For chinese can use nchar, but for chinese must be used nvarchar, this isn't an error when the function mb convert encoding is used in php. If you use nchar, the blank character will be filled by default if the number of characters provided isn't defined. This causes an error code conversion. In the page, you can use it

mb_convert_encoding($str,"UTF-8","GBK");

In the case of sql server, the chinese conversion is 8. A collation that's chosen by default when sql server chinese is installed is the chinese ci as. Thank you.

60 3

In database design, it's important to note that a problem is. For chinese can use nchar, but for chinese must be used nvarchar, this isn't an error when the function mb convert encoding is used in php. If you use nchar, the blank character will be filled by default if the number of characters provided isn't defined. This causes an error code conversion. In the page, you can use it

mb_convert_encoding($str,"UTF-8","GBK");

In the case of sql server, the chinese conversion is 8. A collation that's chosen by default when sql server chinese is installed is the chinese ci as. Thank you.

75 1

It's obvious that the list-style-type attribute of ul li in css is the list symbol.
Solution, find the corresponding css, add to li

list-style:none;
72 4

It's obvious that the list-style-type attribute of ul li in css is the list symbol.
Solution, find the corresponding css, add to li

list-style:none;
...