Uploaded image for project: 'iBatis for Java [READ ONLY]'
  1. iBatis for Java [READ ONLY]
  2. IBATIS-720

Support multiple character sets (parse XML from InputStream vs. Reader)



    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0 Beta 7
    • None
    • Core
    • None


      iBATIS-3 currently parses XML from Reader instances. When Reader instances are created by the class Resources, then premature assumptions are made about their charsets. - Charset is assumed to be the platform's default charset or whatever is the current value of the field Resources.charset - but the charset defined in the xml header is ignored!!

      It would be better to parse the XML from InputStream, so that the XML-framework will get the chance to determine charset on its own from the XML-header or - in case the header does not specify charset - rely on the XML-framework's ability to make charset assumptions, instead of having iBATIS interfere.

      This is probably not much of an issue in the English-speaking part of the world but where I live it is not uncommon to encounter a project with XML-files that have different charsets.

      Older versions of iBATIS have relied on parsing XML from Reader, which could be justified by the quality of the XML-frameworks of the old days, but today it is no longer justified. - The introduction of iBATIS-3 provides a convenient opportunity to fully abandon the Reader usage and start to parse XML from InputStream exclusively.




            Unassigned Unassigned
            kaipe Henrik Kaipe
            1 Vote for this issue
            1 Start watching this issue