7 Replies Latest reply on Feb 20, 2003 6:03 AM by laurent wozniak

    MySql Datasource Encoding

    winsome_zhong Newbie

      Hi,I'm a Chinese,so I use gb2312,when I connecting mysql with jdbc directly,I can specified encoding in the URL:

      jdbc:mysql://localhost/test?useUnicode=true&
      characterEncoding=gb2312


      while,when I config a XADatasource in the mysql-service.xml,and try to specify the encoding as this:



      <config-property name="XADataSourceProperties" type="java.lang.String">URL=jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&amp;characterEncoding=gb2312</config-property>
      <config-property name="XADataSourceClass" type="java.lang.String">com.mysql.jdbc.jdbc2.optional.MysqlXaDataSource</config-property>

      it can not work.the console message is:

      [XAManagedConnectionFactory]
      No setter method for attribute
      true&characterEncoding (value=gb2312).


      who can tell me how to specify the encoding of the MySQl XADatasouce in the mysql-server.xml,or,are there any other solution?