在utf_unicode_ci编码的mysql表中插入多字节(转换为utf-8)字符串的问题
http://domainsoutlook.com/sandbox/keyword/?s=http://bhaskar.com
raw example of my keyword density analyser. Every keyword shows up properly with no problems in unicode conversions etc.
Now, When I am adding these words to the database column of a table, the words show up as messed up.
http domainsoutlook.com/b/site/bhaskar.com.html
For example on this front end page if you see there is a keyword that is shown as a blank but still occurs on the website 8 times. (It isnt empty in the database though).
I have checked and there is no problem with mysql_real_escape_String...because the output stays the same before and after the word is gone through mysql_real_escape_String.
Another problem was that I wanted to fix my urls for arabic language. They should be showing up as /word-{1st letter of the word}/{whole word}.html but its showing as /word-{whole word}/{1st letter of the word}.html
I really need answers for these two questions.
http://domainsoutlook.com/sandbox/keyword/?s=http://bhaskar.com p>
原始示例 关键词密度分析器。 每个关键字都正确显示,在unicode转换等方面没有任何问题。 p>
现在,当我将这些单词添加到表的数据库列时,这些单词显示为搞砸了。 p>
http domainsoutlook.com/b/site/bhaskar.com.html
nn例如,如果您看到有一个关键字,请在此前端页面上显示 显示为空白但仍在网站上出现8次。 (虽然在数据库中它不是空的。) p>
我已经检查过mysql_real_escape_String没有问题...因为输出在字经过mysql_real_escape_String之前和之后保持不变。 p>
另一个问题是我想修复我的阿拉伯语网址。 它们应该显示为/ word- {单词的第一个字母} / {整个单词} .html,但它显示为/ word- {整个单词} / {单词的第一个字母} .html p>
我真的需要这两个问题的答案。 p> div>
I tried reinserting and it worked.
Try setting utf-8 character set for mysql connection in your php script
mysql_connect(...)
mysql_select_db(...);
mysql_query('SET NAMES "utf8"');