Wired letters instead of hebrew

We wrote a servlet that prints letters in different languages. In order to print the letters, we use:
PrintWriter out = response.getWriter();
out.println(letters);
When we runs the servlet, the servlet prints wired letters instead of hebrew:
for example:
=?windows-1255?Q?=EE=...
the problem is that we need to read the letters that was printed with other program. So, instead to read the hebrew letters, it read wired things.
How do we make the servlet prints hebrew??
(we using hebrew and english letters)
please help us.
thanks, Naor and Shay.

It depends on the data and encoded data and the encoding used for output.
In jsp, you can use <%@page %> to specify the charset (UTF-8) and then set the locale (Hebrew).
Example jsp file:
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="java.util.*"%>
<%
String hebrewString = ...... the hebrew string, eg: you get this from database, etc .... ;
Locale locale = ..... Hebrew locale instance, check it at java.util.Locale javadoc ....;
response.setLocale(locale);
%>
<HTML>
<%=hebrewString%>
</HTML>
If this prints wrongly, then either you use wrong charset/encoding or the hebrew string is not constructed properly (eg: your database doesn't support UTF-8, so when you save the data previously, the string was actually corrupted, etc).
If you can you write hebrew, you can make it straight like this:
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="java.util.*"%>
<%
Locale locale = ..... Hebrew locale instance, check it at java.util.Locale javadoc ....;
response.setLocale(locale);
%>
<HTML>
.. Barukh Haba B'shem Adonai (in hebrew script) ..
</HTML>
You may use richedit or IDE which support UTF-8 ( not ANSI! ) to create the jsp file. ANSI editor which will corrupt the text you entered.
In XP, the notepad for microsoft is able to save the text using UTF-8, this editor can be used safely.
By default, IE have encoding for Hebrew, so it should show up correctly. If you're using linux/unix or different browser, perhaps you need to download the encoding first to be able to display correctly.
If you don't know how to write hebrew, go to any hebrew website, copy some text and paste it in UTF-8 editor. If you see the word correctly pasted, then it supports UTF-8. Then, you can create the JSP file I mentioned above.
rgds,
Alex

Similar Messages

  • How to change the color of letters instead of highlight the text when compare two documents

    Hello!!
    I have the Adobe Acrobat 9 Pro (Versión 9.0.0) and I need to compare two documents, but I want to show the diferences changing  the color of letters instead of highlight the text with any color. My boss tell me that other Acrobat version have this option, but I couldn't find it in this version.
    Could you help me on this topic??
    Thanks

    Hello!!
    I have the Adobe Acrobat 9 Pro (Versión 9.0.0) and I need to compare two documents, but I want to show the diferences changing  the color of letters instead of highlight the text with any color. My boss tell me that other Acrobat version have this option, but I couldn't find it in this version.
    Could you help me on this topic??
    Thanks

  • How to dial telephone numbers which have letters instead of digits?

    I'm new to Blackberry products & just bought a 8330 curve.  Unlike my other smartphones which had the option of a dial key pad, the Curve appears to have forgotten to include one.  When a telephone number is spelled out with letters instead of digits, how do I dial it?  For example: for my pharmacy refills I would dial 1-123-345-DRUG  or when calling a company after hours and reach its automated answer system which prompts you to key-in the party that you are looking for their last 4 letters of their name.  How do you do it.  Help.

    Hi and welcome to the forums!
    You can enter the alpha chacratars using the alt shift for nummerics.
    For example: 1-800-(alt-shift) -IFlYSWA
    The same applys when you are asked for alpha characters as in your example
    of search by person's name.
    Thanks,
    Please remember to resolve your thread. Put the check mark in the green box that contained your answer! Thanks
    Message Edited by Bifocals on 11-24-2008 06:45 PM
    Click Accept as Solution for posts that have solved your issue(s)!
    Be sure to click Like! for those who have helped you.
    Install BlackBerry Protect it's a free application designed to help find your lost BlackBerry smartphone, and keep the information on it secure.

  • Midnight C.: two ways of launch, one - letters instead of lines. Why?

    I may launch Midnight Commander in a three ways. Two of them are OK. But the third will bring drawing borders with letters instead of lines.
    I'm using LXTerminal (I think it doesn't matter). Below there is screenshot with launch results.
    Launch commands:
    1) In terminal as a user :
    mc
    2) In terminal, becoming root at first:
    su -
    mc
    3) Launch button from a panel, launch as a user:
    lxterminal --command="sudo su -l root -c /usr/bin/mc"
    The first two ways are OK, third way will bring "broken" lines. Give me please an idea of what to search. Or how to fix broken lines?
    Last edited by Stack (2012-12-18 12:09:39)

    Thank you. 'sudo /usr/bin/mc' did the trick.
    In both cases lines are OK.
    2013-03-03
    It was locale setup issue for a user's session - no local proper set up was done. There was related issue. The bug was absence of locale environment setup for VNC sessions. I.e. a file to be launched along with VNC server's wake up staff must have proper "export" for LC_* and LANG variables. In my system the file is '~/.vnc/xstartup'. I'm shure there are other, may be more elegant, ways to set up system wide wanted locale settings, to be picked up automaticaly by a VNC server for every user. May be '~/.vnc/xstartup' code may be an implementation of another than mine approach.
    Last edited by Stack (2013-03-03 07:00:47)

  • Cameras Wired Ethernet instead of Wireless

    Comcast supports Powerline adapters which could be used to wire the cameras for ethernet instead of wireless...... Can you have the firmware settings by default connect to wired?   Currently the option in the cameras is set to by default go over wireless and if I have a camera witha  weak wireless connection it will use that over a strong wired connection with the latest firmware release.

    Use the Airport Admin Utility.
    On the Music Tab enusre that Enable AirTunes over the Ethernet port is checked.
    iFelix

  • Internet drop outs on my G5 since I use a wired router instead of wireless

    Hi guys!
    I used to have wireless internet at home (1 x G5 & 2 x windows laptops). Internet worked fine and fast. Although I couldn't get all computers into a internal network (for easy sharing files...), but that's not the issue now.
    Anyway, I have a new roommate in the house that doesn't have wireless on his windows pc. So, I connected all computers to a 4 ports router. I ditched the whole wireless thing because I couldn't get it working together with the wired router thing. So all computers are linked to the router by cable.
    Now, at first everything worked fine. All computers had internet and I even had my long awaited network so that I could share files at high speed between computers (mac - windows). Suddenly, I guess after a couple of hours, my mac started having difficulties finding the network. At times I have no internet, or it takes looooooooooooooong to load up webpages and sharing files with my windows laptop takes like 6hours for 3giga (which normally is done in a couple of minutes). My windows laptop has no problem with internet, no drop out no nothing, everything works fine (except sending files to my mac which also takes hours...).
    Anybody knows what to do?
    Also anyone knows if the following is possible:
    - cable comes in my house (WAN)
    - goes to wired 4port router
    - from the router 1 wire goes directly to a pc
    - from the router another wire goes to my wireless accesspoint which then would be used to connect 1 or more wireless pc's.
    - with all that, I'd like to have internet on all computers AND have a fully working network between all computers (mac and windows)
    Anyone knows if this is possible?
    Thanks for your time!

    The wireless access point is a D Link Airplus G+ 2.4Ghz. It has no extra ethernet ports.
    I also thought of having a wireless router with extra ethernet ports. But of course this would mean another cost... I was hoping that I could fix it with the things I allready own.
    But, nevertheless, there might be a little change in things as I just tried connecting with the second ethernet port on my mac. Haven't had any problems yet (+/- 10minutes). Am gonna try to send big files to my laptop in order to test the speed between them.
    Will get back with the results.
    Thanks for your help!

  • Getting junk letters instead of photo in an email.

    hi all
    i am trying to send an email via gmail.com i am able to send an email but when i try to
    send attachment so i am getting strange texts instead of photo
    its not displaying photo but there is different format text is displaying in my box.
    here is the result.
    also getting this error but i am able to send email.
    ERROR at line 1:
    ORA-20000: Failed to send mail due to the
    following error: ORA-29277: invalid SMTP operation
    ORA-06512: at "MAIL.MAHI", line 159
    ORA-06512: at line 2===============================================
    --BACKUP.SECBOUNDContent-
    Type: application/octet-streamContent-Disposition:
    attachment; filename="g.gif"Content-Transfer-Encoding: base64
    Qk2O5QgAAAAAADYAAAAoAAAAwgIAABMBAAABABgAAAAA
    AFjlCAAAAAAAAAAAAAAAAAAAAAAAhNWuhNWuhNWuhNWu
    hNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuh
    NWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNW
    uhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhN
    WuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuh
    NWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWu
    hNWuhNWuhNWuhNWuhNWuhNWuhNWuhN
    WuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuh
    NWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNW
    uhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhN
    WuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNWuhNand here the link which is i followed to use with my codes....
    Re: Sending UTL_SMTP mail with single jpg attachment issue
    create or replace package body Mahi
           is
              -- Write a MIME header
              procedure write_mime_header (
                  p_conn in out nocopy utl_smtp.connection
               , p_name in varchar2
                , p_value in varchar2
               is
              begin
                utl_smtp.write_data ( p_conn
                                     , p_name || ': ' || p_value || utl_tcp.crlf
             end;
             procedure mail (
                p_sender in varchar2
              , p_recipient in varchar2
               , p_subject in varchar2
               , p_message in varchar2
              is
                l_conn           utl_smtp.connection;
                nls_charset    varchar2(255);
               v_src_loc  BFILE := BFILENAME('BACKUP', 'Logon.jpg');
               --v_src_loc BLOB;
          l_buffer   RAW(54);
          l_amount   BINARY_INTEGER := 54;
          l_pos      INTEGER := 1;
          l_blob     BLOB := EMPTY_BLOB;
          l_blob_len INTEGER;
         v_amount   INTEGER;
                  v_fname VARCHAR2(50);
         CURSOR img_cur IS SELECT photo_name,photo
      FROM temp_photo;
        --crlf  varchar2(2) := chr(10)||chr(13);
    PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
       BEGIN
          UTL_SMTP.WRITE_DATA(l_conn,
                              pi_name || ': ' || pi_header || UTL_TCP.CRLF);
       END;
             begin
                -- get characterset
                select value
                into   nls_charset
                from   nls_database_parameters
                where  parameter = 'NLS_CHARACTERSET';
                select
                photo into v_src_loc from
                temp_photo
                where id=1;
                DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
         DBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
         v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
         DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
         --DBMS_LOB.COPY(l_blob, v_src_loc, v_amount);
         l_blob_len := DBMS_LOB.getlength(l_blob);
               -- establish connection and autheticate
               l_conn   := utl_smtp.open_connection (g_smtp_host, g_smtp_port);
                utl_smtp.ehlo(l_conn, g_smtp_domain);
                 utl_smtp.command(l_conn, 'auth login');
                 utl_smtp.command(l_conn,utl_encode.text_encode('[email protected]', nls_charset, 1));
                utl_smtp.command(l_conn, utl_encode.text_encode('xxxxx', nls_charset, 1));
                 -- set from/recipient
                  utl_smtp.command(l_conn, 'MAIL FROM: <'||p_sender||'>');
                 utl_smtp.command(l_conn, 'RCPT TO: <'||p_recipient||'>');
                -- write mime headers
                 utl_smtp.open_data (l_conn);
                 write_mime_header (l_conn, 'From', p_sender);
                write_mime_header (l_conn, 'To', p_recipient);
                write_mime_header (l_conn, 'Subject', p_subject);
                 write_mime_header (l_conn, 'Content-Type', 'text/plain; charset=us-ascii');
                 write_mime_header (l_conn, 'X-Mailer', g_mailer_id);
                 utl_smtp.write_data (l_conn, UTL_TCP.CRLF);
                 UTL_SMTP.WRITE_DATA(l_conn,
                             'MIME-Version: 1.0' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Type: multipart/mixed; ' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             ' boundary= "' || 'BACKUP.SECBOUND' || '"' ||
                             UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
                 -- write message body
                utl_smtp.write_data (l_conn, p_message);
                OPEN img_cur;
      LOOP
      FETCH img_cur INTO v_fname,l_blob;
    end loop;
    close img_cur;
                UTL_SMTP.WRITE_DATA(l_conn,
                             '--' || 'BACKUP.SECBOUND' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Type: text/plain;' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             ' charset=US-ASCII' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,  p_message || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             '--' || 'BACKUP.SECBOUND' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Type: application/octet-stream' ||
                             UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Disposition: attachment; ' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             ' filename="' || 'gpg.jpg' || '"' || --My filename
                             UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
      /* Writing the BLOL in chunks */
        WHILE l_pos < l_blob_len LOOP
          DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
          UTL_SMTP.write_raw_data(l_conn,
                                  UTL_ENCODE.BASE64_ENCODE(l_buffer));
          UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
           l_buffer := NULL;
           l_pos    := l_pos + l_amount;
         END LOOP;
         UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
        -- Close Email
        UTL_SMTP.WRITE_DATA(l_conn,
                             '--' || 'BACKUP.SECBOUND' || '--' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
                             UTL_SMTP.CLOSE_DATA(l_conn);
                             utl_smtp.close_data (l_conn);
         UTL_SMTP.QUIT(l_conn);
         DBMS_LOB.FREETEMPORARY(l_blob);
         DBMS_LOB.FREETEMPORARY(l_blob);
         DBMS_LOB.FILECLOSE(v_src_loc);
                    -- end connection
                utl_smtp.quit (l_conn);
                        exception
                 when others
                 then
                   begin
                      utl_smtp.quit(l_conn);
                    exception
                      when others then
                       null;
                   end;
                   raise_application_error(-20000,'Failed to send mail due to the
    following error: ' || sqlerrm);
    DBMS_LOB.FREETEMPORARY(l_blob);
    DBMS_LOB.FREETEMPORARY(l_blob);
          DBMS_LOB.FILECLOSE(v_src_loc);
         raise;
             end;
          end;
          commit;Note:- i am using Stunnel,Oracle Database 11g R2 and OS is Linux...
    I installed Linux on virtualBox.
    please suggest me why i am getting strange text instead of photo?
    if my code is wrong plz correct for me..
    thanks in advance...
    Mehwish
    Student.
    Edited by: Mehwish on Apr 15, 2011 10:57 PM

    Your codes are very nice and easy to use but i am unlucky and i am not able to send  attachment
    before i was not able to send even junk  text of photo but after using u r code
    i am able to send that and i am near to solve my problem because of your nice guide and codes...
    create directory backup as  '/u01/dump';
    grant read,write on directory backup to mail,scott;
    and goes this instead of picture.
    Hi Meh --BACKUP.SECBOUNDContent-Type: application/octet-streamContent-Disposition:
    attachment; filename="gpg.jpg"Content-Transfer-Encoding: base64 /9j/4AAQ
    SkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAPgAA/+
    4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAQEBgQEBgkGBQYJCgcGBgcKCwkJCg
    kJCw8LDAwMDAsPDA0ODg4NDBERExMRERoZGRkaHR0dHR0dHR0dHQEGBwcMCw
    wWDw8WGRQQFBkdHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dH
    R0dHR0dHR0dHR0dHR0d/8AAEQgA+wG0AwERAAIRAQMRAf/EAKQAAAICAwEBAQ
    AAAAAAAAAAAAECAAMFBgcECAkBAQEAAwEBAQAAAAAAAAAAAAABAgMEBQYHE
    AABAwIEAwQGCAMFBgYDAAABAAIDEQQhMRIFQRMGUWEiB3GBoTJCFJGxwVJiI
    xUIkjMk0XKCokPh8cJT
    and i tried to use this code now.
    create or replace package body mahi
           is
              -- Write a MIME header
              procedure write_mime_header (
                  p_conn in out nocopy utl_smtp.connection
               , p_name in varchar2
                , p_value in varchar2
               is
              begin
                utl_smtp.write_data ( p_conn
                                     , p_name || ': ' || p_value || utl_tcp.crlf
             end;
             procedure mail (
                p_sender in varchar2
              , p_recipient in varchar2
               , p_subject in varchar2
               , p_message in varchar2
              is
                l_conn           utl_smtp.connection;
                nls_charset    varchar2(255);
               v_src_loc  BFILE := BFILENAME('BACKUP', 'Logon.jpg');
               --v_src_loc BLOB;
          l_buffer   RAW(54);
          l_amount   BINARY_INTEGER := 54;
          l_pos      INTEGER := 1;
          l_blob     BLOB := EMPTY_BLOB;
          l_blob_len INTEGER;
         v_amount   INTEGER;
                  v_fname VARCHAR2(50);
        --crlf  varchar2(2) := chr(10)||chr(13);
    PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
       BEGIN
          UTL_SMTP.WRITE_DATA(l_conn,
                              pi_name || ': ' || pi_header || UTL_TCP.CRLF);
       END;
             begin
                -- get characterset
                select value
                into   nls_charset
                from   nls_database_parameters
                where  parameter = 'NLS_CHARACTERSET';
                select
                photo into v_src_loc from
                temp_photo
                where id=1;
                DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
         DBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
         v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
         DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
         --DBMS_LOB.COPY(l_blob, v_src_loc, v_amount);
         l_blob_len := DBMS_LOB.getlength(l_blob);
               -- establish connection and autheticate
               l_conn   := utl_smtp.open_connection (g_smtp_host, g_smtp_port);
                utl_smtp.ehlo(l_conn, g_smtp_domain);
                 utl_smtp.command(l_conn, 'auth login');
                 utl_smtp.command(l_conn,utl_encode.text_encode('[email protected]', nls_charset, 1));
                utl_smtp.command(l_conn, utl_encode.text_encode('xxxxx', nls_charset, 1));
                 -- set from/recipient
                  utl_smtp.command(l_conn, 'MAIL FROM: <'||p_sender||'>');
                 utl_smtp.command(l_conn, 'RCPT TO: <'||p_recipient||'>');
                -- write mime headers
                 utl_smtp.open_data (l_conn);
                 write_mime_header (l_conn, 'From', p_sender);
                write_mime_header (l_conn, 'To', p_recipient);
                write_mime_header (l_conn, 'Subject', p_subject);
                 write_mime_header (l_conn, 'Content-Type', 'text/plain; charset=us-ascii');
                 write_mime_header (l_conn, 'X-Mailer', g_mailer_id);
                 utl_smtp.write_data (l_conn, UTL_TCP.CRLF);
                 UTL_SMTP.WRITE_DATA(l_conn,
                             'MIME-Version: 1.0' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Type: multipart/mixed; ' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             ' boundary= "' || 'BACKUP.SECBOUND' || '"' ||
                             UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
                 -- write message body
                utl_smtp.write_data (l_conn, p_message);
                UTL_SMTP.WRITE_DATA(l_conn,
                             '--' || 'BACKUP.SECBOUND' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Type: text/plain;' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             ' charset=US-ASCII' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,  p_message || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             '--' || 'BACKUP.SECBOUND' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Type: application/octet-stream' ||
                             UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Disposition: attachment; ' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             ' filename="' || 'gpg.jpg' || '"' || --My filename
                             UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
        UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
      /* Writing the BLOL in chunks */
        WHILE l_pos < l_blob_len LOOP
          DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
          UTL_SMTP.write_raw_data(l_conn,
                                  UTL_ENCODE.BASE64_ENCODE(l_buffer));
          UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
           l_buffer := NULL;
           l_pos    := l_pos + l_amount;
         END LOOP;
         UTL_SMTP.WRITE_DATA(l_conn, UTL_TCP.CRLF);
        -- Close Email
        UTL_SMTP.WRITE_DATA(l_conn,
                             '--' || 'BACKUP.SECBOUND' || '--' || UTL_TCP.CRLF);
         UTL_SMTP.WRITE_DATA(l_conn,
                             UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
                             UTL_SMTP.CLOSE_DATA(l_conn);
                             utl_smtp.close_data (l_conn);
         UTL_SMTP.QUIT(l_conn);
         DBMS_LOB.FREETEMPORARY(l_blob);
         DBMS_LOB.FREETEMPORARY(l_blob);
         DBMS_LOB.FILECLOSE(v_src_loc);
                    -- end connection
                utl_smtp.quit (l_conn);
                        exception
                 when others
                 then
                   begin
                      utl_smtp.quit(l_conn);
                    exception
                      when others then
                       null;
                   end;
                   raise_application_error(-20000,'Failed to send mail due to the
    following error: ' || sqlerrm);
    DBMS_LOB.FREETEMPORARY(l_blob);
    DBMS_LOB.FREETEMPORARY(l_blob);
          DBMS_LOB.FILECLOSE(v_src_loc);
         raise;
             end;
          end;
          Note:- i m using stunnel and sending email via gmail and my OS is linux and oracle database 11g R2.
    i posted already in my previous post.
    is tthere any format problem?
    and also i am getting this error but i am able to send email which is getting properly in inbox.
    ERROR at line 1:
    ORA-20000: Failed to send mail due to the
    following error: ORA-29277: invalid SMTP operation
    ORA-06512: at "MAIL.Mahi", line 151
    ORA-06512: at line 2

  • Why do I get an ampersand and a string of letters instead of punctuation?

    Why do I get &rsquos instead of 's when an apostrophe appears in a sentence?
    The possible collapse of Comcast Corp.&rsquos merger with Time Warner Cable Inc. wouldn&rsquot just be a setback for these two providers.

    There would have to be a semicolon after the entity code: &amp;rsquo;
    <blockquote>The possible collapse of Comcast Corp.&amp;rsquo;s merger with Time Warner Cable Inc. wouldn&amp;rsquo;t just be a setback for these two providers.</blockquote>
    <blockquote>The possible collapse of Comcast Corp.&rsquo;s merger with Time Warner Cable Inc. wouldn&rsquo;t just be a setback for these two providers.</blockquote>

  • Counting with letters instead of numbers

    hi everybody,
    today I got the requirement to represent the rownums of a recordset (1, 2, 3, 4, 5 and so on) as letters (A, B, C, D, E and so on). First of all I thought there is a database function equal to the to_char function with RN parameter (which is able to convert numbers to roman numbers easily)... but I didn´t find anything.
    So, is there a database function that I haven´t found yet or have you got some custom code for me to realize this?
    ty in advance
    - Oliver

    Hi,
    I don't think it's quite that simple. OP does not want a base-26 number, because there is nothing quite like a 0 in this system, and therefore nothing quite like a leading 0.
    In a base-26 system, you could represent 26 ^2^ distinct numbers with strings up to 2 characters.
    OP wants something where you can represent 26 ^2^ + 26 distinct numbers with strings up to 2 characters: 26 numbers with 1-character strings and a completely disjoint set of 26 ^2^ numbers with 2-character strings.
    I think OP needs something more complicated, like this:
    CREATE OR REPLACE FUNCTION to_abc
    (      in_num       IN        PLS_INTEGER               -- Number to be converted
    RETURN     VARCHAR2
    DETERMINISTIC
    IS
         in_num_26     PLS_INTEGER    := MOD (in_num, 26);
         rest          PLS_INTEGER;
         return_txt     VARCHAR2 (30);
    BEGIN
         IF  in_num IS NULL
         THEN
              RETURN     NULL;
         ELSIF  in_num <= 0
         THEN
              RETURN  '-';
         END IF;
         return_txt := CHR ( 64 + CASE
                             WHEN  in_num_26 = 0
                             THEN  26
                             ELSE  in_num_26
                                  END
         rest := CEIL (in_num / 26);
         IF  rest = 1
         THEN
              RETURN     return_txt;
         ELSE
              RETURN  to_abc (rest - 1) || return_txt;
         END IF;
    END     to_abc;Test script (including your base26 function, for comparison):
    COLUMN     base26          FORMAT     A10
    COLUMN     right_txt     FORMAT     A10
    COLUMN     to_abc          FORMAT     A10
    SET     NULL     "[NULL]"
    WITH test_nums     AS
         SELECT     0 AS n,     '-' AS right_txt     FROM dual     UNION ALL
         SELECT     1,        'A'               FROM dual     UNION ALL
         SELECT     10,        'J'               FROM dual     UNION ALL
         SELECT     26,        'Z'               FROM dual     UNION ALL
         SELECT     27,        'AA'               FROM dual     UNION ALL
         SELECT     28,        'AB'               FROM dual     UNION ALL
         SELECT     52,        'AZ'               FROM dual     UNION ALL
         SELECT     53,        'BA'               FROM dual     UNION ALL
         SELECT     78,        'BZ'               FROM dual     UNION ALL
         SELECT     79,        'CA'               FROM dual     UNION ALL
         SELECT     702,        'ZZ'               FROM dual     UNION ALL
         SELECT     703,        'AAA'               FROM dual     UNION ALL
         SELECT     1404,       'BAZ'               FROM dual     UNION ALL
         SELECT     1405,       'BBA'               FROM dual     UNION ALL
         SELECT     18278,     'ZZZ'               FROM dual     UNION ALL
         SELECT     18279,     'AAAA'               FROM dual     UNION ALL
         SELECT     18280,     'AAAB'               FROM dual     UNION ALL
         SELECT     NULL,     NULL               FROM dual
    SELECT     n
    ,     to_abc (n)     AS to_abc
    ,     right_txt
    ,     CASE
              WHEN  NVL (to_abc (n), '??') =
                    NVL (right_txt,  '??')
              THEN  ' '
              ELSE  '<== WRONG!'
         END             AS flag
    ,     base26 (n)     AS base26
    FROM     test_nums
    ORDER BY  n
    ;Results of test script:
    .        N TO_ABC     RIGHT_TXT  FLAG       BASE26
             0 -          -                     [NULL]
             1 A          A                     a
            10 J          J                     j
            26 Z          Z                     aa
            27 AA         AA                    aa
            28 AB         AB                    ab
            52 AZ         AZ                    ba
            53 BA         BA                    ba
            78 BZ         BZ                    ca
            79 CA         CA                    ca
           702 ZZ         ZZ                    aaa
           703 AAA        AAA                   aaa
          1404 BAZ        BAZ                   bba
          1405 BBA        BBA                   bba
         18278 ZZZ        ZZZ                   aaaa
         18279 AAAA       AAAA                  aaaa
         18280 AAAB       AAAB                  aaab
    [NULL]     [NULL]     [NULL]                [NULL]

  • Keypad displays letters instead of numbers

    I'm trying to input my WPA key for wireless setup.  When I enter it, only letters show up and I'm unable to connect.

    Try holding down the Fn key and tap NumLock, see if this works ?
    If my reply was helpful please click the "Kudos" star.
    If your problem is solved please click the "Accept as Solution" button

  • Greek letters instead of English after cleaning keyboard

    After cleaning my keyboard, I can only type with Greek-looking letters. I have no idea what I did. Can anyone help me get the English letters back?

    Two suggestions:
    1. Go to Apple menu > System Preferences > Language & Text . Select "Language". Make sure English is set as the first language in the list of available languages.
    2. You may have caused the Option, Command, or Control key to become stuck. First, if you have another keyboard available, see if you can repeat your problem with it. If the problem goes away, you know the first keyboard is responsible. Second, if you have a non-Aluminum keyboard (i.e. white or beige plastic) you can try gently prying up each of the keys mentioned above and seeing if there is anything causing the keys to malfunction.
    Message was edited by: inandoutofgrace

  • Letters instead of numbers in graph

    Hi OTN,
    In my ADF BC application I have a bar graph. The graph looks like this: http://img846.imageshack.us/img846/1812/graphn.png
    So, my question is: is there any possibility of replacing numbers on the top of bars with letters (1 is A, 2 is B and etc.)?
    Type of graph is dvt:barGraph, ADF BC, Jdeveloper 11.1.1.4

    Done in with custom converter.
    <dvt:markerText id="markerText1" rendered="true">
                    <dvt:y1Format autoPrecision="off">
                      <f:converter converterId="estimationFormatter"/>
                    </dvt:y1Format>
                </dvt:markerText>Even though JDeveloper marks it as error in page source, it works.

  • How do I set the preference to use Wired interface instead of Wifi for network?

    I have a MacBook Pro, with Thunderbolt.  Am using the Time Capsule for my wifi and backups.  Is there a way to have both Wired and Wifi connected, but use Wired when available for faster downloads as well as faster backups?
    WIll simply having the wired interface above the wifi in Network Preferences give it priority?

    Sure there is. Just run an Ethernet cable to the notebook and connect it to the Ethernet port. OS X will fedault to the wired connection and or you can turn off WiFi.
    EDIT:
    I see at the bottom of your post you have a Retina, should of stated that in the header or body of the post.
    You will need either a Thunderbolt to Ethernet or USB to Ethernet adapter to have a Wired connection to your router.

  • Looping through letters instead of numbers

    I need to create an array of strings containing everything from A100 to X999.  I tried looping through letters but I don't think it can be done
    var arrayAct = new Array();
      for (i = "A"; i <= "X"; i++){
       for (i2 = 100; i2 <= 999; i2++){
        arrayAct.push(String(i+i2));

    excellent.  Final code is working:
    var arrayAct = new Array();
      for (i = "A".charCodeAt(0); i <= "X".charCodeAt(0); i++){
       for (i2 = 100; i2 <= 999; i2++){
        arrayAct.push(String.fromCharCode(i)+String(i2));

  • MYWAY articles displayed as numbers and letters

    Recently out of the blue my MYWAY homepage articles started appearing as underlined numbers with a few letters, instead of news headlines.  This only happens in Safari.  I have OS 10.7.3 and the latest version of Safari.  I uninstalled, and reinstalled Safari to no avail.  I have used myway as a homepage for years and want to continue to.  Any suggestions would be appreciated.

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box.
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem(s)?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    Note: If you’ve activated “Find My Mac” or FileVault in Mac OS X 10.7 or later, then you can’t enable the Guest account. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

Maybe you are looking for

  • ITunes 11.0.2.26 won't add new songs

    I've looked through the forums and seen this issue a few times, but none of the suggestions are working for me. I'm running iTunes 11.0.2.26 on Windows 7. I've tried deselcting the show iCloud purchases option, adding both folder and files to the lib

  • Sales Analysis Report based on Supplier-wise

    Hi Experts, My client requirement is ,We are into trading so , we want a Sales analysis report based on Supplier-wise. like, Selection critieria is 1)Supllier name 2)From and To date. Heading are Item name     Sales UoM    Jan(quantity)   Feb(quaniti

  • Incorrect value for global variable

    Hi, I am facing an issue in a query. In the query there is a Global variable 'Volume type'. In the default value tab of the variable it is given Default value as Litre. In the table RSZGLOBV also i have checked the global variable and there also the

  • ZFS root filesystem & slice 7 for metadb (SUNWjet)

    Hi, I'm planning to use ZFS root filesystem in Sun Cluster 3.3 environment, as written in documentation when we will use UFS share diskset then we need to create small slice for metadb on slice 7. In standar installation we can't create slice 7 when

  • MSI-issue 1603 after packing Master Collection CS6 with AAME 3.1

    Hello, i can't install the costum Setup msi file, that i ceatad with the Adobe Application Manager Enterprise Edition 3.1  if I start the Setup, the MSI close after a few seconds. The target System is a Windows 7 64bit with SP1. In the Logs i've crea