In Oracle, convert()
function converts the character string from the character set to a character set specified in parameters. If the source character set is not specified, it defaults to the character set of the database.
Syntax
convert(string, destination_set, [source_set])
Common Character Sets include those listed below:
Character Set Identifier | Description |
---|---|
US7ASCII | U.S. 7-bit ASCII. This is the character set used by most Unix operating systems and Oracle databases on Unix. |
WE8DEC | DEC West European 8-bit. |
WE8HP | HP West European Laserjet 8-bit. |
F7DEC | DEC French 7-bit. |
WE8EBCDIC500 | IBM West European EBCDIC Code Page 500. This is a character set used by most PC systems and by Oracle running on PCs. |
WE8ISO8859P1 | ISO-8859-1 West European 8-bit. |
For complete conversion, the destination character set should contain a representation of all the characters in the source character set. If not, then a replacement character set is used in the destination. This replacement character is part of the character set definition itself.
Example
Select convert('Groß', 'WE8HP', 'WE8DEC') "Conversion" from Dual;
Output
Conversion ----------- Groß