Page 1 of 1

Charset setting ignored?

Posted: Mon Mar 02, 2009 1:55 pm
by HHahn
I tried to set the Charset to, e.g., "iso-8859-4", "iso-8859-8", "utf-7", "utf-8" and some others. In all cases, the received message had "iso-8859-1", except if I insert one or more UTF-8 characters into the header.
This behaviour is seemingly in line with the documentation, except that the latter suggests that the default setting (ISO-8859-1 or UTF-8) can be overruled by e.g. $message->setCharset ("iso-8859-4") or similar.

It seems that this overruling the default does not work. Is this a bug, or do I misunderstand something?

Re: Charset setting ignored?

Posted: Mon Mar 02, 2009 2:58 pm
by Chris Corbyn
Can you post the full code please? In version 3 you need to set the charset on each MIME part and on the message itself. It's a bit awkward. Version 4 fixes/streamlines this so you only need to set it on the message.

Re: Charset setting ignored?

Posted: Tue Mar 03, 2009 5:45 am
by HHahn
Dear mr. Corbyn,

Thanks, it now works. I wasn't aware that I had to set the charset for every message part. I now looked at the documentation for the Swift_Message_Part class, where I indeed found a method setCharset. Specifying this for each message part solved the problem.

By the way, when will version 4 be released? I prefer not to use a beta version.

Re: Charset setting ignored?

Posted: Tue Mar 03, 2009 6:21 am
by Chris Corbyn
HHahn wrote:By the way, when will version 4 be released? I prefer not to use a beta version.
It was supposed to be released over a week ago. I'm running really behind getting the new website up and running and can't seem to find the time to get it finished by the time I get in from work on the evenings. The short answer is "soon" ;)

Re: Charset setting ignored?

Posted: Tue Mar 03, 2009 1:14 pm
by HHahn
Chris Corbyn wrote:The short answer is "soon"
Fine. Do you announce it here on the forum, so that all those who subscribe will be notified?

Re: Charset setting ignored?

Posted: Tue Mar 03, 2009 3:48 pm
by Chris Corbyn
Yeah I'll announce it on the forum and on the google group, and the website will look completely different ;)