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. General Programming
  3. C#
  4. how can i save utf-8 format characters to sql database/ Encode or Decode

how can i save utf-8 format characters to sql database/ Encode or Decode

Scheduled Pinned Locked Moved C#
databasequestion
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.
  • S Offline
    S Offline
    sikandarhayat
    wrote on last edited by
    #1

    dear programers in sqlservr database i made field type 'nvarchar' and 'ntext' does not work. how can i Encode and Decode the utf-8 characters so that i can easly save to database

    sikandar

    G 1 Reply Last reply
    0
    • S sikandarhayat

      dear programers in sqlservr database i made field type 'nvarchar' and 'ntext' does not work. how can i Encode and Decode the utf-8 characters so that i can easly save to database

      sikandar

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Standard question #1: What do you mean by "not working"? If you have a text saved as UTF-8, you can load it with a StreamReader using the Encoding.UTF8 encoding. When you read a string from the stream it will be decoded to Uncode, that you can store in the database.

      --- b { font-weight: normal; }

      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