diff --git a/src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java b/src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java index b6e8e29..c6084c2 100644 --- a/src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java +++ b/src/fr/devinsy/statoolinfos/core/StatoolInfosUtils.java @@ -116,6 +116,13 @@ public class StatoolInfosUtils String mimeTypeLabel = tika.detect(file); MimeType mimeType = MimeTypes.getDefaultMimeTypes().forName(mimeTypeLabel); result = mimeType.getExtension(); + + // Because Tika failed to recognize SVG file without xml header + // line. + if (result.equals(".txt") && (StringUtils.startsWithIgnoreCase(FileUtils.readFileToString(file, "UTF8"), "