Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Email encoding iso8859-2


Go to End


4 Posts   3239 Views

Avatar
karibe

Community Member, 56 Posts

25 January 2008 at 1:09am

Hello

I have problems to encode contact form emails into my country iso2

Thunderbird shows iso8859-15(sic!)

How to set my iso8859-2

in my class that extends UserDefinedForm_Controller
...
private function encode( $submitedFields )
{
while ($submitedFields->next())
{
$submitedFields->current()->Title = iconv( "utf-8", "iso8859-2", $submitedFields->current()->Title );
$submitedFields->current()->Value = iconv( "utf-8", "iso8859-2", $submitedFields->current()->Value );
}

return $submitedFields;
}
...

Avatar
dio5

Community Member, 501 Posts

25 January 2008 at 1:59am

Hi,

I've had some troubles with emails too and solved it by changing all the charsets in
sapphire/core/Email.php from

iso-8859-15

to

utf-8

I think it's at about 5 or 6 places in that file that you can replace it.

Hope that helps.

Avatar
karibe

Community Member, 56 Posts

25 January 2008 at 2:44am

Thanks it working...

Avatar
Tim

Community Member, 201 Posts

25 January 2008 at 9:54am

I've reported this in the issue tracker @ http://open.silverstripe.com/ticket/2176