Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

difference between WE8ISO8859P1, WE8ISO8859P15 on Oracle 9i and 10 Vs 11g

918923Feb 21 2012 — edited Mar 7 2012
Below is the SQL lists of WE8ISO8859P1 and WE8ISO8859P15 character sets that differ by code position only.


set serveroutput on
declare
i number;
begin
for i in 0..255 loop
declare
ch varchar2(1);
begin
ch := chr(i);
if convert( ch, 'WE8ISO8859P1', 'WE8ISO8859P15') != ch
then
dbms_output.put_line('Difference- Decimal:'|| i ||' Hexa:'|| to_char(i,'XXXX'));
end if;
end;
end loop;
end;
/

when i run this on oracle 9i and 10g I am getting 40 charaters and 11g i am only getting 7

Result on 9i/10g database

************************************
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production

SQL> set serveroutput on
SQL> declare
2 i number;
3 begin
4 for i in 0..255 loop
5 declare
6 ch varchar2(1);
7 begin
8 ch := chr(i);
9 if convert( ch, 'WE8ISO8859P1', 'WE8ISO8859P15') != ch
10 then
11 dbms_output.put_line('Difference- Decimal:'|| i ||' Hexa:'|| to_cha
r(i,'XXXX'));
12 end if;
13 end;
14 end loop;
15 end;
16 /
Difference- Decimal:128 Hexa: 80
Difference- Decimal:129 Hexa: 81
Difference- Decimal:130 Hexa: 82
Difference- Decimal:131 Hexa: 83
Difference- Decimal:132 Hexa: 84
Difference- Decimal:133 Hexa: 85
Difference- Decimal:134 Hexa: 86
Difference- Decimal:135 Hexa: 87
Difference- Decimal:136 Hexa: 88
Difference- Decimal:137 Hexa: 89
Difference- Decimal:138 Hexa: 8A
Difference- Decimal:139 Hexa: 8B
Difference- Decimal:140 Hexa: 8C
Difference- Decimal:141 Hexa: 8D
Difference- Decimal:142 Hexa: 8E
Difference- Decimal:143 Hexa: 8F
Difference- Decimal:144 Hexa: 90
Difference- Decimal:145 Hexa: 91
Difference- Decimal:146 Hexa: 92
Difference- Decimal:147 Hexa: 93
Difference- Decimal:148 Hexa: 94
Difference- Decimal:149 Hexa: 95
Difference- Decimal:150 Hexa: 96
Difference- Decimal:151 Hexa: 97
Difference- Decimal:152 Hexa: 98
Difference- Decimal:153 Hexa: 99
Difference- Decimal:154 Hexa: 9A
Difference- Decimal:155 Hexa: 9B
Difference- Decimal:156 Hexa: 9C
Difference- Decimal:157 Hexa: 9D
Difference- Decimal:158 Hexa: 9E
Difference- Decimal:159 Hexa: 9F
Difference- Decimal:164 Hexa: A4
Difference- Decimal:166 Hexa: A6
Difference- Decimal:168 Hexa: A8
Difference- Decimal:180 Hexa: B4
Difference- Decimal:184 Hexa: B8
Difference- Decimal:188 Hexa: BC
Difference- Decimal:189 Hexa: BD
Difference- Decimal:190 Hexa: BE

PL/SQL procedure successfully completed.

*********************************

Results on 11G database.

SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 21 12:07:40 2012

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from nls_database_parameters
2 where parameter like '%CHARACTERSET';

PARAMETER VALUE
------------------------------ ----------------------------------------
NLS_CHARACTERSET WE8ISO8859P15
NLS_NCHAR_CHARACTERSET AL16UTF16

SQL> set serveroutput on
SQL> declare
2 i number;
3 begin
4 for i in 0..255 loop
5 declare
6 ch varchar2(1);
7 begin
8 ch := chr(i);
9 if convert( ch, 'WE8ISO8859P1', 'WE8ISO8859P15') != ch
10 then
11 dbms_output.put_line('Difference- Decimal:'|| i ||' Hexa:'|| to_cha
r(i,'XXXX'));
12 end if;
13 end;
14 end loop;
15 end;
16 /
Difference- Decimal:164 Hexa: A4
Difference- Decimal:166 Hexa: A6
Difference- Decimal:168 Hexa: A8
Difference- Decimal:180 Hexa: B4
Difference- Decimal:184 Hexa: B8
Difference- Decimal:188 Hexa: BC
Difference- Decimal:189 Hexa: BD
Difference- Decimal:190 Hexa: BE

PL/SQL procedure successfully completed.

SQL>

Edited by: 915920 on 21-Feb-2012 06:55
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 4 2012
Added on Feb 21 2012
1 comment
8,989 views