Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Unicode data

Unicode data

Scheduled Pinned Locked Moved ASP.NET
databasehelpsql-server
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MrMicrosoftvn
    wrote on last edited by
    #1

    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.

    A 1 Reply Last reply
    0
    • M MrMicrosoftvn

      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.

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      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 <

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups