Problem in parsing no-ascii body text message?

I have a text/plain mime message(Composed in the outlook express) that contains a long one-line japanese string as follow:
���b�Z�[�W���O�v���b�g�t�H�[�����������r�W�l�X�V�X�e�������������������B�C���^�[�l�b�g���������\�����������������A���@�\�����b�Z�[�W���O�\�����[�V���������p���������B���������������A���q�T�[�r�X�������x�������A�r�W�l�X�v���Z�X�����������A�@�������������M�����������������R�X�g�����������������������B�������A�I�����C���u���[�J�[���g�b�v������������2���A���E�I���N���W�b�g�����������s�J�[�h���s������������3���A���������i�����X����5�����A�����r�W�l�X�N���e�B�J�������b�Z�[�W�C���t���X�g���N�`���[������Tumbleweed���\�����[�V�������g�p�����������B���������}�[�P�b�g�������������������������H���q���M��
If I add one more japanese char to the begining of the string and parse the mail with JavaMail, It will becomes
�����b�Z�[�W���O�v���b�g�t�H�[�����������r�W�l�X�V�X�e�������������������B�C���^�[�l�b�g���������\�����������������A���@�\�����b�Z�[�W���O�\�����[�V���������p���������B���������������A���q�T�[�r�X�������x�������A�r�W�l�X�v���Z�X�����������A�@�������������M�����������������R�X�g�����������������������B�������A�I�����C���u���[�J�[���g�b�v������������2���A���E�I���N���W�b�g�����������s�J�[�h���s������������3���A���������i�����X����5�����A�����r�W�l�X�N���e�B�J�������b�Z�[�W�C���t���X�g���N�`���[������Tumbleweed���\�����[�V�������g�p�����������B���������}�[�P�b�g�������������������������H���q���M???????
Here is the message header info:
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: quoted-printable
Does this mean that that there is a bug in the JavaMail in handling no-ascii chars?
After I make the following call:
setContent(this.getContent(), this.getContentType());
The change becomes permanent and recipient will see the '????' at the end of the message.
I can provide mime format of the message if necessary.
Any one see this before?
Any help is appreciated!

KennethKwan,
Thanks for you reply. I tried you code and it does not work. All I got is
"$B%a%C%;!<%8%s%0%W%i%C%H%U%)!<%`$r4{B8$N%S%8%M%9%7%9%F%`$HE}9g$7$F$$$^$9!#%$%s%?!<%M%C%H@\B3$,2DG=$J$"$i$f$k>l=j$G!"9b5!G=$N%a%C%;!<%8%s%0%=%j%e!<%7%g%s$rMxMQ$G$-$^$9!#$3$l$i$N4k6H$O!"8\5R%5!<%S%9$dK~B-EY$r9b$a!"%S%8%M%9%W%m%;%9$r4JN,2=$7!"5!L)>pJs$rAw<u?.$9$k$?$a$K$+$+$k%3%9%H$H;~4V$r:o8:$7$F$$$^$9!#Nc$($P!"%*%s%i%$%s%V%m!<%+!<$N%H%C%W4k6H$N$&$A$N(B2$B<R!"@$3&E*$J%/%l%8%C%H$"$k$$$ON99T%+!<%IH/9T2q<R$N$&$A$N(B3$B<R!"$*$h$S@h?J9q$NM9@/6I(B5$B$D$,!"8=:_%S%8%M%9%/%j%F%#%+%k$J%a%C%;!<%8%$%s%U%i%9%H%i%/%A%c!<$H$7$F(BTumbleweed$B$N%=%j%e!<%7%g%s$r;HMQ$7$F$$$^$9!#$"$J$?$N%^!<%1%C%H$O$I$l$[$I$N6%AhN($G$9$+!)8\5R$N?.Mj(B"
instead of the japanese string I posted.
All I did was
String text = (String)mimeMessage.getContent();
It works ok for most of japanese strings except for the one I mention above which is a single long line of japanese string.

Similar Messages

  • Problem processing Email attachment when Body text exists

    Using an Email communication channel (POP3) we are successfully processing emails with an attachment of type csv or xml.
    These attachments are swapped with the Payload message then sent into an IP for processing.
    The IP splits the inbound message into multiple messages (1:n) and feeds them individually into a “For Each Block” where we perform a transformation then a send to a JDBC adapter.
    Everything works well until someone enters text into the body of the email. Then we end up with an error.
    Error handling for work item 000000102646
    Work item 000000102648: Object CL_SWF_XI_MSG_BROKER method SEND_SYNCHRON cannot be executed
    An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor d
    An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor d
    When body text is encountered we end up with two payloads:
    1.     Main Document (application/xml)
    2.     Mail Message (multipart/alternative boundary..)
    We are currently at XI 3.0 Service 17 (SAPKB64017)
    The mail channel for the XML attachment is configured with the following Modules:
    •     localejbs/AF_Modules/PayloadSwapBean LEB
    o      swap.keyName    Content-Description
    o     swap.keyValue     MailAttachment-1
    •     ASMA with Variable Transport Binding has been selected
    •     Mail attributes (only keep attachments was selected)
    •     Message Protocol XIPAYLOAD
    •     Transport Protocol POP3
    The mail channel for the CSV attachment is set up the same except it has an additional module specification for localejbs/AF_Modules/MessageTransformBean to generate an XML document from a csv attachment.
    Has anybody had the same experience? Or suggestions?

    Maybe the error is related to the fact that the payload is not a valid XML.
    Try to send some text in body like "<test><data>abcd</data></test>" just to see if the same error occurs.
    Regards,
    Henrique.

  • Problem Nokia N97: Arabic language in text messagi...

    No arabic language exist in text messaging in my phone,although my phone supports arabic language!! please Help!!

    we can't discuss changing product code here.....but, r u sure that the new product code is rm-507 and supports arabic ???
    i recommend you to install the original product code's firmware
    -you can show appreciation to my posts if it helped or useful by pressing the green Kudo star beside my post that hepled
    -if my answer was the solution , so click accept as solution button
    Started From Nokia 3310 , Now with Nokia N97 v.22.0.110 + N900 PR1.2

  • HT3939 I have problems with my text messaging. Plus i can not send or receive from non owner of iPhones

    When i first started texting my text would go through gmail to apple iphones. After I  correct this problem  I am not able to text message non apple phones and i wasn't able to start with

    I'd suggest you contact your email provider. They may actually have a problem.

  • SMS text message header does not display sender information

    When I receive a text message the only header information that displays is the date and time.  The senders information does not display.  The lines are not even there.  There is no way to reply to a text message or tell who the sender is.  This problem is only with SMS messages.  Regular email headers display just fine.  I have done a wipe, reset, reload, everything possible with no luck.  I am the only one in my office with this problem.  I have not been able to find any information or postings from anyone having the same problem.  I can read the text message, but there is no header (except for the date and time).  Any thoughts?
    Blackberry Curve 8350i

    I was able to resolve the problem by uninstalling the Blackberry desktop manager software and reinstalling it selecting Internet Email vs. Blackberry Enterprise Server.  If you get to the screen that asks you to choose which type of email service you use and you accidentally choose the wrong one your phone will work but will do strange things, including sending all sorts of redirect emails.  For me, this seemed to do the trick.

  • Why does my signal drops and takes a long time to search and connect when I turn on or off my cellular data? And normal text messages are not getting delivered properly. It shows sent but later it will show try again, Is it just me?

    I do not know what the problem is, but after the latest update it is really hard to send text messages. It is taking alot of time to send the messages, it is not the problem with the carrier because sending text messages with the same number in the same area is really easy on my normal nokia 1100. Please suggest me what I should check. Second problem I am facing is the carrier signal drops to nothing when I turn on the cellular data. It has to then search for the network and connect again the same happens when I turn the data off again. Please tell a solution. I do not think it is the problem with the hardware because the phone is hardly 2weeks old and everything was working properly with ios 6. It initaly had problem with the battery on updating to ios7 but that was rectified with the new update but again these are the new issues am facing.

    This may sound stupid, but I'm gonna throw it out there anyway. Is it possible, that if I have enough junk on my desktop it might disrupt the signal? It seems odd, but it kind of looks like my signal is strong and relatively steady now that I've cleaned my desktop. I do tend to get very cluttered. I use a lot of reference images and save text clippings to use later... it just piles up very quickly.
    So, I wonder if all that extra effort my system has to do keeping up with the junk might have something to do with the drop outs?

  • 5700 refuses to send text messages saying memory i...

    Hi
    Could anyone help me with this problem? I cannot send any text messages from my 5700 as it keeps saying the memory is full and asks me to close some applications and try again.
    The thing is that I never installed any new ones. It is just the same way as when I got a few months ago. I cleared my phone memory and my memory card, restored factory settings, reset the phone, tried taking out the card and/or the battery and sim and everything I thought might be causing this, but in vain.
    Does anyone know what I can do?
    Thank you in anciticipation
    B.
    Solved!
    Go to Solution.

    Thanks a million! I just tried it and it worked. Thank you again!
    02-Oct-2008 04:45 PM
    monaco_mike wrote:
    I had the same problem with my N95. I sought advice and was told to do a hard reset.
    Firstly, back up your phone. Then type in *#7370# followed by the code 12345, which is the default Nokia code, unless you've changed it. As I say, that's for the N95. I don't know if it's the same for your 5700.
    I must re-iterate, back up your phone as the hard reset will clear EVERYTHING!!
    Good luck.

  • Does anyone have a clear solution as to why my new iPhone will not send text messages to some numbers.

    Does anyone have a clear solution as to why my new iPhone 5 will not send text messages to some numbers?

    I had problems the first few days with text messaging on my new cell. I checked my new contract service thru AT&T online, and it turned out the guy who set up my phone didn't sign me up for the unlimited texting I told him I HAD to have!  I just had to add texting back into my contract.....problem solved.  I hope your problem is solved this easily.

  • Iphone 4s wont send/receive text messages.

    my iphone 4s isnt sending/receiving text messages. when i try to open messages it just says "messages" at the top and then it is a blank page underneath. all of my previous texts were also erased. i updated to IOS 8 2 days ago but the problem just started today.

        detti,
    Text messages are a vital part of a working phone. We encourage you to reset your device. Please back everything up via iTunes or iCloud. Then go to Settings/General/Reset/Erase All Content and Settings. This will reset the phone and correct anything that maybe causing the issue.
    RobinD_VZW
    Follow us on twitter @VZWSupport

  • Droid maxx hd will not send text messages

    Is anyone else having this problem? Phone started not sending text messages. I have deleted Apps, pics, texts, etc and it starts to work for a bit then does the same thing.

    Have you tried clearing system cache on your phone, I'd clear cache's for your Text messages then clear the system cache, make sure to power cycle your phone this can help as well..

  • Q10 not loading text messages

    Hi I've been having a problem with my q10 not loading text messages. When I click on one it just shows their name but no message. If I get out of that message and go to another it just shows the first persons and and no message. This is really frustrating and I considering changing to a new phone like the Samsung galaxy phones. Can anyone help?! Pleas!!

    Hi and Welcome to the Community! 
    Keep the phone on, and remove the battery for about a minute or more and then replace it
    VIA | rat-7 
    http://supportforums.blackberry.com/t5/BlackBerry-Z10/z10-update-10-2-0-424-problem-with-text-messag...
    Please thank those who help you by clicking the button.
    If your issue has been solved, please resolve it by marking "Accept as Solution"

  • Text message to email sent as attachment instead of in email body

    I used to have this problem before with my iPhone 4, but it seemed to go away. Now, with the lates OS update it's back again. When I send a text message to my wife's Gmail it arrives as a text file attachment to the email instead of just normal text in the email body.
    I use Verizon, and the source of the email is @vzwpix.com. I know that there is also @vtext.com, but in the past it hasn't mattered which one was used.
    Any ideas?

    If you try reading other posts here about attachments and such you may get a hint. It sounds like all email programs would work fine if people just sent plain text. Problems arise when we use RTF (rich text format) and HTML. Possibly the original email you received had formatted text. My guess is that if you forced that text into plain text then it would be readable by all. This is the reason that only some people have trouble with the forwarded text. It depends on their email client or even on settings of that client.
    Good luck.

  • My iphone 4s voice dictation for text messages is not consistently working. Sometimes it works, other times after the dictation it just gives me a blank space. Anyone else having this problem?

    My iphone 4s voice dictiation for text messages is not consistently working. I've had the phone since Thanksgiving and it always worked perfectly, but the last few weeks it's been hit or miss. Sometimes it works, sometimes it doesn't. Anyone else having this problem? I tried the hard reset but that hasn't fixed it.

    I have the same problem since updating to IOS 8.3. Any app to which I want to send a new link via IMessage does not allow me to select a contact to send the IMessage to. Using a pre-existing thread does not have same problem.

  • Problems with importing text messages from PC Suit...

    Problems with importing text messages from PC Suit 7.1.18.0 to my Nokia 5800
     I am trying to import a csv file that contains text messages (Note that this file was created using PC Suit 7.1.18.0) to a subfolder that I have created to My Folders but PC Suits only imports the text messages to the Draft folder. Note that initially it shows that the messages are import in the correct folder but after a refresh it shows them in the Draft Folder. Is their any setting that I should change in the PC Suit or the phone? My computer runs on Windows XP Service Pack 3 and the Nokia 5800 was upgraded to the latest firmware v20.0.012
     Thanks for your help

    Most phones only allows importing of draft and archived box for SMS.
    To do a restoring, you need to backup the SMS as a .nbu file using PC Suite and restore later.
    If you got an SD card, you can also do a backup on the SD Card (backup.arc) then restore later (reset and restore: backup.arc and mmc).
    What's the law of the jungle?

  • HT4623 is anyone else having problems with receiving and sending text messages. most people in my contacts are not getting messages that i send to them.

    is anyone else experiencing problems with (SMS) text messaging. Most all of my daily contacts dont receive my messages.

    Make sure you have checked off iCloud contacts in your Contacts app under Groups in upper left corner.

Maybe you are looking for

  • How do I transfer photos from iPad mini to my Macbook Pro?

    I have about 30GB of photos on my iPad mini (which were added from a SD card through the SDcard cord with the lightning cable end) and i am trying to take them off my iPad mini to free up space, but still need to keep the photos. I tried importing th

  • Hi How do i add a second signature to my iMAC so i can use it to witness documents?

    Hi How do I add a second signature to my iMAC so I can use it to witness documents?

  • Data type p

    hi all, i have defined a field as data type betrg which is P, but in some cases i m having arithemetic overflow error. "An overflow has been determined in the current arithmetical operation containing operands of type P. Possible causes include: 1. 

  • Backup server setup info with Server Assistant

    Hi, I'm trying to backup my OS X Server (10.9.4) setup information using Server Assistant. On the 'Welcome' page in the Assistant, I selected "Save setup information in a file or directory record." The other choices are "Install software on a remote

  • MPLS question

    Hi all. We are in the midst of rolling out Mpls to 5 of our remote sites. 3 sites will have a cir of 10 mbps, 1 100mbps, and another 250 mbps. I am planning on running ospf in each site. My question is, will a 2821 router at each site be sufficient.