CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2013

    XML files encoding

    Hi !

    I have a problem loading an xml file into C#. I found out that this file has no predefined encoding type. When I open the xml file in Notepad++ I can see the data from the file. However, when I click the "Encoding" menu button, I see that there is no encoding set to this file. If I manually set the encoding of the file to "UTF-8", for example, I don't have the problem loading the xml in C# anymore.
    Is there any way in which I can set the encoding of the file through C#, without doing it manually ? Thank you in advance !

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004

    Re: XML files encoding

    How are you loading the file in C#?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.