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. Set Encoding for Stream Writer

Set Encoding for Stream Writer

Scheduled Pinned Locked Moved C#
htmlhelp
4 Posts 3 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.
  • T Offline
    T Offline
    t4ure4n
    wrote on last edited by
    #1

    I am working on an application in which i save save html files which have ISO-8859-1 encoding (The html files are in spanish). I use stream writer to save the source of the files as html files. The problem is the encoding options available in the system.text.Encoding class are ASCII UTF7 UTF32 UTF8 Unicode so when I save the page it changes certain characters. Can Any 1 suggest which encoding i should use ...

    o O º(`'·.,(`'·., ☆,.·''),.·'')º O o° »·'"`»* *☆ t4ure4n ☆* *«·'"`« °o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°

    L G 2 Replies Last reply
    0
    • T t4ure4n

      I am working on an application in which i save save html files which have ISO-8859-1 encoding (The html files are in spanish). I use stream writer to save the source of the files as html files. The problem is the encoding options available in the system.text.Encoding class are ASCII UTF7 UTF32 UTF8 Unicode so when I save the page it changes certain characters. Can Any 1 suggest which encoding i should use ...

      o O º(`'·.,(`'·., ☆,.·''),.·'')º O o° »·'"`»* *☆ t4ure4n ☆* *«·'"`« °o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      Encoding.Default should do the job :)

      **

      xacc.ide-0.2.0.75 - now with C# 3.5 support and Navigation Bar!

      **

      T 1 Reply Last reply
      0
      • L leppie

        Encoding.Default should do the job :)

        **

        xacc.ide-0.2.0.75 - now with C# 3.5 support and Navigation Bar!

        **

        T Offline
        T Offline
        t4ure4n
        wrote on last edited by
        #3

        Thanks it worked for me

        o O º(`'·.,(`'·., ☆,.·''),.·'')º O o° »·'"`»* *☆ t4ure4n ☆* *«·'"`« °o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°

        1 Reply Last reply
        0
        • T t4ure4n

          I am working on an application in which i save save html files which have ISO-8859-1 encoding (The html files are in spanish). I use stream writer to save the source of the files as html files. The problem is the encoding options available in the system.text.Encoding class are ASCII UTF7 UTF32 UTF8 Unicode so when I save the page it changes certain characters. Can Any 1 suggest which encoding i should use ...

          o O º(`'·.,(`'·., ☆,.·''),.·'')º O o° »·'"`»* *☆ t4ure4n ☆* *«·'"`« °o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°

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

          Those are only the predefined encodings. You can create an encoding for any code page that the system supports using the Encoding.GetEncoding method. Check the documentation for the Encoding class for all the available encodings.

          --- single minded; short sighted; long gone;

          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