String "iso-8859-1" found in subject line of java mail API(when German char

We have written a mail client using java mail API and it works fine. Some body sends the email with subject line contains German chars(using some other mail client like outlook)
and our mail client is running on the machine whose Local has been set 'German'.
Now, while getting the subject line
Javax.mail.Message email; //local variable
// some how I am intializing email.
String str = email.getSubject();
the value of str returns "Bitte die 4 Items I�schen. Kein Bedarf. Ich kann die=?iso-8859-1?Q?_L=F6schung_nic?="
but actual value subject line was "Bitte die 4 Items I�schen. Kein Bedarf. Ich kann die L�schung nic"
So '�' char was repalced by some arbit chars.
Moreover, Charset.defaultCharset().name() returns 'windows-1252'
Please suggest me how I can get the actual subject line
Thanks
-Sanjeev

http://forum.java.sun.com/thread.jspa?threadID=741111&messageID=4250621
visit it
by ghanshyam

Similar Messages

  • String "iso-8859-1" to "we8iso8859p1"

    I have this problem: i need to convert mime content-type charset string to oracle charset string. ie. "iso-8859-1" to "we8iso8859p1" or "windows-1250" to "ee8mswin1250".
    Does exist some function for this?

    Many thanks. That is what i need. Yes, there are many packages with many procs, i am sorry for this thread.
    Many thanks Sergiusz.
    Adam

  • Subject line 'space' character is lost when sending mail?

    Hi,
    I'm using JavaMail, and when sending a mail with a subject line that is longer than 62 characters, the last space before the 63rd character becomes a linefeed. This means that when the recipient receives the e-mail, the space in the subject line is actually dropped (becomes a linefeed).
    For example. I send an email with the following subject line: "New User Setup [ITNUS-0005] User Setup Progress Report for: Louise Gans".
    The recipient will receive the following subject: "New User Setup [ITNUS-0005] User Setup Progress Report for: LouiseGans".
    Note the missing space between "Louise Gans". Perhaps someone could test sending out that subject line, and see if they get the same problem?
    Looking at the message source on the recipient client, it shows a line feed / new line where that space is supposed to be.
    Using MS Outlook or GroupWise or another mail client, the subject lines gets sent through perfectly using the same mail server (Groupwise Internet Agent 7.0.3), but using JavaMail to send the mail through that mail server gives me the space problem.
    Can anybody shed some light on why this is happening? I would really appreciate the help.
    Here is an example of the code I am testing with:
    public class SendHtml {
         public static void main(String[] argv) {
              new SendHtml();
         public SendHtml() {
              String  to = "[email protected]";
              String subject = "New User Setup [ITNUS-0005] User Setup Progress Report for: Louise Gans";
              String from = "[email protected]";
              String cc = null;
              String bcc = null;
              String url = null;
              String mailhost = "mail.server.co.za";
              String mailer = "sendhtml";
              String protocol = null, host = null, user = null, password = null;
              String record = null;     // name of folder in which to record mail
              boolean debug = false;
              BufferedReader in =
                   new BufferedReader(new InputStreamReader(System.in));
              try {
                   Properties props = System.getProperties();
                   if (mailhost != null) {
                        props.put("mail.smtp.host", mailhost);
                   // Get a Session object
                   Session session = Session.getInstance(props, null);
                   // construct the message
                   Message msg = new MimeMessage(session);
                   if (from != null) {
                        msg.setFrom(new InternetAddress(from));
                   else {
                        msg.setFrom();
                   msg.setRecipients(Message.RecipientType.TO,
                             InternetAddress.parse(to, false));
                   if (cc != null)
                        msg.setRecipients(Message.RecipientType.CC,
                                  InternetAddress.parse(cc, false));
                   if (bcc != null)
                        msg.setRecipients(Message.RecipientType.BCC,
                                  InternetAddress.parse(bcc, false));
                   msg.setSubject(subject);
                   collect(in, msg);
                   msg.setHeader("X-Mailer", mailer);
                   msg.setSentDate(new Date());
                   // send the thing off
                   Transport.send(msg);
                   System.out.println("\nMail was sent successfully.");
                   // Keep a copy, if requested.
                   if (record != null) {
                        // Get a Store object
                        Store store = null;
                        if (url != null) {
                             URLName urln = new URLName(url);
                             store = session.getStore(urln);
                             store.connect();
                        } else {
                             if (protocol != null)          
                                  store = session.getStore(protocol);
                             else
                                  store = session.getStore();
                             // Connect
                             if (host != null || user != null || password != null)
                                  store.connect(host, user, password);
                             else
                                  store.connect();
                        // Get record Folder.  Create if it does not exist.
                        Folder folder = store.getFolder(record);
                        if (folder == null) {
                             System.err.println("Can't get record folder.");
                             System.exit(1);
                        if (!folder.exists())
                             folder.create(Folder.HOLDS_MESSAGES);
                        Message[] msgs = new Message[1];
                        msgs[0] = msg;
                        folder.appendMessages(msgs);
                        System.out.println("Mail was recorded successfully.");
              } catch (Exception e) {
                   e.printStackTrace();
         public void collect(BufferedReader in, Message msg)
         throws MessagingException, IOException {
              String line;
              String subject = msg.getSubject();
              StringBuffer sb = new StringBuffer();
              sb.append("<HTML>\n");
              sb.append("<HEAD>\n");
              sb.append("<TITLE>\n");
              sb.append(subject + "\n");
              sb.append("</TITLE>\n");
              sb.append("</HEAD>\n");
              sb.append("<BODY>\n");
              sb.append("<H1>" + subject + "</H1>" + "\n");
              sb.append("</BODY>\n");
              sb.append("</HTML>\n");
              msg.setDataHandler(new DataHandler(
                        new ByteArrayDataSource(sb.toString(), "text/html")));
    }

    The header is being "folded" as described in RFC 2822 section 2.2.3.
    The folding doesn't lose the space if unfolding is done properly.
    Perhaps the recipient mail program isn't handling unfolding properly?
    If so, please report the bug to the owner of that program.
    If you need to work around such a buggy program, you can set the
    System property "mail.mime.foldtext" to "false" to disable all folding
    in JavaMail.

  • Why does the OPEN WEB LOCATION Box msg keep opening when I try tro type in the name of someone or type anything in the subject line of Yahoo mail? I have to ke

    When in Yahoo mail, the OPEN WEB LOCATION box opens for each letter I try to type in in the "To" line and/or the "Subject" line of any new e-mail to someone. I type a letter, the Box opens, and I cannot type anything in the e-mail window anywhere until I close the box. I close the box, type another letter, and the OWL Box open gain. It takes forever to type anything. This started when I updated Firefox to the new 21 version. I Uninstalled and reinstalled Firefox. No help. I uninstalled 21 and re-installed 19 (I was using 19 with no problems until today). No help. The problem will not go away. I note that others have complained of this problem. Is there a fix yet? I have been forced back to IE in the meantime.

    hello, you have two extension present in your profile (DownloadTerms 1.0 & WhiteSmoke New 10.16.2.509) that could be considered malware.
    please[[Reset Firefox – easily fix most problems|reset firefox]] and see if those entries are still present afterwards. also go to the windows control panel / programs and remove all toolbars or potentially unwanted software from there and run a full scan of your system with the security software that you have in place and different other tools like the [http://www.malwarebytes.org/products/malwarebytes_free free version of malwarebytes] & [http://www.bleepingcomputer.com/download/adwcleaner/ adwcleaner].
    [[Remove a toolbar that has taken over your Firefox search or home page]]
    [[Troubleshoot Firefox issues caused by malware]]

  • Mail Subject Line Automatically Selects All Text When Typing

    In Mail I'm typing along in a subject line and randomly the all of text I've entered becomes selected. Then my next keystroke deletes the first entered text. Very frustrating, and I can't figure out why this happens. Maybe OSX's spell checker? How do I turn that off to test?

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac. 
    These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing. 
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. 
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands. 
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply. 
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click the line of text below on this page to select it:
    kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -f -a TextEdit 
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). A TextEdit window will open with the output of the command. If the command produced no output, the window will be empty. Post the contents of the TextEdit window (not the Terminal window), if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Repeat with this line:
    { sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; sudo defaults read com.apple.loginwindow LoginHook; sudo crontab -l; } 2> /dev/null | open -f -a TextEdit 
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. 
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step. 
    Step 3
    { launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}'; crontab -l 2> /dev/null; } | open -f -a TextEdit 
    Step 4
    ls -A /e*/{la,mach}* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts .la* 2> /dev/null | open -f -a TextEdit  
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting. 
    Step 5
    osascript -e 'tell application "System Events" to get name of every login item' | open -f -a TextEdit 
    Remember, steps 1-5 are all copy-and-paste — no typing, except your password. Also remember to post the output. 
    You can then quit Terminal.

  • Subject lin in e-mail

    Is it possible to add a subject line when using e-mail
    notification in a click box in Captivate2? I am not using it as a
    quizzz only as a notification that the user has completed the
    session.
    Thanks

    Hi tmmu
    Have you tried the following code where you supply the E-Mail
    address?
    [email protected]?Subject=SubjectLineHere
    You may notice that SubjectLineHere is all smooshed together.
    Sometimes this is necessary in Captivate, in order to get the
    Subject to populate. Try it both ways and see. Depending on where
    it is used, you may find that it actually works fine by specifying
    [email protected]?Subject=Subject Line Here
    Cheers... Rick

  • Change Subject Line on received mails

    Trying to change the subject line on a received mail. Many mails do not have a correct subject and i want to change the subject line to meet my needs in my folders.
    Any solution?
    Thanks,

    I believe this is deliberate policy by Apple. You might find Mail Tags helpful.
    AK

  • Boilerplate Subject Line for E-Mail Replies?

    Hello.
    Automator is still sort of a mystery to me, but I wonder if it might hold the answer what I want to try to do. I posted this in the "Apple Mail" section but was unable to get a solution. However someone suggested Automator might be the key.
    When I reply to almost every e-mail I receive, I like to put this "prefix" ahead of the Original Subject Line ...
    From My Name (mm/dd/yy) re: Original Subject Line
    Is there a way to create a workflow that would spit this text-and-date out ... even if I could automate the first part and then insert it in front of the Original Subject Line that appears when I hit REPLY, that would be most helpful.
    Thanks for any time you can give to this. If you think it's do-able, can you suggest a step-by-step way I can order the workflow or, outside of Automator, how I could automate the text to insert it?
    imac intel   Mac OS X (10.4.5)   February 2006 Windows Refugee!

    Have you had any luck with this? I'm also trying to come up with a simple workflow that creates a new email message and places today's date in the subject line. Any help is greatly appreciated.
    DYLAN

  • Subject line on e-mailed invoices

    Hi all----
    I'm having some difficulty with the subject line of our e-mailed invoices.
    We maintain in VV32 --- [our company] invoice &XNAST-OBJKY&.  This includes the invoice number in the subject header along with our company's name.  This works perfectly for us.
    However, now we have a customer who instead of the invoice number in the subject line of their e-mails, wants their PO number.
    In VV32 I tried &XVBAK-BSTNK& and &XVBRK-BSTNK_VF&, however neither of them work.
    What am I missing?
    Thanks in advance for your assistance.
    Josh

    Hi
    Please, see these notes
    Note 49174 - NAST: VF01 Replacement of symbols does not work
    Note 537832 - Incorrect replacement of text symbols for MAIL
    Note 718017 - Replacement of text symbols in spool title/MAIL
    So, do a subrutine in RV60AFZZ, for instance ZZ_TEXT_SYMBOL_REPLACE. Populate in V/40 for your message program SAPLV60A and the last subrutine in the fields for replace of text symbols. After, do the settings in V/40 to see this text symbol.
    I hope this helps you
    Regards
    Eduardo
    PD: other idea. Rule the number of PO for splitting the invoice, and store this number in any field. If you don't have any field for this purpose, enhance VBRK with an append and populate it in the copy rules with a VOFM subroutine.
    Edited by: E_Hinojosa on Jan 25, 2012 5:54 PM

  • How can i get autofill to save the "subject line" in g-mail?

    can "autofill" save what's typed into gmail's subject line so all past subjects can be displayed with a right mouse click?

    The website may be using autocomplete=off to prevent Firefox from saving the name and password.
    You can remove autocomplete=off with a bookmarklet to make Firefox save the name and password.
    *http://kb.mozillazine.org/User_name_and_password_not_remembered

  • How to change the Subject line of the mail when PO is sent to a vendor

    Hi,
    I wanted to send PO through Email.All the settings have been done and the output goes fine.
    I wanted to change the text in the title and hence have set the programme as SAPMM06E and Form Routine as TEXT_SYMBOL_REPLACE .
    After setting ,NAST table is picking the text under TDCOVTITLE field as desired.But in the SOST queue ,it is not updating correctly.The PO number is not appearing and is giving some default number.
    Why it is not updating in SOST queue ,whereas the NAST table is picking the desired text?
    Please let me know if some more settings are to be made in output types or somewhere else?
    Expecting reply at the earliest
    Regards
    Saurabh

    Hi Saurabh,
    We have also same email functionality but we have written z-driver program. From driver program we are populating title field.
    Create Attachment Notification
            move w_title  TO i_packing_list-obj_descr.
    *" Specify Document Data
            move w_title    TO e_doc_data-obj_descr.
        CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
          EXPORTING
            document_data              = e_doc_data
            put_in_outbox              = c_x
            sender_address             = sender
            sender_address_type        = c_sender_type
               commit_work                = 'X'
          TABLES
            packing_list               = i_packing_list
            contents_bin               = i_mess_att
            contents_txt               = contents_txt
            receivers                  = receivers
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5
            x_error                    = 6
            enqueue_error              = 7
            OTHERS                     = 8.
    Regards,
    Anil Salekar

  • Unable to read the subject line which is in Japanese

    I am using
    javax.mail.Message.getSubject()
    method to read the Japanese subject line of the mail, but when i see the string returned by this method, it has some junk characters.
    Can anyone please tell me how to read japanese subject line???

    That's usually what happens when you print non-ASCII characters on consoles. It certainly is in Windows, don't know about Unixes but I wouldn't expect them to be fully Unicode-compliant. Try using a GUI with an appropriate font for Japanese.

  • Problem reading japanese mail subject line

    I am using
    javax.mail.Message.getSubject() method to read the Japanese subject line of the mail, but when i see the string returned by this method, it has some junk characters.
    Can anyone please tell me how to read japanese subject line?

    Hi Pothana,
    I did try to change the encoding of the Exchange server to UTF-8, but there was no difference in the result.
    Note that this problem is only in the subject line.  If I send the same text in the content it is received correctly.
    (Changing the encoding of PI is not an option... I do not have access to the Visual Administrator).
    @Ninad since I am taking the Subject from the ASMA (as suggested by SAP) I don't think that changing the content encoding of the message would make a difference.
    @Ashutosh I do have that document but I can't find anything that can help me in there.  Do you see anything that could help resolve this specific issu?
    In the mean time the problem is still there...
    Thanks for any additional help you can give me,
    Aldo

  • How to get ISO-8859 characters from DOM ?

    Hi,
    I have problems to get the ISO-8859 characters from the DOM. I parse a XML file and read the values from the DOM. All "umlauts" are scrambled.
    The details:
    The first line of the XML file is:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    It contains lines like:
    <tag>Dpfel</tag>
    I perform the following steps:
    I'm parsing the XML file ...
    xmlparser.parse( parser, full_fname_xml );
    ... get the document ...
    doc := xmlparser.getDocument( parser );
    ... and read the value from the TEXT_NODE:
    nodevalue := xmlparser.getNodeValue( node );
    And here is the problem: nodevalue does
    not contain 'Dpfel' but '?pfel'.
    Its not a problem of the database. Explizit INSERTs with "umlauts" e.g. are working fine.
    This problem occurs with the XML Parser for PLSQL 1.0.0.1.0 on NT.
    [Pls do not recommend to use the newer version. I did a test with the newer version and know it works there.]
    My questions relates only to this older version:
    Will it never work with this version
    or what am I doing wrong ?
    Any hints welcome !
    Tnx
    Franz
    null

    Tnx for the quick answer.
    Sorry, indeed I can not use the newer
    version in the moment.
    So I urgently need a solution or any
    workaround for this version.
    F.

  • Mail subject line and safari Goggle Search window removing spaces between words

    After upgrading to Lion I can no longer type out a subject line in Mac Mail witout the spaces automaicaly being removed. All words run together. Same situation in Safari's Google Search window. No issues in FireFox. Driving me nuts. Any others with this issue?

    Found the answer to this issue. I'm amazed this received no responce from the community. Must mean I was the only one with such issue. Amazinly, the exact same thing was happening on three differnt Macs that I loaded Lion to. The answer was given to me by a very helpful and SMART tech person at Apple Care. Two other Apple Care techs were going to have me reinstall the entire OS after wiping my computers clean. I finally found someone that knew what they were doing. He simply took me to Apple>Preferences>Language & Text. Then I selected the Text Tab and then went to the bottom of the window and Reset Default Settings. Bingo, all was fixed. Each machine I did the same thing on and all are working fine now. Hope by me typing this up will help others if needed since not one person responded to this inquirey.

Maybe you are looking for

  • How to include SCOM R2 agent in server image (or vmware template)

    Can anybody tell me how to include the SCOM R2 agent in our Windows images/templates?   For the SCCM client, it is as simple as stopping the service on the reference machine, deleting the cert, and capturing.   I can find no good answer on the Intern

  • External Hard Drive/Not Showing Up on Desktop

    I have a G4, running OS X 10.2.8 and recently my kids deleted some important data. So--we bought an external hard drive (WD MyBook 160 GB Essential Edition, which says on the box that it runs 10.2.8 and higher). We took the external hard drive and th

  • Script that works in 8.1.7 does not work in 9.2.0

    I have a generic hot backup script that runs well in our 8i environment where I source the username and password for SYS from a secured txt file. However I could not get the script to work in our recently installed 9.2.0 environment. Below is an extr

  • Copy and paste armature in new .fla? (CS4)

    I've got a rather elaborate bones armature built in one .fla file and I'd like to copy and paste it into another .fla.  But I'll be snookered if I can find any way to copy the setup.  Is this something that can be done at all?? Many thanks. Bruce

  • How to enable Remote Management on multiple Macs using Workgroup Manager?

    Hi I want to use workgroup manager to enable remote management on multiple macs I manage. How can I do that? Regards, Omer Barel