Unicode in php oracle
While using multilanguage in php/oracle iam facing some issues
i gave input as : Portuguese: O próximo vôo à
and got output as : Portuguese: O pr?ximo v?o ?
for some special characters it is replaced by '?' mark.
iam using php5 and orcle 9 and OCI for connecting.
i gave NLS_CHARACTERSET as UTF8
and the unicode datatype as NVARCHAR2(100)
Plz some one help me out in solving it
hi..
using alter session in php i changed my nsl_lang to PORTUGUESE
but still the data is stored in ? for some special characers
Array
[PARAMETER] => Array
[0] => NLS_LANGUAGE
[1] => NLS_TERRITORY
[2] => NLS_CURRENCY
[3] => NLS_ISO_CURRENCY
[4] => NLS_NUMERIC_CHARACTERS
[5] => NLS_CALENDAR
[6] => NLS_DATE_FORMAT
[7] => NLS_DATE_LANGUAGE
[8] => NLS_CHARACTERSET
[9] => NLS_SORT
[10] => NLS_TIME_FORMAT
[11] => NLS_TIMESTAMP_FORMAT
[12] => NLS_TIME_TZ_FORMAT
[13] => NLS_TIMESTAMP_TZ_FORMAT
[14] => NLS_DUAL_CURRENCY
[15] => NLS_NCHAR_CHARACTERSET
[16] => NLS_COMP
[17] => NLS_LENGTH_SEMANTICS
[18] => NLS_NCHAR_CONV_EXCP
[VALUE] => Array
[0] => PORTUGUESE
[1] => AMERICA
[2] => $
[3] => AMERICA
[4] => .,
[5] => GREGORIAN
[6] => DD-MON-RR
[7] => PORTUGUESE
[8] => UTF8
[9] => WEST_EUROPEAN
[10] => HH.MI.SSXFF AM
[11] => DD-MON-RR HH.MI.SSXFF AM
[12] => HH.MI.SSXFF AM TZR
[13] => DD-MON-RR HH.MI.SSXFF AM TZR
[14] => $
[15] => AL16UTF16
[16] => BINARY
[17] => BYTE
[18] => FALSE
Input i gave : próximo vôo à
out put : pr??ximo v??o ??
Similar Messages
-
Unable to show Unicode Data in Oracle RESTful Service JSON
Hi Everyone.
I have stored unicode data in Oracle database and when i retrieve in sql query it is showing the same. But when i retrieve the data in json using oracle RESTful web service (GET), it bringing with unknown character as shown below.
next: {},$ref: "http://000.00.00.00:8085/ords/mobile/sch/loginm/?user=SURESH&pwd=123&page=1"
items: [
uri: {},$ref: "http://000.00.00.00:8085/ords/mobile/sch/loginm/41"
stud_id: 41,
stud_code: "1001",
stud_name: "அப்துல் ஜப்பார்"
My Database Setup as below:
SQL> SELECT name,value$ FROM sys.props$;
NAME VALUE$
DICT.BASE 2
DEFAULT_TEMP_TABLESPACE TEMP
DEFAULT_PERMANENT_TABLESPACE USERS
DEFAULT_EDITION ORA$BASE
Flashback Timestamp TimeZone GMT
TDE_MASTER_KEY_ID
DBTIMEZONE -07:00
DST_UPGRADE_STATE NONE
DST_PRIMARY_TT_VERSION 11
DST_SECONDARY_TT_VERSION 0
DEFAULT_TBS_TYPE SMALLFILE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET AL32UTF8
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 11.2.0.1.0
GLOBAL_DB_NAME MOBILE
EXPORT_VIEWS_VERSION
SQL> select DECODE(parameter, 'NLS_CHARACTERSET', 'CHARACTER SET',
2 'NLS_LANGUAGE', 'LANGUAGE',
3 'NLS_TERRITORY', 'TERRITORY') name,
4 value from v$nls_parameters
5 WHERE parameter IN ( 'NLS_CHARACTERSET', 'NLS_LANGUAGE', 'NLS_TERRITORY');
NAME VALUE
LANGUAGE AMERICAN
TERRITORY AMERICA
CHARACTER SET AL32UTF8
8
WORKLOAD_CAPTURE_MODE
WORKLOAD_REPLAY_MODE
Awaiting you solution.
-- Abdul JabbarKumar,
Ftping the PG.xml to mds folder will not help the page to goto MDS directory
You have to import the file using xmlimporter
I understand you have done the import, but it is not success.
Could you please post what is the script you used to import the PG.xml
and once you run what was the output you have got.
May be you can refer the URL for the scripts
http://apps2fusion.com/at/61-kv/331-oa-framework-scripts
With regards,
Kali.
OSSI. -
Insert Unicode Characters Into Oracle 8.1.5
Hello,
First off, here are the specs:
Oracle 8.1.5
JDK 1.2.1
Oracle8i 8.1.6.2.0 JDBC Drivers for use with JDK 1.2.x for Solaris
I'm running into a problem with insert Unicode characters into Oracle via the JDBC driver. As you can see above, I am using the Oracle 8.1.6.2.0 JDBC driver because it is the first driver with supports the JDK 1.2.x. So I think I should be okay.
I can retrieve data with special characters from Oracle by calling the getBytes() method from the ResultSet with all special characters being intact. I am using getBytes because calling getString() would throw the following exception: "java.sql.SQLException(): Fail to convert between UTF8 and UCS2: failUTF8Conv". However, with that value that I just retrieved, or any other data with special characters (unicode) in which I try to insert into Oracle does not get converted properly.
What appears to be happening is that data with special characters (unicode), are not being treated as a single double byte character, but rather two single byte characters. Thus, R|ckschlagventil becomes RC<ckschlagventil once it is inserted. (Hopefully, my example will be rendered properly).
According to all documentation that I have found, the JDBC driver should not have any problem with converting UCS2 Java Strings to Oracle's UTF8 character set.
I have set Oracle's NLS_NCHAR_CHARACTERSET to UTF8. I am also setting the environment variable NLS_LANG to AMERICAN_AMERICA.UTF8. Perhaps there is some other environment setting in which I am missing?
Any help would be appreciated,
Christian
nullImport has a lot of options, so it depends on what you want to do.
C:\> imp help=y
will show you all possible options. An example of full import :
C:\> imp <username>/<password>@<TNS alias> file=<DMP file> full=y log=<LOG file>
Message was edited by:
Paul M.
...and there is always [url http://download-uk.oracle.com/docs/cd/F49540_01/DOC/index.htm]The documentation -
PHP- Oracle not working- Call to undefined function OCILogon() ERROR
Hi,
I am trying to just do a test program to test php - oracle connection,
My versions are: php5.2.1-Win32 and Oracle 10g
I have made the following settings:
1.) Uncommented the following lines in php.ini:
extension=php_oci8.dll
extension=php_oracle.dll
2.) Set extension_dir = "C:\php-5.2.1-Win32\ext"
Changed the httpd.conf file as: ADDED
1.)LoadModule php5_module C:/php-5.2.1-Win32/php5apache2.dll
2.)PHPIniDir "C:/Program Files/Apache Group/Apache2/conf-"
3.) LoadFile "C:/php/php5ts.dll"
4.)<IfModule php5_module>
<Location />
AddType text/html .php .phps
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps
</Location>
</IfModule>
5.) AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
But when I am tryin to run the following program:
<?php
echo "<h1>OCI Test</h1>\n";
$conn=OCILogon("system", "sheetal16", "orcl");
$stmt = OCIParse($conn, "SELECT table_name FROM user_tables ORDER BY table_name");
OCIExecute($stmt, OCI_DEFAULT);
while (OCIFetch($stmt)) {
$table_name = OCIResult($stmt, "TABLE_NAME");
echo "$table_name<br />\n";
OCIFreeStatement($stmt);
OCILogoff($conn);
?>
I am getting the following error:
OCI Test
Fatal error: Call to undefined function OCILogon() in C:\Program Files\Apache Group\Apache2\htdocs\test2.php on line 3
Please help me to solve this problem.
Thanks,
SheetalSee Re: PHP- Oracle not working- Call to undefined function OCILogon() ERROR
-
How to use unicode fonts in Oracle forms 10g?
Hi I am working in forms 10g for quite a long time, the software that I have developed so far are all in English language. Now I have requirements to use Bengali Fonts in Forms 10g. I am facing difficulties doing that. Please reply with help. Thanks
Hasan Al MamunCheck this forum post (though that is for 6i, it would be of helpful for you)
How to use unicode fonts in Oracle forms 10g?
-Arun -
Errors in PHP/Oracle article
Hi,
There are a few errors in the article dealing with PHP/Oracle located at http://otn.oracle.com/oramag/webcolumns/2003/techarticles/hull_php.html
In the listing for the section called "How to use a database":
- $mycursor ora_open ($conn);
should be
$mycursor = ora_open ($conn);
- echo "RESULT: ora_getcolumn ($mycursor, 0), ora_getcolumn ($mycursor, 1) <br>";
The above is not the way it works in PHP and you won't get the expected results. You can throw variables in between your double-quote delimited strings, but not function calls. You'll have to concatenate the function calls like this:
echo "RESULT: ".ora_getcolumn ($mycursor, 0).", ".ora_getcolumn ($mycursor, 1)."<br>";Leendert:
Thanks for the comments. The first one is an obvious typo. The second
is a pretty obvious mistake which I missed while reviewing this. Although
PHP will expand variables in a string like that, it will not handle
function calls. How could it. I just tried it, and concatenation works
just as you suggest. Thanks for the corrections, and we updated the
article.
Sean -
Php, oracle connectivity.
Hello All,
I have a webserver that has php4,apache1.3 and oci8 instant client installed, and have a seperate oracle 10g db server, the php-oracle connectivity is fine when i run php code from db server but it gives me connectivity error when it runs from web server, error " ocifreestatement(): supplied argument is not a valid OCI8-Statement resource in /apache/htdocs/.....php on line..." while even when i made telnet to my db server 1521 port from web server it shows that listener is working, any idea ? thanksHello,
My developers have changed all the API´s to OCI8 and the code is able to connect with oracle 10g with php4 but, i am still getting this warning .i.e
Warning: ocifreestatement(): supplied argument is not a valid OCI8-Statement resource in /apache/htdocs/English/tender_list.php on line 340
i am unable to figure it out, every thing is working fine but still i am getting it ?
thanks -
How to insert unicode characters in oracle
hiiii...........i want to add special unicode characters in oracle database......can anyone guide me how to do this.
i kno we have nvarchar2 datatype which supports multilingual languages......but im enable to insert the values from sql prompt........can anyone guide me how to insert the values.
also please tell will there be special care which had to be taken care of if we are accessing it through .NET??output of
select * from nls_database_parameters where parameter like '%SET';
is PARAMETER VALUE
NLS_CHARACTERSET WE8MSWIN1252
NLS_NCHAR_CHARACTERSET AL16UTF16
when i query :select testmsg, dump(testmsg,1016) from test ;
i get
TESTMSG DUMP(TESTMSG,1016)
éµOF¿¿ad¿ Typ=1 Len=18 CharacterSet=AL16UTF16: 0,e9,0,b5,0,4f,0,46,0,bf,0,bf,0,61,0,64,0,bf
dsdas Typ=1 Len=10 CharacterSet=AL16UTF16: 0,64,0,73,0,64,0,61,0,73
éµOF¿¿ad¿ Typ=1 Len=18 CharacterSet=AL16UTF16: 0,e9,0,b5,0,4f,0,46,0,bf,0,bf,0,61,0,64,0,bf
éµOF¿¿ad¿ Typ=1 Len=18 CharacterSet=AL16UTF16: 0,e9,0,b5,0,4f,0,46,0,bf,0,bf,0,61,0,64,0,bf
what basically i want is to store some special characters like éµΩΦЛήαδӨװΘ§³¼αγ into my oracle database but i am unable to do dat....
Edited by: [email protected] on Jun 28, 2010 10:19 PM
Edited by: [email protected] on Jun 28, 2010 10:54 PM -
Where to find documentation related to php-oracle
Hi , i have been working with oracle ,and with php -mysql but never with php-oracle. I would like to ask if there are any samples application with orale-php and wich i can download.
Another question is wich editor is better to use to program codes? I have been using dreamweaver. What else can you suggest me?
Thanks in advanceYou can start with Oracle Underground Manual:
http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf
I also wrote a book on the topic, available from Amazon. -
Problems saving Unicode in an Oracle CLOB
We found a problem with saving Unicode in an Oracle CLOB. We use thin
drivers and Oracle 9.2.0.3.0 The character set of the database is UTF8.
The following code works:
// Retrieve clob object into ResultSet rs
// Data to be saved is in String str
// Save data:
oracle.sql.CLOB theClob = (oracle.sql.CLOB)rs.getObject(1);
theClob.putString(1, str);
But the following code does not save the data properly while this is
usually recommended in code samples:
oracle.sql.CLOB theClob = (oracle.sql.CLOB)rs.getObject(1);
Writer out = theClob.getCharacterOutputStream();
out.write( str.toCharArray() );
out.flush();
out.close();
What could be the reasons why the second approach is failing?
Regards,
Joop KaashoekThanks for your reply.
When I insert .gif files JDeveloper ends with a message saying "Process exited with exit code 0". I then go and check in the database and I find the image added to the table.
With a word doc, JDeveloper does not give that message. No message at all regarding what the status of the process is. And the document is not added to the database. No error messages too. Could this be an issue with Oracle? -
PHP Oracle editor/administration
Jeg har installeret Oracle XE og PHP og det går helt fint, men jeg kunne godt tænke mig en PHP-Oracle editor/administrator. Jeg har før brugt PHPMyadmin mellem PHP og Mysql og mener at der findes noget tilsvarende til Oracle, men kan ikke umiddelbart finde det. Er der nogen der kan hjælpe.
HBCHi, pbarut I modified the settings of browsers and added the html code below:
<?php
header("Expires: Thu, 17 May 2001 10:17:17 GMT");
header ("Last-Modified: Thu, 17 May 2001 10:17:18 GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
?>
But the problem continues.
When I update the site (CTRL + F5) results viewing, but do not appear when the redirect or click any link.
Tanks -
Hi All,
Can any one help me to create PHP/ORACLE Pagination..
Thanks
SamHi pals
Here is a good easy sample of pagination using Oracle in PHP, Please notice that I have a layer, running different queries which I need, and in some lines below I've used them but the names of the function and variable which I've called are obviously seen that how they perform.
Further, Please note that you would be expected to call your own oracle database through PHP oracle functions, and as you can see, I have a table storing page sessions and the function "oracle->select" runs the query "SELECT * FROM SESSION_ID" and returns its result and the variable "numberrows" has the number of rows which the implemented query has returned.
<html>
<head>
<title>PAGING</title>
</head>
<body>
<?
session_start();
$session_check = $orcl->oracle_select("SESSION_ID", "*");
$Per_Page = 10; // Per Page
$Num_Rows = $orcl->numberrows;
if( !isset( $_GET["Page"] ) )
$Page=1;
else
$Page = $_GET["Page"];
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = ( ( $Per_Page*$Page ) - $Per_Page );
if( $Num_Rows <= $Per_Page )
$Num_Pages =1;
else if( ( $Num_Rows % $Per_Page ) == 0 )
$Num_Pages = ( $Num_Rows / $Per_Page );
else
$Num_Pages = ( $Num_Rows / $Per_Page ) + 1;
$Num_Pages = (int)$Num_Pages;
$Page_End = $Per_Page * $Page;
if ( $Page_End > $Num_Rows )
$Page_End = $Num_Rows;
?>
<table width="800" border="1" cellpadding="0" cellspacing="0" style="font-size: 12px; font: Tahoma">
<tr>
<th width="400" align="center">CUSTOMER</th>
<th width="400" align="center">Name</th>
</tr>
<?
for($i=$Page_Start; $i<$Page_End; $i++)
?>
<tr>
<td width="400" align="center"><div align="center"><?=$session_check["ID"][$i]; ?></div></td>
<td width="400" align="center"><?=$session_check["USER_ID"][$i];?></td>
</tr>
<?
?>
</table>
<table width="800" border="0" cellpadding="0" cellspacing="0" style="font-size: 12px; font: Tahoma">
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center">Total <?= $Num_Rows;?> Record : <?=$Num_Pages;?> Page :</td>
</tr>
<tr>
<td align="center">
<?
if($Prev_Page)
echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page'><< Back</a> ";
for($i=1; $i<=$Num_Pages; $i++){
if($i != $Page)
echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i'>$i</a> ]";
else
echo "<b> $i </b>";
if($Page!=$Num_Pages)
echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'>Next>></a> ";
?>
</td>
</tr>
<tr>
<td align="center"> </td>
</tr>
</table>
</body>
</html> -
hi,
you think that i have a one textbox and one button on my webpage, and i want to write ORacle code in textbox something like that
begin
dbms_output.put_line ('hello!');
end;
after that when i click on the button , i want to display result below.i am using php code to do that things. otherwise i am using oracle 10g express edition,i searched on the net ,and i find a website that exactly what i want to do. this website URL : http://193.140.164.123:5561/isqlplus/login.uix you can enter 'hr' for both username and password. there you can see Workspace.
pls.if u know about this topic write here. thx.That's a pretty open ended question. Perhaps reading the OCI8 manual http://us.php.net/manual/en/book.oci8.php or getting one of the many fine PHP Oracle books will help get you started.
-
est-ce que vous avez un manuel php oracle en français
As this is english forum can you post your question in english please?
French PHP documentation is here: http://www.php.net/manual/fr/ . Oracle functions and examples are included there. -
Free web hosting for PHP Oracle
Hi,
I am a senior student and I have my final year project.For that I am suing PHP and Oracle.Is there anyone who could advise me on a good web hosting site for student aplications available if not for free,at least for a low price for my Oracle database and website.
Note that the website I am building will not be used for comercial purposes, only for education.I will deeply apreciate any help I can get.
Thank youHiya,
Being the sales Director for PHP Oracle Hosting I am proud to say that we do provide high quality of service at the cheapest prices. Our IT guys are professional consultants and are available almost 24hours
www.phporaclehosting.com
Maybe you are looking for
-
Can anyone answer, why in Logic Pro X I keep on getting a window popping up saying, Directory not found, result code = -120. Followed by another window saying, Fade update failed, (error -120)? I am running the latest version 10.0.5 through a Macbook
-
My Export to Youtube doesn't work.
I just got Adobe Premiere Elements 8 for my Dell Windows 7 laptop for Christmas. I got the program knowing it was an outstanding video editing software & I make Youtube videos & needed a good program. So I was very pleased the first few times of usin
-
Is there a way to re-size to a smaller portion when creating clickable links on pdf?
Hello everyone, I am not sure if I will be clear on what I need, but I'll try my best. I am currently doing a prayer book for my mom's website and need to add clickable links in the menu (so it will be more easy for the readers to simply click to go
-
A couple of weeks ago, the sound stopped working on my PB 17". It doesn't play music or the system sounds. Does anyone have any ideas?
-
How can I make Skype Desktop the default for Call: links in MS Outlook?
How can I persuade MS Outlook to use Skype Desktop for Call: links (such as those for phone numbers in a Contact Card)? Right now it is using Skype for Business to open them (I have both Skype Desktop and Skype for Business - formerly Lync - install