Skip to content

Commit 055eb88

Browse files
authored
fix(validator-core): prevent byte order mark issues on tables
fix(validator-core): prevent byte order mark issues on tables
2 parents b06d637 + a7a95d8 commit 055eb88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

validator-core/src/main/java/fr/ign/validator/model/FeatureType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,9 @@ public AttributeType<?> getIdentifier() {
260260
* @return -1 si undefined
261261
*/
262262
public int indexOf(String name) {
263-
String regexp = "(?i)" + name;
264263
for (int i = 0; i < attributes.size(); i++) {
265-
if (attributes.get(i).getName().matches(regexp)) {
264+
String regexp = "(?i)\ufeff?" + attributes.get(i).getName();
265+
if (name.matches(regexp)) {
266266
return getParentAttributeCount() + i;
267267
}
268268
}

0 commit comments

Comments
 (0)