CODE
Oracle Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
PSOUG Home Code Snippets Oracle Reference Oracle Functions PSOUG Forum Oracle Blogs Bookmark and Share
 
 Search the Reference Library pages:  

Free
Oracle Magazine
Subscriptions
and Oracle White Papers

Oracle UTL_GDK
Version 11.1
 
General Information
Note: GDK stands for Globalization Developer's Kit. GDK is a set of services that can help monolingual application developer to create similar multilingual applications with minimual knowledge about internationalization issues. GDK includes two major components, internet globalization services and Oracle globalization services. GDK includes two major components, internet globalization services and Oracle globalization services. Internet global services can hide the complexity of globalization to support multi-user with different locale. Oracle globalization services provide developer a set of consistent, high performance and easy to use tools in middle-tier as database client.
Source {ORACLE_HOME}/rdbms/admin/utlgdk.sql
First Availability 9.2

Constants
Name Data Type Value
ORACLE_TO_IANA PLS_INTEGER 1
IANA_TO_ORACLE PLS_INTEGER 2
ORACLE_TO_ISO PLS_INTEGER 3
ISO_TO_ORACLE PLS_INTEGER 4
ORACLE_TO_ISO_A3 PLS_INTEGER 5
ISO_A3_TO_ORACLE PLS_INTEGER 6
Dependencies
DBMS_XDBT UTL_GDK_LIB

Globalization Codes
Language Abbreviation

AMERICAN

US
ARABIC AR
BENGALI BN
BRAZILIAN PORTUGESE PTB
BULGARIAN BG
CANADIAN FRENCH FRC
CATALAN CA
CROATIAN HR
CZECH CS
DANISH DK
DUTCH NL
EGYPTIAN EG
ENGLISH GB
ESTONIAN ET
FINISH SF
GERMAN DE
HEBREW HR
HUNGARIAN HU
ISLANDIC IS
POLISH PL
SLOVAK SK
THAI TH
TURKISH TR
UKRANIAN UK
VIETNAMESE VN
 
Charset_Map

Charset Map Function
utl_gdk.charset_map(charset IN VARCHAR2, flag IN BINARY_INTEGER)
RETURN VARCHAR2;
SELECT utl_gdk.charset_map('WE8ISO8859P1', 1)
FROM dual;

SELECT utl_gdk.charset_map('ISO-8859-1', 2)
FROM dual;
 
Language_Map

LanguageMap Function
utl_gdk.language_map(language IN VARCHAR2, flag IN BINARY_INTEGER)
RETURN VARCHAR2;
SELECT utl_gdk.language_map('English', 3) FROM dual;
SELECT utl_gdk.language_map('en', 4) FROM dual;

SELECT utl_gdk.language_map('French', 3) FROM dual;
SELECT utl_gdk.language_map('fr', 4) FROM dual;

SELECT utl_gdk.language_map('German', 3) FROM dual;
SELECT utl_gdk.language_map('de', 4) FROM dual;

SELECT utl_gdk.language_map('Japanese', 3) FROM dual;
SELECT utl_gdk.language_map('ja', 4) FROM dual;

SELECT utl_gdk.language_map('Arabic') FROM dual;
SELECT utl_gdk.language_map('Finnish') FROM dual;
SELECT utl_gdk.language_map('Korean') FROM dual;
SELECT utl_gdk.language_map('Russian') FROM dual;
SELECT utl_gdk.language_map('Slovak') FROM dual;
SELECT utl_gdk.language_map('Spanish') FROM dual;
SELECT utl_gdk.language_map('Thai') FROM dual;
 
Territory_Map

Territory Map Function
utl_gdk.territory_map(territory IN VARCHAR2, flag IN BINARY_INTEGER)
RETURN VARCHAR2;
SELECT utl_gdk.territory_map('AMERICA', 3) FROM dual;
SELECT utl_gdk.territory_map('US', 4) FROM dual;
SELECT utl_gdk.territory_map('AMERICA', 5) FROM dual;
SELECT utl_gdk.territory_map('USA', 6) FROM dual;

SELECT utl_gdk.territory_map('SPAIN', 3) FROM dual;
SELECT utl_gdk.territory_map('ES', 4) FROM dual;
SELECT utl_gdk.territory_map('SPAIN', 5) FROM dual;
SELECT utl_gdk.territory_map('ESP', 6) FROM dual;

SELECT utl_gdk.territory_map('GERMANY', 3) FROM dual;
SELECT utl_gdk.territory_map('DE', 4) FROM dual;
 
Character Set Related Queries

Character Sets
set serveroutput on

BEGIN
  FOR i IN 1..401
  LOOP
    dbms_output.put_line(TO_CHAR(i) || ' ' || nls_charset_name(i));
  END LOOP;
END;
/

Database Installed Language
SELECT name, value
FROM gv$parameter
WHERE name LIKE '%nls%';

col parameter format a40
col value format a40
set linesize 120

SELECT *
FROM gv_$nls_parameters;

SELECT *
FROM nls_database_parameters
WHERE parameter ='NLS_CHARACTERSET';
 
Related Topics
Character Sets
Character Set Functions
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us [203 users online]    © 2010 psoug.org