mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
prevent "illegal line" message when loading library with FEFF chars in properties file
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user