How to send Unicode to Oracle
Hello,
We have an intranet application that is live for sometime now. Our new requirement is to be able to store and view Japanese characters in some of the fields.
We have Oracle 9.2.0.5 with NLS_CHARSET as UTF8. Our application server is WebLogic6.1sp6 on Solaris v5.8 64 bit.
We use both thin driver (classes12.jar) and WebLogic 6.1 provided OCI thin driver, on different places of our application. The database column intended to store Japanese characters is just a VARCHAR and not NCHAR.
I'm copying some Japanese characters from various websites and trying to input them in my application through browser. We are able to store Japanese characters, but they are occupying upto 8 bytes per character. Actually Unicode databases only should take upto 3 bytes per character. My requirement is to be able to store upto 1300 Japanese characters in a VARCHAR2(4000) field. Currently, it is only storing about 500 Japanese characters. When trying to store more than this, it is throwing a "java.sql.SQLException: Inserted value too large for column".
I have already consulted Oracle and the reply I got is that it is not Oracle problem as the application needs to be changed so that it feeds physical UTF8 codepoints to Oracle. On their suggestion, I used iSQLPlus interface and was able to store 1300 Japanese characters in the database, by issuing an update statement. But the same data when seen from iSQLPlus is showing characters as follows: "& # 31258 ; & # 21481 ; & # 27470 ; & # 34507 ;" (I have added blanks so that your browser does not render it in Japanese). Hence they concluded that our application is NOT using UTF8 codpoints but a HTML based representation system using the ""& #" and then the unicode identifier for that character. For Oracle this is NOT a character, It's a string of 8 characters and hence it occupies 8 bytes. Please help me on how to feed UTF8 codepoints to Oracle?
I have already tried putting NLS_LANG=AMERICAN_AMERICA.UTF8 in my WebLogic startup script. I also tried putting
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> in my JSP's. (This actually makes the problem even worse that it displays junk instead of Japanese while retrieving).
Are there any other special settings that I need to be able to store Unicode characters? Please help.
Thanks
Varma
[email protected]
thanks the following steps did the trick
1. I put the following info in weblogic.xml
<charset-params>
<input-charset>
<resource-path>/*</resource-path>
<java-charset-name>UTF8</java-charset-name>
</input-charset>
</charset-params>
2. I added the weblogic.codeset=UTF8 for the WebLogic Oracle OCI connection pool
3. I added the nls_charset12.zip in the CLASSPATH for the Oracle thin driver that I'm using.
4. Added the <%@ page contentType="text/html; charset=utf-8"%> (Somehow the <jsp-param><encoding> tag does not work in weblogic.xml)
Similar Messages
-
How to Send mail in oracle 10g
I am new in oracle developer.....we are using oracle 10g developer...how to send mail through oracle 10g on a button click.pease help me.
Thanks in advanceThis question have been asked many times on this forum, see if you get help from following:
https://forums.oracle.com/message/5395438#5395438
Search results: https://forums.oracle.com/thread/search.jspa?peopleEnabled=true&userID=&containerType=&container=&q=form+email
Check this out as well:
http://nzchaudhry.wordpress.com/2013/05/31/send-report-via-email-attachment-in-oracle-forms-10g/
You can find init.ora or initSID.ora file under $ORACLE_HOME/dbs on linux and on Windows under $ORACLE_HOME/database. Otherwise you can create it using "create pfile from spfile" command
Aneel -
How to Send SMS from Oracle Database to Mobile
Hi All,
I need urgent help in how to send sms from oracle database to mobile
thanks and best regardsyou can use smslib..... . i have made a program with this. its working fine with oracle database.
see the links here ...
http://halimdba.blogspot.com/2011/08/send-sms-from-oracle-database-with.html
by the way, how you can say "urgent help" ?
regards
Halim -
How to send sms from oracle application to cell phone
Hi all
please send me in how to send sms from oracle application to cell phone. Is there any way to solve this task. if so please suggest me.Please see old threads for similar discussion -- http://forums.oracle.com/forums/search.jspa?threadID=&q=SMS&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
How to send BusinessEvent from oracle EBS 12 to an external JMS Queue/Topic
Hello Sir:
How to send BusinessEvent from oracle EBS 12 to an external JMS Queue/Topic??
How to receive BusinessEvent from an external JMS Queue/Topic to oracle EBS 12 ??
It is a Third Party JMS Server, it has queue and topic etc??
which module should be used??
what is the basic steps to do??
Thanksswapnil_yeole wrote:
Hello,
We want to install Oracle EBS 12.1.1.
Our internet speed is very poor so it would not be feasible for us to download the software from E-delivery site.
Can you please let me know how & where to obtain Oracle EBS 12.1.1 DVD's.
Do we need to raise an SR with Oracle for same.
Thanks in advance.
Yes -- https://blogs.oracle.com/stevenChan/entry/how_to_obtain_media_packs
Thanks,
Hussein -
How to sending email from Oracle Forms
How to sending email from Oracle 6i(Forms)
I need to send email to a distribution list(multiple email addresses).send email of multiple email address
[email protected],[email protected],[email protected]
create or replace function mailout
(sender in varchar2,
recipient in varchar2,
ccrecipient in varchar2,
subject in varchar2,
message in varchar2) return number
is
crlf varchar2(2) := chr(13)||chr(10);
connection utl_smtp.connection;
mailhost varchar2(50) := 'Add email server Ip Address here';
header varchar2(4000);
v_num number :=1;
str number:=0;
email varchar2(50);
begin
connection := utl_smtp.open_connection(mailhost,25);
header := 'Date: '||to_char(sysdate,'dd mon yy hh24:mi:ss')||crlf||
'From: '||sender||' '||crlf||
'Subject: '||subject||crlf||
'To: '||recipient||crlf||
'Cc: '||ccrecipient||crlf||message;
utl_smtp.helo(connection,mailhost);
utl_smtp.mail(connection,sender);
utl_smtp.rcpt(connection,recipient);
while (instr(ccrecipient,',',1,v_num)>0) loop
email:=substr(ccrecipient,str+1,instr(ccrecipient,',',1,v_num)-str-1);
dbms_output.put_line(email);
utl_smtp.rcpt(connection,email);
str:=instr(ccrecipient,',',1,v_num);
v_num:=v_num+1;
end loop;
utl_smtp.open_data(connection);
-- utl_smtp.write_data(connection,header);
utl_smtp.write_data(connection,'MIME-Version:1.0'||crlf||'Content-type:text/html'||crlf||header);
utl_smtp.close_data(connection);
utl_smtp.quit(connection);
return 0;
exception
when utl_smtp.invalid_operation then
dbms_output.put_line('Invalid Operation in SMTP transaction');
return 1;
when utl_smtp.transient_error then
dbms_output.put_line('Temporary problem with sending email ');
return 2;
when utl_smtp.permanent_error then
dbms_output.put_line('Permanent problem with sending email ');
return 3;
end; -
How to sending email from Oracle 6i(Forms)
How can I send email from Oracle Forms(6i).
I need to send email to a distribution list(multiple email addresses).send email of multiple email address
[email protected],[email protected],[email protected]
create or replace function mailout
(sender in varchar2,
recipient in varchar2,
ccrecipient in varchar2,
subject in varchar2,
message in varchar2) return number
is
crlf varchar2(2) := chr(13)||chr(10);
connection utl_smtp.connection;
mailhost varchar2(50) := 'Add email server Ip Address here';
header varchar2(4000);
v_num number :=1;
str number:=0;
email varchar2(50);
begin
connection := utl_smtp.open_connection(mailhost,25);
header := 'Date: '||to_char(sysdate,'dd mon yy hh24:mi:ss')||crlf||
'From: '||sender||' '||crlf||
'Subject: '||subject||crlf||
'To: '||recipient||crlf||
'Cc: '||ccrecipient||crlf||message;
utl_smtp.helo(connection,mailhost);
utl_smtp.mail(connection,sender);
utl_smtp.rcpt(connection,recipient);
while (instr(ccrecipient,',',1,v_num)>0) loop
email:=substr(ccrecipient,str+1,instr(ccrecipient,',',1,v_num)-str-1);
dbms_output.put_line(email);
utl_smtp.rcpt(connection,email);
str:=instr(ccrecipient,',',1,v_num);
v_num:=v_num+1;
end loop;
utl_smtp.open_data(connection);
-- utl_smtp.write_data(connection,header);
utl_smtp.write_data(connection,'MIME-Version:1.0'||crlf||'Content-type:text/html'||crlf||header);
utl_smtp.close_data(connection);
utl_smtp.quit(connection);
return 0;
exception
when utl_smtp.invalid_operation then
dbms_output.put_line('Invalid Operation in SMTP transaction');
return 1;
when utl_smtp.transient_error then
dbms_output.put_line('Temporary problem with sending email ');
return 2;
when utl_smtp.permanent_error then
dbms_output.put_line('Permanent problem with sending email ');
return 3;
end; -
How to send SMS from Oracle Marketing
Hi,
Please let me know which trigger is fired on campaign schedule activation, so that i could configure my application for sending sms through oracle marketing.
Thanks
KunalPlease see old threads for similar discussion -- http://forums.oracle.com/forums/search.jspa?threadID=&q=SMS&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
How to send mails from Oracle database
Hi All,
I want to send a mail from my oracle database once my store
procedure runs successfully or fails.
How can i do this.
what are the preliminary modules of Oracle which need to be
active for me to do so.
If any once can also mention about any links that give
information about the same it will be very helpful for me.
Thanks and Regards
Srinivas CheboluCREATE OR REPLACE PROCEDURE SEND_MAIL_TCP(
msg_from varchar2 := '[email protected]',
msg_to varchar2,
msg_subject varchar2 := 'E-Mail message from your database',
msg_text varchar2 := '' )
IS
c utl_tcp.connection;
rc integer;
BEGIN
c := utl_tcp.open_connection('1.17.0.218', 25); -- open the SMTP
port 25 on local machine
dbms_output.put_line(utl_tcp.get_line(c, TRUE));
rc := utl_tcp.write_line(c, 'HELO localhost');
dbms_output.put_line(utl_tcp.get_line(c, TRUE));
rc := utl_tcp.write_line(c, 'MAIL FROM: '||msg_from);
dbms_output.put_line(utl_tcp.get_line(c, TRUE));
rc := utl_tcp.write_line(c, 'RCPT TO: '||msg_to);
dbms_output.put_line(utl_tcp.get_line(c, TRUE));
rc := utl_tcp.write_line(c, 'DATA'); -- Start message body
dbms_output.put_line(utl_tcp.get_line(c, TRUE));
rc := utl_tcp.write_line(c, 'Subject: '||msg_subject);
rc := utl_tcp.write_line(c, '');
rc := utl_tcp.write_line(c, msg_text);
rc := utl_tcp.write_line(c, '.'); -- End of message body
dbms_output.put_line(utl_tcp.get_line(c, TRUE));
rc := utl_tcp.write_line(c, 'QUIT');
dbms_output.put_line(utl_tcp.get_line(c, TRUE));
utl_tcp.close_connection(c); -- Close the connection
EXCEPTION
when others then
raise_application_error(-20000,'Unable to send e-mail message
from pl/sql');
END;
show errors
exec send_mail(msg_to =>'[email protected]');
exec send_mail(msg_to
=>[email protected]',msg_text=>'Look Yaar, I can send
mail from plsql'); -
Howe to send sms from oracle forms
i need your help plzz i wana to send sms from my applicatin
in normal case you will need an provider for sending sms (pswin,clickatell...) and the easiest way send sms is with a http-api, provided by most of these providers.
You can do the http-request in forms, by using web.show_document or webutil or, that is the method i prefer put it in the database and let a stored procedure handle the sms-sending. Here is a example of using such an api:
url := 'http://xxx.xxx.com/send/?typ=2&from=mecker&to='
|| UTL_URL.escape(vMobileNo, true, 'ISO-8859-1')
|| '&txt=' || UTL_URL.escape(vMessageText, true, 'ISO-8859-1')
||'&id=myaccount&pwd=testpw&autoroute=1';
UTL_HTTP.SET_TRANSFER_TIMEOUT(120);
resp_pieces := utl_http.request_pieces(url);
for i in 1..resp_pieces.count loop
value := value || resp_pieces(i);
end loop;
There is another example on the pswin homepage at:
http://www.pswin.com/_pswincom/Downloads/SMS_UTIL.PKS.txt
I am also sending SMS with unicode, a little bit more complex, if you need unicode-characters let me know ([email protected]), i will give you an example. -
How to SEND PAGE from Oracle stored proc
I've searched all Oracle docs and internet. Need to be able to
send a msg to a pager via SMS (or some other method) from a
stored proc. Saw some mention of Oracle Paging Server but not
much doc on implementing. Please feel free to post here or
mailto:[email protected]if you need to send sms message you need to have wapgateway and
wml background -
How to send email through oracle bpm suite 10.3.2?
I need to send an email to a particular participant each time the instance change activities.
I have created the "External Resource - Outgoing Mail" but to use the code below, I had no success ...
do
Mail.from = "[email protected]";
Mail.recipient = "[email protected]"
Mail.subject = "Hi";
Mail.contentType= "Content-type: text/plain;";
Mail.message = "Hello";
send Mail;
on e as Exception
display "Error!";
I use the Oracle BPM Suite 10.3.2
Grateful.
Wellington.Using your logic you'd need to set the SMTP field for the Engine.
Since you configured the Outgoing Email External Resource, you might try this instead:
mail as Mail
mail.from = "[email protected]"
mail.recipient = "[email protected]"
mail.subject = "Hi"
mail.message = "Hello"
mailSender as MailSender = Fuego.Net.MailSender(mail : mail)
send(mailSender, implname : "{name of Mail Outgoing Service}")Dan -
How to send syslog to Oracle database?
Is it possible to directly pipe syslog entries to the database?
You can load external data to Oracle database... for instance a txt file...
External tables allow you to query data that is stored outside the database in flat files. You can't do DML on external tables but they can be used for query, join and sort operations directly or by using views or synonyms
CREATE DIRECTORY MYEXT_TAB_DIR AS '/path_to_my_file';
CREATE TABLE syslog
(mydata varchar2(1000))
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER DEFAULT DIRECTORY MYEXT_TAB_DIR ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE FIELDS TERMINATED BY ';'
LOCATION ('mysyslogfile.txt')
PARALLEL 5
REJECT LIMIT 200;
SELECT * FROM syslog;
Regards,
Joao Oliveira
http://beyondoracle.wordpress.com -
How to store Unicode in Oracle database ?
I have a J2EE application and currently we are storing the Unicode data in amp;#xxx; format.
The browser can display this properly but the java swing application cannot. So I need to convert this to \uxxxx format.
Is it advisable to store the data in the d/b in the \uxxxx format or amp;#xxx; format ? Advantages ? Disadvantages ?
The database is setup for UTF-8.
ThanksNot really sure what you are asking the conversion from whatever character set to Unicode should occur without thought to decimal or hex. What is the insert statement or method you are using to get the data ineserted into the database?
-
How to send attachments in oracle workflow?
i want to send the attachment in the notifiaction mail and i am using workflow 2.6.1.5.2 .kindly help asap.
thanks.Hello,
Why don't you use the standard processing for PO output, there is a standard way to send po by mail as attachment.
Anyway if you need to link it with a workflow, you cannot use the "send mail" task from workflow builder. This kind of operation just can send notification withount attachment.
To send the po as attachment, you need to create your own task and method in a BOR object. I suggest you to start from the standard prosessing (CL_PD_PO_PROCESSING_BBP, method PROCESS_BBP_PO_MAI).
rgds,
Pierre
Maybe you are looking for
-
It can't (shouldn't) be this difficult...
I've been using a simple home network with my G4 iGloo and a G4 iBook. The iGloo connects to an Ethernet Switch connected to an Airport Extreme which connects to the cable modem. iBook has an Airport card and is used to administer the AEBS. Everythin
-
Can we add to the new iOS 5 magic mouse and magic track pad
I would like to use a magic mouse, magic trackpad And apples remote in my new iPad 2 with the new iOS 5
-
This is the full error message. It's a 2011 Macbook Air running Mountain Lion. It crashed today and now will only boot into safemode. I've tracked the error down to this but this is the limit of my knowledge. Any help!? Process: launchd [150]
-
X3 very low message and alarm tone
plz help me my nokia X3 message tones and alarm tones r very soft and i cant hear them even if its in max volum.....plz help
-
Javascript not loading in my JSF page
I have a JSF page in which I use the t:popup field, which I can't get to show: <tr> <TD><t:popup id="testpop" styleClass="popClass" closePopupOnExitingElement="true" closePopupOnExitingPopup="true"