i encountered a character set problem make me headache, please someone can help me.
there is a table t_special with database sever character set 'LATIN', then i execute the sql insert into t_special (specialchar) values('FF'xc) with session character set 'LATIN1_0A'. (column specialchar is varchar(10) type).
i execute the sql "select specialchar from t_special" with session character set 'LATIN1_0A' by jdbc, but the result hex value is not 0XFF, it is changed to 0X1A, someone can help me ?
You mentioned that column specialchar is varchar(10), but what is its character set? Specifically, is the "specialchar" column declared as:
specialchar varchar(10) character set latin
specialchar varchar(10) character set unicode
Are you trying to use the Euro sign? That won't work with session character set LATIN1_0A.
According to the Teradata Database Reference / International Character Set Support / Chapter 2 "Client Character Set Options" / section "ASCII Client Character Set Support", the session character set LATIN1_0A correspond to International standard character set ISO 8859-1.
International standard character set ISO 8859-1 is described on this Wikipedia page https://en.wikipedia.org/wiki/ISO/IEC_8859-1 and it says "ISO/IEC 8859-1 is missing some characters for French and Finnish text and the euro sign."
So you cannot use the Euro sign with session character set LATIN1_0A.
Instead, you should use a Unicode session character such as UTF8 or UTF16.