better method name

This commit is contained in:
Maxim.Mossienko
2013-12-16 17:01:15 +01:00
parent ed529d5095
commit a07a0f2c7c
2 changed files with 3 additions and 3 deletions
@@ -79,7 +79,7 @@ public class HtmlFileType extends XmlLikeFileType {
catch (UnsupportedEncodingException e) {
return null;
}
Charset c = HtmlUtil.detectCharsetFromMetaHttpEquiv(strContent);
Charset c = HtmlUtil.detectCharsetFromMetaTag(strContent);
return c == null ? null : c.name();
}
@@ -91,6 +91,6 @@ public class HtmlFileType extends XmlLikeFileType {
if (charset != null) {
return charset;
}
return HtmlUtil.detectCharsetFromMetaHttpEquiv(content);
return HtmlUtil.detectCharsetFromMetaTag(content);
}
}
@@ -445,7 +445,7 @@ public class HtmlUtil {
private static final TerminateException INSTANCE = new TerminateException();
}
public static Charset detectCharsetFromMetaHttpEquiv(@NotNull String content) {
public static Charset detectCharsetFromMetaTag(@NotNull String content) {
// check for <meta http-equiv="charset=CharsetName" > or <meta charset="CharsetName"> and return Charset
// because we will lightly parse and explicit charset isn't used very often do quick check for applicability
int charPrefix = content.indexOf(CHARSET);