<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Implement locales for international data sets</title>
    <link>/en/admin/configuring-db/config-procedure/implement-locales-international-data-sets/</link>
    <description>Recent content in Implement locales for international data sets on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/admin/configuring-db/config-procedure/implement-locales-international-data-sets/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Admin: Specify the default locale for the database</title>
      <link>/en/admin/configuring-db/config-procedure/implement-locales-international-data-sets/specify-default-locale-db/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/configuring-db/config-procedure/implement-locales-international-data-sets/specify-default-locale-db/</guid>
      <description>
        
        
        &lt;p&gt;After you start the database, the default locale configuration parameter, &lt;code&gt;DefaultSessionLocale&lt;/code&gt;, sets the initial locale. You can override this value for individual sessions.&lt;/p&gt;
&lt;p&gt;To set the locale for the database, use the configuration parameter as follows:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ALTER DATABASE DEFAULT SET DefaultSessionLocale = &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;ICU-locale-identifier&lt;/span&gt;&amp;#39;;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ALTER DATABASE DEFAULT SET DefaultSessionLocale = &amp;#39;en_GB&amp;#39;;
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Admin: Override the default locale for a session</title>
      <link>/en/admin/configuring-db/config-procedure/implement-locales-international-data-sets/override-default-locale-session/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/configuring-db/config-procedure/implement-locales-international-data-sets/override-default-locale-session/</guid>
      <description>
        
        
        &lt;p&gt;You can override the default locale for the current session in two ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;VSQL command 
&lt;code&gt;&lt;a href=&#34;../../../../../en/connecting-to/using-vsql/meta-commands/locale/#&#34;&gt;\locale&lt;/a&gt;&lt;/code&gt;. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \locale en_GBINFO:
INFO 2567:  Canonical locale: &amp;#39;en_GB&amp;#39;
Standard collation: &amp;#39;LEN&amp;#39;
English (United Kingdom)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SQL statement 
&lt;code&gt;&lt;a href=&#34;../../../../../en/sql-reference/statements/set-statements/set-locale/#&#34;&gt;SET LOCALE&lt;/a&gt;&lt;/code&gt;. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SET LOCALE TO en_GB;
INFO 2567:  Canonical locale: &amp;#39;en_GB&amp;#39;
Standard collation: &amp;#39;LEN&amp;#39;
English (United Kingdom)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both methods accept locale &lt;a href=&#34;../../../../../en/admin/about-locale/specifying-locale-short-form/&#34;&gt;short&lt;/a&gt; and &lt;a href=&#34;../../../../../en/admin/about-locale/specifying-locale-long-form/&#34;&gt;long&lt;/a&gt; forms. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SET LOCALE TO LEN;
INFO 2567:  Canonical locale: &amp;#39;en&amp;#39;
Standard collation: &amp;#39;LEN&amp;#39;
English
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; \locale LEN
INFO 2567:  Canonical locale: &amp;#39;en&amp;#39;
Standard collation: &amp;#39;LEN&amp;#39;
English
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../../../en/sql-reference/statements/set-statements/set-locale/#&#34;&gt;SET LOCALE&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Server versus client locale settings</title>
      <link>/en/admin/configuring-db/config-procedure/implement-locales-international-data-sets/server-versus-client-locale-settings/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/configuring-db/config-procedure/implement-locales-international-data-sets/server-versus-client-locale-settings/</guid>
      <description>
        
        
        &lt;p&gt;The database differentiates database server locale settings from client application locale settings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Server locale settings only impact collation behavior for server-side query processing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Client applications verify that locale is set appropriately in order to display characters correctly.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following sections describe best practices to ensure predictable results.&lt;/p&gt;
&lt;h2 id=&#34;server-locale&#34;&gt;Server locale&lt;/h2&gt;
&lt;p&gt;The server session locale should be set as described in &lt;a href=&#34;../../../../../en/admin/configuring-db/config-procedure/implement-locales-international-data-sets/specify-default-locale-db/#&#34;&gt;Specify the default locale for the database&lt;/a&gt;. If locales vary across different sessions, set the server locale at the start of each session from your client.&lt;/p&gt;
&lt;h2 id=&#34;vsql-client&#34;&gt;vsql client&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If the database does not have a default session locale, &lt;a href=&#34;../../../../../en/admin/configuring-db/config-procedure/implement-locales-international-data-sets/override-default-locale-session/&#34;&gt;set the server locale for the session to the desired locale&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The locale setting in the terminal emulator where the vsql client runs should be set to be equivalent to session locale setting on the server side (ICU locale). By doing so, the data is collated correctly on the server and displayed correctly on the client.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All input data for vsql should be in UTF-8, and all output data is encoded in UTF-8.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The database does not support non UTF-8 encodings and associated locale values.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For instructions on setting locale and encoding, refer to your terminal emulator documentation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;odbc-clients&#34;&gt;ODBC clients&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;ODBC applications can be either in ANSI or Unicode mode. If the user application is Unicode, the encoding used by ODBC is UCS-2. If the user application is ANSI, the data must be in single-byte ASCII, which is compatible with UTF-8 used on the database server. The ODBC driver converts UCS-2 to UTF-8 when passing to the server and converts data sent by the server from UTF-8 to UCS-2.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the user application is not already in UCS-2, the application must convert the input data to UCS-2, or unexpected results could occur. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;For non-UCS-2 data passed to ODBC APIs, when it is interpreted as UCS-2, it could result in an invalid UCS-2 symbol being passed to the APIs, resulting in errors.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The symbol provided in the alternate encoding could be a valid UCS-2 symbol. If this occurs, incorrect data is inserted into the database.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the database does not have a default session locale, ODBC applications should set the desired server session locale using &lt;code&gt;SQLSetConnectAttr&lt;/code&gt; (if different from database wide setting). By doing so, you get the expected collation and string functions behavior on the server.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;jdbc-and-adonet-clients&#34;&gt;JDBC and ADO.NET clients&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;JDBC and ADO.NET applications use a UTF-16 character set encoding and are responsible for converting any non-UTF-16 encoded data to UTF-16. The same cautions apply as for ODBC if this encoding is violated.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The JDBC and ADO.NET drivers convert UTF-16 data to UTF-8 when passing to the server and convert data sent by the server from UTF-8 to UTF-16.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If there is no default session locale at the database level, JDBC and ADO.NET applications should set the correct server session locale by executing the &lt;a href=&#34;../../../../../en/sql-reference/statements/set-statements/set-locale/&#34;&gt;SET LOCALE TO&lt;/a&gt; command in order to get the expected collation and string functions behavior on the server. For more information, see &lt;a href=&#34;../../../../../en/sql-reference/statements/set-statements/set-locale/#&#34;&gt;SET LOCALE&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
