jonathanbee Posted October 3, 2007 Share Posted October 3, 2007 I can get $comments out of the db and put it on screen fine, but when I try to email it, there is an encoding problem. So this code: $body .= "コメント<br/>" . $comments; correctly generates this text in the email: コメント 30%アップの料金で宜しくお願い致します。 But if I take $comments from the db instead, it will not appear correctly. I am using charset=EUC-JP". Somehow I have to get $comments converted to unicode after I query the db.. Thanks for any suggestions. Quote Link to comment Share on other sites More sharing options...
jonathanbee Posted October 3, 2007 Author Share Posted October 3, 2007 i have tried: $c= mb_convert_encoding($comments, "UTF-8"); but, still it won't work... Quote Link to comment Share on other sites More sharing options...
jonathanbee Posted October 3, 2007 Author Share Posted October 3, 2007 i think i need to convert the data to HTML Entity Codes not utf 8... i don't think htmlentities is quite what i need, is there anything else out these that might work? Quote Link to comment Share on other sites More sharing options...
jonathanbee Posted October 3, 2007 Author Share Posted October 3, 2007 can't believe shift jis worked, but this fixed it.. $c = iconv("EUC-JP", "SJIS", $comments); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.