mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
consume Unicode BOM (0xFEFF) in createReader() and Table parser
This commit is contained in:
@@ -378,6 +378,15 @@ public class Table {
|
||||
} else {
|
||||
InputStreamReader isr = new InputStreamReader(input, encoding);
|
||||
BufferedReader reader = new BufferedReader(isr);
|
||||
|
||||
// strip out the Unicode BOM, if present
|
||||
reader.mark(1);
|
||||
int c = reader.read();
|
||||
// if not the BOM, back up to the beginning again
|
||||
if (c != '\uFEFF') {
|
||||
reader.reset();
|
||||
}
|
||||
|
||||
/*
|
||||
if (awfulCSV) {
|
||||
parseAwfulCSV(reader, header);
|
||||
@@ -4039,6 +4048,7 @@ public class Table {
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
/**
|
||||
* @webref table:method
|
||||
* @brief Trims whitespace from values
|
||||
|
||||
Reference in New Issue
Block a user