Exended Ascii to Character [message #490796] |
Thu, 27 January 2011 07:10  |
gp185007
Messages: 45 Registered: April 2005 Location: Mumbai
|
Member |
|
|
Hi,
I have requirement to convert the extended ascii to character.
Is there any function available .
Thanks in advance.
Thanks and Regards,
Ganesh.
|
|
|
|
|
Re: Exended Ascii to Character [message #490878 is a reply to message #490796] |
Thu, 27 January 2011 23:36   |
gp185007
Messages: 45 Registered: April 2005 Location: Mumbai
|
Member |
|
|
Hi,
I tried using CHR function, however it works fine for ascii characters from 0 --127.
For Extended ascii characters output does not match with Extended Ascii character set. (Pls refer to attached file).
Regards,
Ganesh
|
|
|
|
|
Re: Exended Ascii to Character [message #490902 is a reply to message #490886] |
Fri, 28 January 2011 02:17   |
gp185007
Messages: 45 Registered: April 2005 Location: Mumbai
|
Member |
|
|
Yes,
I tried using the below character set convert function.
Character Set Description
US7ASCII US 7-bit ASCII character set
WE8DEC West European 8-bit character set
WE8HP HP West European Laserjet 8-bit character set
F7DEC DEC French 7-bit character set
WE8EBCDIC500 IBM West European EBCDIC Code Page 500
WE8PC850 IBM PC Code Page 850
WE8ISO8859P1 ISO 8859-1 West European 8-bit character set
However, I tried to use convert function as below but unable to get the corresponding ascii value of 207.
E.g
select convert('╩', 'WE8ISO8859P1','US7ASCII' ) from dual;
I tried with all combinations.
Any help highly appreciated.
Regards,
Ganesh
|
|
|
Re: Exended Ascii to Character [message #490905 is a reply to message #490902] |
Fri, 28 January 2011 02:36   |
 |
Michel Cadot
Messages: 68765 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote:unable to get the corresponding ascii value of 207
Because chr(207) does not exist in US7ASCII. The CONVERT function takes as second parameter the TARGET character set and as third one the source character set, so in your case it should be:
convert(char(207), 'US7ASCII', 'WE8ISO8859P1')
So you get:
SQL> select chr(207), convert(chr(207), 'US7ASCII', 'WE8ISO8859P1') from dual;
C C
- -
Ï I
which is correct, isn't it.
Regards
Michel
[Updated on: Fri, 28 January 2011 02:36] Report message to a moderator
|
|
|
Re: Exended Ascii to Character [message #490948 is a reply to message #490905] |
Fri, 28 January 2011 04:28   |
gp185007
Messages: 45 Registered: April 2005 Location: Mumbai
|
Member |
|
|
Hi,
Just to give final goal.
We need to generating a extract in which the amount fileds are EBCDIC signed packed fields.
Since we do not have built in Oracle function to do this conversion, we need to find some manual workaround to do this.
Regards,
Ganesh
|
|
|
|