empire-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis De Brabandere <franci...@gmail.com>
Subject Re: Inserting Chinese characters in SQL-Server
Date Mon, 14 Nov 2011 08:10:34 GMT
Great, thanks for following up on this.

On Sun, Nov 13, 2011 at 10:35 AM, Rainer Döbele <doebele@esteam.de> wrote:
> Hi Francis,
>
> thanks for your investigative work.
> As I can see from your commit you basically found the right piece of code.
> The idea would be to override this in the Microsoft SQLServer driver and add the prefix.
> Unfortunately the method is declared final and I cannot see a good reason for this.
>
> Nevertheless I think it's better to have another protected method that deals with text
encoding.
>
> I'm now beginning to fix this.
>
> Regards
> Rainer
>
>
>> from: francisdb@apache.org [mailto:francisdb@apache.org]
>> to: empire-db-commits@incubator.apache.org
>> re: svn commit: r1200212 - in /incubator/empire-db/trunk/empire-
>> db: pom.xml src/test/java/org/apache/empire/DBResource.java
>> src/test/java/org/apache/empire/db/mssql/DBDatabaseDriverMSSqlTest.java
>>
>> Author: francisdb
>> Date: Thu Nov 10 08:27:46 2011
>> New Revision: 1200212
>>
>> URL: http://svn.apache.org/viewvc?rev=1200212&view=rev
>> Log:
>> EMPIREDB-122
>> Chinese characters being inserted as ??? on SqlServer (non-prepared
>> statement)
>> Added JTDS driver for testing
>>
>> Modified:
>>     incubator/empire-db/trunk/empire-db/pom.xml
>>     incubator/empire-db/trunk/empire-
>> db/src/test/java/org/apache/empire/DBResource.java
>>     incubator/empire-db/trunk/empire-
>> db/src/test/java/org/apache/empire/db/mssql/DBDatabaseDriverMSSqlTest.j
>> ava
>>
>> Modified: incubator/empire-db/trunk/empire-db/pom.xml
>> URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-
>> db/pom.xml?rev=1200212&r1=1200211&r2=1200212&view=diff
>> =======================================================================
>> =======
>> --- incubator/empire-db/trunk/empire-db/pom.xml (original)
>> +++ incubator/empire-db/trunk/empire-db/pom.xml Thu Nov 10 08:27:46
>> 2011
>> @@ -68,6 +68,12 @@
>>                       <artifactId>mysql-connector-java</artifactId>
>>                       <version>5.1.14</version>
>>                       <scope>test</scope>
>> +             </dependency>
>> +             <dependency>
>> +                 <groupId>net.sourceforge.jtds</groupId>
>> +                 <artifactId>jtds</artifactId>
>> +                 <version>1.2.4</version>
>> +                 <scope>test</scope>
>>               </dependency> -->
>>               <dependency>
>>                   <groupId>commons-io</groupId>
>>
>> Modified: incubator/empire-db/trunk/empire-
>> db/src/test/java/org/apache/empire/DBResource.java
>> URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-
>> db/src/test/java/org/apache/empire/DBResource.java?rev=1200212&r1=12002
>> 11&r2=1200212&view=diff
>> =======================================================================
>> =======
>> --- incubator/empire-db/trunk/empire-
>> db/src/test/java/org/apache/empire/DBResource.java (original)
>> +++ incubator/empire-db/trunk/empire-
>> db/src/test/java/org/apache/empire/DBResource.java Thu Nov 10 08:27:46
>> 2011
>> @@ -109,8 +109,13 @@ public class DBResource extends External
>>          MSSQL(
>>                "com.microsoft.sqlserver.jdbc.SQLServerDriver",
>>                "jdbc:sqlserver://localhost:1433",
>> +              DBDatabaseDriverMSSQL.class),
>> +        MSSQL_JTDS(
>> +              //
>> http://jtds.sourceforge.net/faq.html#driverImplementation
>> +              "net.sourceforge.jtds.jdbc.Driver",
>> +
>> "jdbc:jtds:sqlserver://localhost/databasename;instance=sqlexpress;domai
>> n=mydomain",
>>                DBDatabaseDriverMSSQL.class);
>> -
>> +
>>          private final String jdbcClass;
>>          private final String jdbcURL;
>>          private final Class<? extends DBDatabaseDriver> driver;
>>
>> Modified: incubator/empire-db/trunk/empire-
>> db/src/test/java/org/apache/empire/db/mssql/DBDatabaseDriverMSSqlTest.j
>> ava
>> URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-
>> db/src/test/java/org/apache/empire/db/mssql/DBDatabaseDriverMSSqlTest.j
>> ava?rev=1200212&r1=1200211&r2=1200212&view=diff
>> =======================================================================
>> =======
>> --- incubator/empire-db/trunk/empire-
>> db/src/test/java/org/apache/empire/db/mssql/DBDatabaseDriverMSSqlTest.j
>> ava (original)
>> +++ incubator/empire-db/trunk/empire-
>> db/src/test/java/org/apache/empire/db/mssql/DBDatabaseDriverMSSqlTest.j
>> ava Thu Nov 10 08:27:46 2011
>> @@ -38,7 +38,7 @@ public class DBDatabaseDriverMSSqlTest
>>  {
>>
>>       @Rule
>> -     public DBResource dbResource = new DBResource(DB.MSSQL);
>> +     public DBResource dbResource = new DBResource(DB.MSSQL_JTDS);
>>
>>       @Test
>>       public void testChineseCharacters()
>>
>
>



-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

Mime
View raw message