No. | 650 | |||||||||||||||||||||||||
Name. | swindler | |||||||||||||||||||||||||
Subject. | Charset 변환 utl_i18n | |||||||||||||||||||||||||
Main Cate. | Oracle | |||||||||||||||||||||||||
Sub Cate. | ||||||||||||||||||||||||||
Date. | 2009-07-20 11:53 | |||||||||||||||||||||||||
Hit. | 4647 (211.36.27.8) | |||||||||||||||||||||||||
File. | ||||||||||||||||||||||||||
오라클에서 charset 변환을 위한 유틸리티 패키지가 존재한다. utl_i18n 아래와 같이 사용할수 있으며 select utl_i18n.unescape_reference(a) from swindler
The chapter contains the following topics: Using UTL_I18nOverviewThe
ConstantsSHIFT_IN CONSTANT PLS_INTEGER :=0; FlagsORACLE_TO_IANA CONSTANT PLS_INTEGER :=0; Summary of UTL_I18N SubprogramsTable 157-1 UTL_I18N Package Subprograms
ESCAPE_REFERENCE FunctionThis function provides a way to specify an escape sequence for predefined characters and multibyte characters that cannot be converted to the character set used by an HTML or XML document. For example, SyntaxUTL_I18N.ESCAPE_REFERENCE( str IN VARCHAR2 CHARCTER SET ANY_CS, ParametersTable 157-2 ESCAPE_REFERENCE Function Parameters
Usage NotesIf the user specifies an invalid character set or a ExamplesUTL_I18N.ESCAPE_REFERENCE('ab'||chr(170),'us7ascii') This returns GET_DEFAULT_CHARSET FunctionThis function returns the default Oracle character set name or the default e-mail safe character set name from an Oracle language name.
SyntaxUTL_I18N.GET_DEFAULT_CHARSET( language IN VARCHAR2, ParametersTable 157-3 GET_DEFAULT_CHARSET Function Parameters
Usage NotesIf the user specifies an invalid language name or an invalid flag, then the function returns a ExamplesGENERIC_CONTEXT, iswindows=FALSEUTL_I18N.GET_DEFAULT_CHARSET('French', UTL_I18N.GENERIC_CONTEXT, FALSE) This returns MAIL_CONTEXT, iswindows=TRUEUTL_I18N.GET_DEFAULT_CHARSET('French', UTL_I18N.MAIL_CONTEXT, TRUE) This returns ' MAIL_CONTEXT, iswindows=FALSEUTL_I18N.GET_DEFAULT_CHARSET('French', UTL_I18N.MAIL_CONTEXT, FALSE) This returns ' MAP_CHARSET FunctionThis function:
SyntaxUTL_I18N.MAP_CHARSET( charset IN VARCHAR2, ParametersTable 157-4 MAP_CHARSET Function Parameters
Usage NotesAn e-mail safe character set is an Oracle character set that is commonly used by applications when they submit e-mail messages. The character set is usually used to convert contents in the database character set to e-mail safe contents. To specify the character set name in the mail header, you should use the corresponding IANA character set name obtained by calling the For example, no e-mail client recognizes message contents in the The steps in this example are as follows:
The function returns a character set name if a match is found. If no match is found or if the flag is invalid, then it returns
ExamplesGeneric ContextUTL_I18N.MAP_CHARSET('iso-8859-1',UTL_I18N.GENERIC_CONTEXT,UTL_I18N.IANA_TO_ This returns ContextUTL_I18N.MAP_CHARSET('WE8DEC', utl_i18n.mail_context, utl_i18n.mail_generic) This returns
MAP_LANGUAGE_FROM_ISO FunctionThis function returns an Oracle language name from an ISO locale name. SyntaxUTL_I18N.MAP_LANGUAGE_FROM_ISO( isolocale IN VARCHAR2) ParametersTable 157-5 MAP_LANGUAGE_FROM_ISO Function Parameters
Usage NotesIf the user specifies an invalid locale string, then the function returns a If the user specifies a locale string that includes only the language (for example, ExamplesUTL_I18N.MAP_LANGUAGE_FROM_ISO('en_US') This returns
MAP_LOCALE_TO_ISO FunctionThis function returns an ISO locale name from an Oracle language name and an Oracle territory name. A valid string must include at least one of the following: a valid Oracle language name or a valid Oracle territory name. SyntaxUTL_I18N.MAP_LOCALE_TO_ISO( ora_language IN VARCHAR2, ParametersTable 157-6 MAP_LOCALE_TO_ISO Function Parameters
Usage NotesIf the user specifies an invalid string, then the function returns a ExamplesUTL_I18N.MAP_LOCALE_TO_ISO('American','America') This returns
MAP_TERRITORY_FROM_ISO FunctionThis function returns an Oracle territory name from an ISO locale. SyntaxUTL_I18N.MAP_TERRITORY_FROM_ISO( isolocale IN VARCHAR2) ParametersTable 157-7 MAP_TERRITORY_FROM_ISO Function Parameters
Usage NotesIf the user specifies an invalid locale string, then the function returns a If the user specifies a locale string that includes only the territory (for example, ExamplesUTL_I18N.MAP_TERRITORY_FROM_ISO('en_US') This returns '
RAW_TO_CHAR FunctionsThis function converts The function is overloaded. The different forms of functionality are described along with the syntax declarations. SyntaxBuffer Conversion: UTL_I18N.RAW_TO_CHAR( data IN RAW, Piecewise conversion converts raw data into character data piece by piece: UTL_I18N.RAW_TO_CHAR( data IN RAW, ParametersTable 157-8 RAW_TO_CHAR Function Parameters
Usage NotesIf the user specifies an invalid character set, ExamplesBuffer ConversionUTL_I18N.RAW_TO_CHAR(hextoraw('616263646566C2AA'), 'utf8') This returns the following string in the database character set: 'abcde'||chr(170) Piecewise ConversionUTL_I18N.RAW_TO_CHAR(hextoraw('616263646566C2AA'),'utf8',shf,slen) This expression returns the following string in the database character set: 'abcde'||chr(170) It also sets The following example converts data from the Internet piece by piece to the database character set. rvalue RAW(1050); END; RAW_TO_NCHAR FunctionsThis function converts The function is overloaded. The different forms of functionality are described along with the syntax declarations. SyntaxBuffer Conversion: UTL_I18N.RAW_TO_NCHAR( data IN RAW, Piecewise conversion converts raw data into character data piece by piece: UTL_I18N.RAW_TO_NCHAR( data IN RAW, RETURN NVARCHAR2; ParametersTable 157-9 RAW_TO_NCHAR Function Parameters
Usage NotesIf the user specifies an invalid character set, ExamplesBuffer ConversionUTL_I18N.RAW_TO_NCHAR(hextoraw('616263646566C2AA'),'utf8') This returns the following string in the national character set: 'abcde'||chr(170) Piecewise ConversionUTL_I18N.RAW_TO_NCHAR(hextoraw('616263646566C2AA'),'utf8', shf, slen) This expression returns the following string in the national character set: 'abcde'||chr(170) It also sets The following example converts data from the Internet piece by piece to the national character set. rvalue RAW(1050); STRING_TO_RAW FunctionThis function converts a SyntaxUTL_I18N.STRING_TO_RAW( data IN VARCHAR2 CHARACTER SET ANY_CS, ParametersTable 157-10 STRING_TO_RAW Function Parameters
Usage NotesIf the user specifies an invalid character set, a ExamplesDECLARE This returns a hex value of UNESCAPE_REFERENCE FunctionThis function returns a string from an input string that contains escape sequences. It decodes each escape sequence to the corresponding character value.
SyntaxUTL_I18N.UNESCAPE_REFERENCE( str IN VARCHAR2 CHARACTER SET ANY_CS) ParametersTable 157-11 UNESCAPE_REFERENCE Function Parameters
Usage NotesIf the user specifies a ExamplesUTL_I18N.UNESCAPE_REFERENCE('abª') This returns [바로가기 링크] : http://coolx.net/cboard/develop/650 |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
[Modify] [Delete] | [Reply] [List] |