Ibatis 2.2 Ignores XML encoding

At my company, we’re using Ibatis to do operations on Oracle databases. As most of our software is designed to be international, we keep our XML files in UTF-8 encoding. Recently we discovered that Ibatis had some trouble parsing the XML files when we were using diacritics in them. As it turns out, Ibatis 2.2 actually ignores the “UTF-8” setting in the XML file header altogether.

This was actually reported as an issue at apache’s issue tracker, and fixed in Ibatis release 2.3 and upward. In the meantime, if you can not swich to a new release because of tight deadlines and no time for regression tests, you can set the file.encoding property to UTF-8, because then Ibatis will parse the XML in the correct encoding.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s