Oracle UTL_GDK
Version 18.3.0.1

General Information
Library Note Morgan's Library Page Header
Coming to OpenWorld 2018? Be sure to visit the TidalScale booth in Moscone South and learn how to solve performance problems and lower costs with Software Defined Servers. Before you visit the booth, or if you can't make it this year, check out TidalScale at www.tidalscale.com. Be sure to click on the Solutions link and look through the Oracle resources.
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;
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;
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
    IF nls_charset_name(i) IS NOT NULL THEN
      dbms_output.put_line(TO_CHAR(i) || ' ' || nls_charset_name(i));
    END IF;
  END LOOP;
END;
/

1 US7ASCII
2 WE8DEC
3 WE8HP
4 US8PC437
5 WE8EBCDIC37
6 WE8EBCDIC500
7 WE8EBCDIC1140
8 WE8EBCDIC285
9 WE8EBCDIC1146
10 WE8PC850
11 D7DEC
12 F7DEC
13 S7DEC
14 E7DEC
15 SF7ASCII
16 NDK7DEC
17 I7DEC
18 NL7DEC
19 CH7DEC
20 YUG7ASCII
21 SF7DEC
22 TR7DEC
23 IW7IS960
25 IN8ISCII
27 WE8EBCDIC1148
28 WE8PC858
31 WE8ISO8859P1
32 EE8ISO8859P2
33 SE8ISO8859P3
34 NEE8ISO8859P4
35 CL8ISO8859P5
36 AR8ISO8859P6
37 EL8ISO8859P7
38 IW8ISO8859P8
39 WE8ISO8859P9
40 NE8ISO8859P10
41 TH8TISASCII
42 TH8TISEBCDIC
43 BN8BSCII
44 VN8VN3
45 VN8MSWIN1258
46 WE8ISO8859P15
47 BLT8ISO8859P13
48 CEL8ISO8859P14
49 CL8ISOIR111
50 WE8NEXTSTEP
51 CL8KOI8U
52 AZ8ISO8859P9E
61 AR8ASMO708PLUS
70 AR8EBCDICX
72 AR8XBASIC
81 EL8DEC
82 TR8DEC
90 WE8EBCDIC37C
91 WE8EBCDIC500C
92 IW8EBCDIC424
93 TR8EBCDIC1026
94 WE8EBCDIC871
95 WE8EBCDIC284
96 WE8EBCDIC1047
97 WE8EBCDIC1140C
98 WE8EBCDIC1145
99 WE8EBCDIC1148C
100 WE8EBCDIC1047E
101 WE8EBCDIC924
110 EEC8EUROASCI
113 EEC8EUROPA3
114 LA8PASSPORT
140 BG8PC437S
150 EE8PC852
152 RU8PC866
153 RU8BESTA
154 IW8PC1507
155 RU8PC855
156 TR8PC857
158 CL8MACCYRILLIC
159 CL8MACCYRILLICS
160 WE8PC860
161 IS8PC861
162 EE8MACCES
163 EE8MACCROATIANS
164 TR8MACTURKISHS
165 IS8MACICELANDICS
166 EL8MACGREEKS
167 IW8MACHEBREWS
170 EE8MSWIN1250
171 CL8MSWIN1251
172 ET8MSWIN923
173 BG8MSWIN
174 EL8MSWIN1253
175 IW8MSWIN1255
176 LT8MSWIN921
177 TR8MSWIN1254
178 WE8MSWIN1252
179 BLT8MSWIN1257
180 D8EBCDIC273
181 I8EBCDIC280
182 DK8EBCDIC277
183 S8EBCDIC278
184 EE8EBCDIC870
185 CL8EBCDIC1025
186 F8EBCDIC297
187 IW8EBCDIC1086
188 CL8EBCDIC1025X
189 D8EBCDIC1141
190 N8PC865
191 BLT8CP921
192 LV8PC1117
193 LV8PC8LR
194 BLT8EBCDIC1112
195 LV8RST104090
196 CL8KOI8R
197 BLT8PC775
198 DK8EBCDIC1142
199 S8EBCDIC1143
200 I8EBCDIC1144
201 F7SIEMENS9780X
202 E7SIEMENS9780X
203 S7SIEMENS9780X
204 DK7SIEMENS9780X
205 N7SIEMENS9780X
206 I7SIEMENS9780X
207 D7SIEMENS9780X
208 F8EBCDIC1147
210 WE8GCOS7
211 EL8GCOS7
221 US8BS2000
222 D8BS2000
223 F8BS2000
224 E8BS2000
225 DK8BS2000
226 S8BS2000
230 WE8BS2000E
231 WE8BS2000
232 EE8BS2000
233 CE8BS2000
235 CL8BS2000
239 WE8BS2000L5
241 WE8DG
251 WE8NCR4970
261 WE8ROMAN8
262 EE8MACCE
263 EE8MACCROATIAN
264 TR8MACTURKISH
265 IS8MACICELANDIC
266 EL8MACGREEK
267 IW8MACHEBREW
277 US8ICL
278 WE8ICL
279 WE8ISOICLUK
301 EE8EBCDIC870C
311 EL8EBCDIC875S
312 TR8EBCDIC1026S
314 BLT8EBCDIC1112S
315 IW8EBCDIC424S
316 EE8EBCDIC870S
317 CL8EBCDIC1025S
319 TH8TISEBCDICS
320 AR8EBCDIC420S
322 CL8EBCDIC1025C
323 CL8EBCDIC1025R
324 EL8EBCDIC875R
325 CL8EBCDIC1158
326 CL8EBCDIC1158R
327 EL8EBCDIC423R
351 WE8MACROMAN8
352 WE8MACROMAN8S
353 TH8MACTHAI
354 TH8MACTHAIS
368 HU8CWI2
380 EL8PC437S
381 EL8EBCDIC875
382 EL8PC737
383 LT8PC772
384 LT8PC774
385 EL8PC869
386 EL8PC851
390 CDN8PC863
401 HU8ABMOD
Database Installed Language SQL> SELECT name, value
FROM gv$parameter
WHERE name LIKE '%nls%'; 2 3

NAME                     VALUE
------------------------ ------------------------------
nls_language             AMERICAN
nls_territory            AMERICA
nls_sort
nls_date_language
nls_date_format          DD-MON-YYYY HH24:MI:SS
nls_currency
nls_numeric_characters
nls_iso_currency
nls_calendar
nls_time_format
nls_timestamp_format
nls_time_tz_format
nls_timestamp_tz_format
nls_dual_currency
nls_comp                 BINARY
nls_length_semantics     BYTE
nls_nchar_conv_excp      FALSE

SQL> col parameter format a25
SQL> col value format a30
SQL> set linesize 120

SQL> SELECT *
  2  FROM gv_$nls_parameters;

 INST_ID PARAMETER                 VALUE                       CON_ID
-------- ------------------------- --------------------------- ------
       1 NLS_LANGUAGE              AMERICAN                         1
       1 NLS_TERRITORY             AMERICA                          1
       1 NLS_CURRENCY              $                                1
       1 NLS_ISO_CURRENCY          AMERICA                          1
       1 NLS_NUMERIC_CHARACTERS    .,                               1
       1 NLS_CALENDAR              GREGORIAN                        1
       1 NLS_DATE_FORMAT           DD-MON-YYYY HH24:MI:SS           1
       1 NLS_DATE_LANGUAGE         AMERICAN                         1
       1 NLS_CHARACTERSET          AL32UTF8                         1
       1 NLS_SORT                  BINARY                           1
       1 NLS_TIME_FORMAT           HH.MI.SSXFF AM                   1
       1 NLS_TIMESTAMP_FORMAT      DD-MON-RR HH.MI.SSXFF AM         1
       1 NLS_TIME_TZ_FORMAT        HH.MI.SSXFF AM TZR               1
       1 NLS_TIMESTAMP_TZ_FORMAT   DD-MON-RR HH.MI.SSXFF AM TZR     1
       1 NLS_DUAL_CURRENCY         $                                1
       1 NLS_NCHAR_CHARACTERSET    AL16UTF16                        1
       1 NLS_COMP                  BINARY                           1
       1 NLS_LENGTH_SEMANTICS      BYTE                             1
       1 NLS_NCHAR_CONV_EXCP       FALSE                            1

SQL> SELECT *
  2  FROM nls_database_parameters
  3  WHERE parameter = 'NLS_CHARACTERSET';

PARAMETER         VALUE
----------------- ------------------------------
NLS_CHARACTERSET  AL32UTF8
Valid NLS Parameters col parameter format a20
col value format a25
col map format a30

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
Built-in Functions
Built-in Packages
Character Set Functions
Packages
UTL_LMS
What's New In 12cR2
What's New In 18cR3

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-2017 Daniel A. Morgan All Rights Reserved