0

I'm working on a website which has functionality to purchase online. Once the purchase is successful system sends a confirmation mail to the user. The mail includes a special character. and also when it includes those chars when i try to insert to DB as well. Data type for lesson name to store in mysql data type is varchar(60) with

utf8_general_ci

I tried all the duplicate solutions which are available here but none of them seem to be working..

40 lessons (includes 5 for £50)

I want to remove ÂÂ. how could i remove it? I used preg_replace it does not seem to be working..

Fawzan Izy
  • 1,780
  • 3
  • 14
  • 16
  • 1
    Set your html document meta charset to utf-8. See here: http://stackoverflow.com/questions/4696499/meta-charset-utf-8-vs-meta-http-equiv-content-type – Twisted1919 Apr 22 '13 at 04:55
  • Check the email's headers. The `Content-Type` header should be set, otherwise the client will just use its default encoding, which may be wrong. See: http://www.emailonacid.com/blog/details/C13/the_importance_of_content-type_character_encoding_in_html_emails – Sverri M. Olsen Apr 22 '13 at 05:09
  • Nope not seem to be working.. what if i convert those to html entity? – Fawzan Izy Apr 22 '13 at 05:24
  • @Twisted1919 Are ther any alternative solutions that i can go through? None of them seem to be working.. – Fawzan Izy Apr 22 '13 at 05:33
  • @SverriM.Olsen any alternative solutions? – Fawzan Izy Apr 22 '13 at 06:42
  • Maybe utf8_encode? http://php.net/manual/en/function.utf8-encode.php – Razorphyn Apr 22 '13 at 07:06
  • 1
    You did not specify your cakephp version. But if you use proper utf8 configuration for your app you will be fine and all chars will display correctly. Note: for the db and its database.php, the setting is `utf8` (not `utf-8`). For all other settings it's `utf-8`. – mark Apr 22 '13 at 08:41

0 Answers0