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.

Archive /

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

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

Email encoding iso8859-2


Reply


4 Posts   2666 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

Core Development Team, 201 Posts

25 January 2008 at 9:54am

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