Giter VIP home page Giter VIP logo

Comments (4)

lovettchris avatar lovettchris commented on August 25, 2024

I'm not sure what you mean by "", perhaps you mean the XML encoding declaration <?xml version="1.0" encoding="utf-8"?> ? Or you might be talking about "byte order marks" at the beginning of the file.

These are part of the XML standard and XML notepad is ensuring your file is a valid standard XML file. XML notepad has some "Formatting options" under the "View/Options" dialog but reserves the right to output whatever is needed to your XML file, it is after all an XML "editor".

from xmlnotepad.

namoran avatar namoran commented on August 25, 2024

I'm not sure why that quotation was empty but yes it was the XML encoding state you quoted.

Thank you for looking into this so quickly!

I understand that xml should have that line. But the xml file I'm working with doesn't. And when I change it, the program that uses that file can't recognize it anymore.

Furthermore, your program replaces a notepad or notepad++ type program in my workflow, and I'm sure that's how most users see it as well, and the expectation of the user is that what I see is what I get. That line should not be hidden from the user or added in my opinion. If that line missing means it's not truly an xml file then a warning could be shown to the user at saving time.

from xmlnotepad.

namoran avatar namoran commented on August 25, 2024

I'll look in view options and see if that gives me an option that is useful in this situation.

from xmlnotepad.

lovettchris avatar lovettchris commented on August 25, 2024

And when I change it, the program that uses that file can't recognize it anymore.

Then the program that uses the file is non-standard with regards to XML handling and needs to be fixed. But if the program that uses it is loading the file as a string and passing that "string" to something or processing then the XML declaration can be a problem because when the file is loaded into a string it is often no longer utf-8 but instead utf-16.

If this is the case you could search replace the utf-8 in the XML declaration and replace it with utf-16.

from xmlnotepad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.