[ http://issues.apache.org/jira/browse/IBATIS-349?page=comments#action_12453670 ] Jeff Butler commented on IBATIS-349: ------------------------------------
Would it work for you if we added methods to Resources like this: Resources.getResourceAsReader(String resource, String encoding) { return new InputStreamReader(getResourceAsStream(resource), Charset.forName(encoding)); } Resources.getResourceAsReader(ClassLoader loader, String resource, String encoding) { return new InputStreamReader(getResourceAsStream(loader, resource), Charset.forName(encoding)); } This would be a lot simpler than opening the XML file twice - the first time just to get the encoding. > NodeletParser ignore XML encoding. > ---------------------------------- > > Key: IBATIS-349 > URL: http://issues.apache.org/jira/browse/IBATIS-349 > Project: iBatis for Java > Issue Type: Bug > Components: SQL Maps > Affects Versions: 2.2.0 > Environment: Windows XP(Japanese) > jdk 1.5.0_06 > Reporter: Daigo Kobayashi > Attachments: Resources.java, Resources.patch, Resources.patch > > > NodeletParser ignore XML encoding. Because NodeletParser use Resources, and > in some case Resources use ClassLoader#getResourceAsStream with OS default > encoding not XML's. > In some environment, for example OS use Shift_JIS and XML use UTF-8, iBatis > doesn't work correctly because of broken character. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira