Hi all, I got some little problem for Unicode:

My Unicode were Chienese world => 你好, 有什么能协助您的吗

When the 1st time i insert it in to database it saved in this form
-> "&#20320 &#22909 , &#26377 &#20160 &#20040 &#33021 &#21327 &#21161 &#24744 &#30340 &#21527 &#65311" ( every &# 1234 got ";" at behind)

but when i run update query to update it it display in this
ä½ å¥½, 有什么能å助您的å—?

and the database become 你好, 有什么能协助您的吗

how i "encrypt" it to this format
-> "&#20320 &#22909 , &#26377 &#20160 &#20040 &#33021 &#21327 &#21161 &#24744 &#30340 &#21527 &#65311"
during update?

Edited by Nybuler: n/a

7 Years
Discussion Span
Last Post by diafol

Can you post the code which validates and inserts the content into the database, and the code that retrieves and displays the content to the webpage?

And I assume if the Chinese characters are displaying correctly in the database the tables and fields are using UTF-8 Unicode encoding, and the HTML charset is set to UTF-8??


Edited by blocblue: n/a


WHy do you want to store it as incorrect html-encoded format?

THis means to output it correctly you need to add a ';' to it. Also it takes up a ridiculous amount of space.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.