login about faq

I'm not sure which version of the ChilKat libs we're using (where can I find this ?). It was downloaded more than a year ago.

We discovered a bug in our SMTP mail functionality which uses ChilKat mail.

When trying to send a mail with a file attachment this would sometimes silently fail to attach the file when the filename contained certain ansi characters (such as é)

The mail is sent out, but the attachment isn't present in the mail, and the CkEmail::AddFileAttachment() returns true.

We tracked this down to a bug in the CkString copy constructor.

Reproducible with this bit of code:

CkString strAnsi = "This is an ansi string containing é";
CkString strCopy (strAnsi);

strCopy is now flagged as a utf8 string (even though strAnsi is not), but the contents of the strCopy string is just a flat copy of the strAnsi contents. the ansi encoding isn't converted to utf8 encoding, so you end up with an invalidly encoded utf8 string. Apparently using this for CkEmail::AddFileAttachment() makes the function return true but doesn't attach the file.

It can be worked around by avoiding the copy constructor

CkString strCopy;
strCopy = strAnsi;

gives the desired result.

asked Jul 18 '14 at 04:58

OReubens's gravatar image


This problem has been fixed and will be included in the next release after v9.5.0.41.


answered Jul 20 '14 at 13:50

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: Jul 18 '14 at 04:58

Seen: 662 times

Last updated: Jul 20 '14 at 13:50

powered by OSQA