Incorrect characters returned in UTF8 session
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Incorrect characters returned in UTF8 session... Expand / Collapse
Author
Message
Posted 3/17/2008 11:49:06 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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.

Post #10961
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 1:05pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 9 queries. Compression Disabled.