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. problem in writing a file

problem in writing a file

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

    Hello I am writing a file. The text of file is not in English, but it can be in chinese, arabic, spanish etc language. Currently i am testing for chinese language. But when the file is written, i can not find the exact text i have written. I mean after writing the file, when i open the file, it dowsn't display me the original text i have sent to be written. I think there is some problem in writing that file. Can someone tell me how can i write a file in any other language other than english??? Regards

    sAqIb "Our scientific power has outrun our spiritual power. We have guided missiles and misguided men." Dr. Martin Luther King Jr.

    P L 2 Replies Last reply
    0
    • S saqib82

      Hello I am writing a file. The text of file is not in English, but it can be in chinese, arabic, spanish etc language. Currently i am testing for chinese language. But when the file is written, i can not find the exact text i have written. I mean after writing the file, when i open the file, it dowsn't display me the original text i have sent to be written. I think there is some problem in writing that file. Can someone tell me how can i write a file in any other language other than english??? Regards

      sAqIb "Our scientific power has outrun our spiritual power. We have guided missiles and misguided men." Dr. Martin Luther King Jr.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      How are you opening the file? What utility are you using?

      Deja View - the feeling that you've seen this post before.

      1 Reply Last reply
      0
      • S saqib82

        Hello I am writing a file. The text of file is not in English, but it can be in chinese, arabic, spanish etc language. Currently i am testing for chinese language. But when the file is written, i can not find the exact text i have written. I mean after writing the file, when i open the file, it dowsn't display me the original text i have sent to be written. I think there is some problem in writing that file. Can someone tell me how can i write a file in any other language other than english??? Regards

        sAqIb "Our scientific power has outrun our spiritual power. We have guided missiles and misguided men." Dr. Martin Luther King Jr.

        L Offline
        L Offline
        lmoelleb
        wrote on last edited by
        #3

        Make sure you use Unicode when reading and writing the file. UTF-8 is typically used in files, but UTF-16 works as well and have the advantage of a mandatory Byte Order Mark identifying the encoding. Unfortunately a lot of people still save with ANSI encodings which varies from system to system (due to ignorance I guess, but probably it did not help Microsoft named it the "Default" encoding which is an unfortunate name for something that is depricated).

        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