Send feedback on this topic.
Teradata.Client.Provider
SessionCharacterSet Property



Teradata.Client.Provider Namespace > TdConnectionStringBuilder Class : SessionCharacterSet Property
Gets or sets the character encoding (Text.Encoding) for the connection.
Syntax
'Declaration
 
Public Property SessionCharacterSet As String
'Usage
 
Dim instance As TdConnectionStringBuilder
Dim value As String
 
instance.SessionCharacterSet = value
 
value = instance.SessionCharacterSet
public string SessionCharacterSet {get; set;}
public:
property String^ SessionCharacterSet {
   String^ get();
   void set (    String^ value);
}

Property Value

Default value is ASCII.

Exceptions
ExceptionDescription

Invalid session character set.

Valid values are: ASCII, ARABIC1256_6A0, CYRILLIC1251_2A0, HANGUL949_7R0, HEBREW1255_5A0, KANJI932_1S0, KANJISJIS_0S, LATIN1250_1A0, LATIN1252_3A0, LATIN1254_7A0, LATIN1258_8A0, SCHINESE936_6R0, TCHINESE950_8R0, THAI874_4A0, UTF8 and UTF16.

Remarks

The Data Provider encodes Unicode characters to bytes before it sends character data to Advanced SQL Engine. Data Provider also decodes bytes to Unicode characters when it receives character data from the SQL Engine. Data Provider will create an instance of Text.Encoding class initialized with Windows Code Page corresponding to Teradata Session Character set as described below.

Data Provider supports the following Session Character Sets and the corresponding Windows Code Pages:

Session Character Set Name Windows Code Page
ASCII ANSI Code page associated with the current thread of execution (Globalization.TextInfo.ANSICodePage).
ARABIC1256_6A0 1256
CYRILLIC1251_2A0 1251
HANGUL949_7R0 949
HEBREW1255_5A0 1255
KANJI932_1S0 932
KANJISJIS_0S 932
LATIN1250_1A0 1250
LATIN1252_3A0 1252
LATIN1254_7A0 1254
LATIN1258_8A0 1258
SCHINESE936_6R0 936
TCHINESE950_8R0 950
THAI874_4A0 874
UTF8 65001
UTF16 1200

the Advanced SQL Engine supports LATIN, UNICODE and KANJISJIS Server Character Sets. UTF8 and UTF16 Session Character Sets are compatible with all Server Character Sets. LATIN1252_3A0 is compatible with LATIN and UNICODE Server Character Sets. KANJI932_1S0 Session Character Set is compatible with UNICODE Server Character Sets. The remaining Session Character Sets are compatible with UNICODE Sever Character Set. ASCII is compatible with LATIN, UNICODE and KANJISJIS as long as character code-points are within the ASCII range.

The KANJISJIS_0S character set includes all the characters in the JIS X 0201 and JIS X 0208 standards, plus extensions, including single-byte Hankaku Katakana characters and multi-byte Kanji characters. KANJISJIS_0S is not 100% compatible with the latest Windows code page 932 as the mapping to Unicode is different for several Japanese characters including the Yen symbol. Therefore, the best practice is to use KANJI932_1S0, UTF8 or UTF16 Session Character Sets with the UNICODE Server Character Set.

The International Character Set Support manual has additional information about Windows compatible session character sets. The manual describes how to enable one or more of the session character sets. Windows compatible session character sets are disabled by default.

Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdConnectionStringBuilder Class
TdConnectionStringBuilder Members