XML tag does not work with XML file in UTF-8 format
I have tried to import an XML files in UTF-8 encoding via:
<c:import url="/xml/NME.xml" var="nemesisXml" charEncoding="UTF-8"/>
I have received the following error:
javax.servlet.ServletException: javax.servlet.jsp.JspException: Content is not allowed in prolog.
It works well when I save the XML file in AINSI encoding. After some studies, I found out that it is because in UTF-8 file, the content is always prefixed with 3 extra bytes call BOM (byte order mark). This can be seen when I view the XML file with hex editor.
Is it normal that XML taglib does not suppot UTF-8 XML file? I am rather shock to find it out since most XML files today are in UTF-8. Anyone has any solution or faced the same problem like me? I don't find much discussion about it in JSTL on google!

