login about faq

hi chilkatsoft

i have one problem.

when i get message form imap server (Gmail) only TEXT RECEIVE language THAI is "?????????".

i think maybe it is problem about CHARSET but i can't change charset before get message.

can you help me?

thank you very much!

asked Jul 09 '12 at 19:48

Jaynarol's gravatar image

Jaynarol
26236


This new build should solve the problem: http://www.chilkatsoft.com/preRelease/chilkat-9.3.1-jdk6-win32.zip

The Chilkat objects (in Java) should all automatically return utf-8 strings.

link

answered Jul 10 '12 at 12:28

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

OK i can solve a problem!!


CkMessageSet messageSet;
boolean fetchUids = true;
messageSet = imap.Search("ALL", fetchUids);

// Fetch EMAIL
CkEmailBundle bundle;
bundle = imap.FetchBundle(messageSet);

// Loop Get EMAIL Data
for (int i = 0; i <= bundle.get_MessageCount() - 1; i++) {

    CkEmail email = new CkEmail();
    email = bundle.GetEmail(i);

    String FROM = email.fromAddress();

    CkString to = new CkString();
    email.GetToAddr( 0, to );
    String TO = to.getString();

    CkByteData email_subject = new CkByteData();
    email.GetMbHeaderField2( "utf-8", "Subject", email_subject );
    String SUBJECT = email_subject.to_s();

    CkByteData email_body = new CkByteData();
    email.GetMbHtmlBody("utf-8",email_body);
    String BODY = email_body.to_s();

    System.out.println(FROM);
    System.out.println(TO);
    System.out.println(SUBJECT);
    System.out.println(BODY);
    System.out.println("--");
 }
link

answered Jul 09 '12 at 21:25

Jaynarol's gravatar image

Jaynarol
26236

Thanks! I think I see the cause of the original problem. The Chilkat objects in Java should always return utf-8 strings. This is the case for objects created via the "new" operator. However, for objects returned by another Chilkat method, such as bundle.GetEmail, the methods are not returning utf-8. This is something that can be fixed. I will work on this tomorrow and if you wish, will point you to a new build. (What operating system do you use?)

link

answered Jul 09 '12 at 22:45

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Thanks! - Windows 7 32bit - Java jdk1.6.0_33

(Jul 09 '12 at 23:01) Jaynarol

Thank you for new build.

Awesome!!

link

answered Jul 11 '12 at 14:28

Jaynarol's gravatar image

Jaynarol
26236

hello i have same problems with that i have so many language and my application is on php so what is the issue

please let me know ASAP.

link

answered Jun 30 at 04:20

nikunj986's gravatar image

nikunj986
1

The fix appears to have been made back in 2012. What version of the library are you using?

(Jun 30 at 08:27) jpbro ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×184
×174
×27

Asked: Jul 09 '12 at 19:48

Seen: 6,598 times

Last updated: Jun 30 at 08:27

powered by OSQA