Unicode data
-
hello, I get a problem to have you help me. Here is it: when i create a new article and get its content to show in the browser for my users, it can be read. After that, i get it back (its content) into textarea form to edit and click the AcceptChanges button to save my changes and store it back into the database (MS SQL 2000) (the data is saved into ntext field of MSSQL). Then i get it back again to show in the browser for my user, the content is not normally and my users can not read it. Please show me some way. My content is Unicode Data (Vietnamese) and saved in ntext data type. Thanks for your answer.
-
hello, I get a problem to have you help me. Here is it: when i create a new article and get its content to show in the browser for my users, it can be read. After that, i get it back (its content) into textarea form to edit and click the AcceptChanges button to save my changes and store it back into the database (MS SQL 2000) (the data is saved into ntext field of MSSQL). Then i get it back again to show in the browser for my user, the content is not normally and my users can not read it. Please show me some way. My content is Unicode Data (Vietnamese) and saved in ntext data type. Thanks for your answer.
Dear you ! .... Here is my idea ... ... first of all... do you use [textarea] or [div] with [b]contenteditable=true[/b] attribute ? So , what you need to do are these following... [textarea name='content' ... [b]or[/b] [div contenteditable=true ... You should create a text file with type='hidden' name='content2' then .. document.formname.contents2.value = escape(document.formname.content.value) or document.formname.contents2.value = escape(document.formname.content.innerHTML) //for DIV document.formname.submit(); .... then you use Request.Form["content2"] ... to load data and save into database .. When you load data from database and want to display on your page , you must use funtion unescape of javascript to reformat data. ex: [table id=content] [tr][td] [/td][/tr] [/table] ..javascript function document.onload() { document.formname.content.rows[0].cells[0].innerHTML = unescape([%=data%]); } here use [ by <