|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 3/17/2008 4:06:15 PM
Posts: 1,
Visits: 9
|
|
When using JDBC to retrieve characters from a char column in UTF8 charset session, we get a character string of double the size of the column length. Does anyone know why and how to workaound it?
For example:
1. connect to the database in UTF8 session
jdbc:teradata://td/CHARSET=UTF8
2. create table and insert data
CREATE TABLE employee (empName CHAR(10));
INSERT INTO empolyee values('a');
3. SELECT empName from employee
The length of empName is 20. (Wrong!)
4. connect to the database in default charset session
jdbc:teradata://td
5. SELECT empName from employee
The length of empName is 10. (Correct!)
I'm using JDBC Driver 12.0.0.1 and the database is V2R6.
|
|
|
|