Oracle UTL_GDK
Version 12.1.0.2

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 11.2.0.3 to 12.1.0.1. Demos are being upgraded to reflect the new Container paradigm as well as EBR (Edition Based Redefinition) and may contain references to CDBs, PDBs, and other objects you may not be familiar with such as CDB_OBJECTS_AE: Welcome to 12c.
Purpose 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.
AUTHID DEFINER
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  
Documented No
First Available 9.2.0.1
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
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/utlgdk.sql
Subprograms
 
CHARSET_MAP
Charset Map Function utl_gdk.charset_map(charset IN VARCHAR2, flag IN BINARY_INTEGER) RETURN VARCHAR2;
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;
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';
Valid NLS Parameters col parameter format a20
col value format a20
col map format a40

SELECT parameter, value, DECODE(parameter, 'CHARACTERSET',
       utl_gdk.charset_map(VALUE), 'LANGUAGE',
       utl_gdk.language_map(VALUE), 'TERRITORY',
       utl_gdk.territory_map(VALUE), 'no function UTL_GDK.'||parameter||'_MAP') AS map
FROM v$nls_valid_values
ORDER BY 1,2;

Related Topics
Character Sets
Character Set Functions
Packages
UTL_LMS

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2014 Daniel A. Morgan All Rights Reserved