prevent "illegal line" message when loading library with FEFF chars in properties file

This commit is contained in:
Ben Fry
2020-09-24 17:49:56 -04:00
parent b62302cc07
commit 5a115ccdd1
3 changed files with 5 additions and 3 deletions
+3 -3
View File
@@ -103,14 +103,14 @@ public class Util {
if (commentMarker != -1) {
line = line.substring(0, commentMarker);
}
// Remove extra whitespace
line = line.trim();
// Remove extra whitespace (including the x00A0 and xFEFF)
line = PApplet.trim(line);
if (line.length() != 0) {
int equals = line.indexOf('=');
if (equals == -1) {
if (filename != null) {
System.err.println("Ignoring illegal line in " + filename);
System.err.println("Ignoring illegal line in " + filename + ":");
System.err.println(" " + line);
}
} else {
+1
View File
@@ -2,6 +2,7 @@
X loadJSONObject/Array() now return null if the given file was not found
X https://github.com/processing/processing/pull/6081
X remove zero width no-break space (U+FEFF) character with trim()
X fix "illegal line" message when loading library with FEFF chars in properties file
fixed in 4.x (close/lock these with final 4.0 release)
+1
View File
@@ -6,6 +6,7 @@ X also for exported applications
X audio and video broken on macOS b/c can't access mic/camera
X https://github.com/processing/processing-sound/issues/51
X 'ant source-jar' target added to core
X https://github.com/processing/processing4/issues/118
contribs