ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Problem with sql map XML files inside jar
Date Mon, 26 Apr 2010 11:49:03 GMT
Everything everywhere should always be utf-8, IMO. ;-)

ISO-8859-1, WIN-1251, and MacRoman are all of the devil.

Larry


2010/4/26 Björn Raupach <raupach@e2n.de>:
> Ok, solved my issue. I added the following statement before instantiating SqlSessionFactory.
>
> [..]
> Resources.setCharset(Charset.forName("UTF-8"));
> reader = Resources.getResourceAsReader(resource);
> SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader,props);
> [..]
>
> Maybe UTF-8 should be set as the default charset not the system charset. After all the
xml files are declared as utf-8 in the header.
>
> cheers,
> Björn
>
>
>
> On Apr 22, 2010, at 6:42 PM, Björn Raupach wrote:
>
>> Hi,
>>
>> there are some german umlauts in my mapper files. In fact all the column and table
names in the database are in german.  Unit tests run fine. If I create a jar file and include
all the mapper files, the application crashes with an sql exception because the umlauts in
the table name are not properly encoded e.g. Pers‚îú√ÇnlicheKontakte instead of PersönlicheKontakte
>>
>> Has anyone else experienced this issue before?
>>
>> kind regards,
>> Björn---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>> For additional commands, e-mail: user-java-help@ibatis.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message