changeset 1531:d6d1652a1837

Replaced hardcoded BOM character with utf representation (PR3671) * netx/net/sourceforge/nanoxml/XMLElement.java: (scanLeadingWhitespace) resolved PR3671, relaced ' ' by \\ufeff
author Jiri Vanek <jvanek@redhat.com>
date Thu, 13 Dec 2018 10:50:52 +0100
parents 99b77a265f54
children 3202999ab80f
files ChangeLog netx/net/sourceforge/nanoxml/XMLElement.java
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Dec 10 14:44:28 2018 +0100
+++ b/ChangeLog	Thu Dec 13 10:50:52 2018 +0100
@@ -1,3 +1,9 @@
+2018-12-10  Jiri Vanek <jvanek@redhat.com>
+            jtesdall <jtesdall@mapcon.com>
+
+	Replaced hardcoded BOM character with utf representation (PR3671)
+	* netx/net/sourceforge/nanoxml/XMLElement.java: (scanLeadingWhitespace) resolved PR3671, relaced ' ' by \\ufeff
+
 2018-12-10  Jiri Vanek <jvanek@redhat.com>
 
 	Made get_home os dependent.
--- a/netx/net/sourceforge/nanoxml/XMLElement.java	Mon Dec 10 14:44:28 2018 +0100
+++ b/netx/net/sourceforge/nanoxml/XMLElement.java	Thu Dec 13 10:50:52 2018 +0100
@@ -628,8 +628,8 @@
             throws IOException {
         while(true) {
             char ch = this.readChar();
-            //this is BOM , not space
-            if (ch == '') {
+            //this is BOM , when used without \\u, appear like space, but causes issues on windows development
+            if (ch == '\uFEFF') {
                 BOM = true;
             } else if (!isRegularWhiteSpace(ch)) {
                 return ch;