Reference to character set in PL/SQL code - US7ASCII vs AL32UTF8

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Reference to character set in PL/SQL code - US7ASCII vs AL32UTF8

Raj Velpuru
We have references to some characters like ampersand as chr(38) in PL/SQL code. And we are about to convert from US7ASCII to AL32UTF8. Will such code need a change after characterset conversion?
Reply | Threaded
Open this post in threaded view
|

Re: Reference to character set in PL/SQL code - US7ASCII vs AL32UTF8

ErmanArslansOracleBlog
Administrator
Hi Raj,

You will use DMU.
Scan first, let's see the DMU's findings.

Here is an example run for you : http://ermanarslan.blogspot.com.tr/2014/10/ebs-122-database-characterset-migration.html
Reply | Threaded
Open this post in threaded view
|

Re: Reference to character set in PL/SQL code - US7ASCII vs AL32UTF8

rvelpuru
I assume DMU takes care of data existing in DB. I am concerned on data that will be inserted afterwards using chr(38) from PL/SQL code. Will it insert ampersand or will it insert some other character as per UTF-8?

Essentially, my question is "Is ampersand referred as chr(38) both in ASCII and UTF-8?"
Reply | Threaded
Open this post in threaded view
|

Re: Reference to character set in PL/SQL code - US7ASCII vs AL32UTF8

ErmanArslansOracleBlog
Administrator
Seems yes.

Here ->

SQL> SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;

VALUE$
--------------------------------------------------------------------------------
AL32UTF8


SQL> CREATE TABLE hr.admin_emp (
         testchar char(1)
);        2    3  

Table created.



SQL> insert into hr.admin_emp values (chr(38));

1 row created.

SQL> commit;

Commit complete.

SQL> select * from hr.admin_emp;

T
-

&
Reply | Threaded
Open this post in threaded view
|

Re: Reference to character set in PL/SQL code - US7ASCII vs AL32UTF8

rvelpuru
Thank you so much.