hi, everyone enjoy his weekend.

解决方案 »

  1.   

    what did you read back? you might need to play with System.Text.Encoding class
      

  2.   

    sorry for being late. 
    when i opened configuratio file with notepad, i found the \n\r characters disappeared, replaced by a small solid black rectangle, unknown characters. this is to say, the whole config file had came into a single line.
    that's why my program cannot read config settings. but why this happened, and how to solve it?
      

  3.   

    you mean "\r\n"? that rectangle should be "\n", try to open it with WordPad.exe or winnt\system32\write.exe
     
    did you write the file yourself? how did you process it? use XmlDocument?
      

  4.   

    no, i didn't write it by myself. it is just the standard config file. for a.exe. it's a.exe.config.
      

  5.   

    ok, thanks. i got it. becuase i changed the config file manually after copying it. for that computer, it uses a frech keyboard setting. then every word it input is a unicode one. so, the config file has both ansi code and unicode. that's why it doesn't work.
    the file should keep in ansi code format always.
      

  6.   

    do not thank me, you solved the problem yourself, :-)
      

  7.   

    but, if i have to modify it after installation, what can i do? how can i make sure that the word i input is ascii instead of unicode?
      

  8.   

    use a text editor like NOTEPAD which allows you to specify what format you want to save your file in