trademark sign ™ not properly inserted.

Database

trademark sign ™ not properly inserted.

I have an web dynpro java application which passes data to teradata from SAP Enterprise Portal. We are using teradata driver 15.

Database URL is as follows jdbc:teradata://levidw6/database=DEV_EDW_DATA,CHARSET=UTF8,LOB_SUPPORT=ON,RECONNECT_COUNT=10.

When we insert any data with Trademark™ symbol, some junk value will be inserted instead of™. But when I open teradata SQL assistant with session charset UTF8 i will be able to see™ and if I select ASCII the value will not be shown.

When I checked from SAP Portal log it is passing correct value i.e. xE2 x84 xA2 UTF8 bytes for ™ which is u+2122 in Unicode

Teradata tables have UNICODE format and The data from SAP Portal will be passed in UTF8 format.

Thanks for your response and time.

4 REPLIES
Teradata Employee

Re: trademark sign ™ not properly inserted.

Data is being inserted / stored correctly and is displayed correctly when you use a client character set translation that includes the necessary symbol.

If you say the client character set is 7-bit ASCII (which is effectively treated as if you said it is the same as internal Teradata LATIN) then it does not display properly - which one should expect since the symbol does not exist in that character set.

There is no problem here. You need to configure ALL your client drivers (load and query) to use something other than the limited, backward-compatible default of ASCII client character set.

Teradata Employee

Re: trademark sign ™ not properly inserted.

The I agree with Fred and recommend the UTF8 client character set in this case. The Trade Mark Sign is not specificed in either the Latin1, or Latin9, ISO-8859 standards. We do support it less commonly used SBC character sets like Latin1250_1A (for cp1250).

Re: trademark sign ™ not properly inserted.

Thanks for the replies experts.

But the thing is teradata is also getting data from someother flat file from which it is showing the trademark sign.

Also this trademark symbol will not be shown in SAP Portal

Teradata Employee

Re: trademark sign ™ not properly inserted.

What JDBC API method are you using to insert the data?

For example, if you are using a PreparedStatement, and you are binding a Java String value to a question-mark parameter marker by calling the PreparedStatement.setString method, then your Java String should contain the trademark symbol as the Unicode character \u2122

Your Java String should NOT contain UTF-encoded bytes xE2 x84 xA2. That won't work.