Favourite Host

FastComet

Install Service

Premium Support

Forums

Login or register to post.

Charset encoding (DB vs Script)

Hi,I'm having some trouble get my script (2.1-r149) working with a utf8_general_ci MySQL database. All special chars stored there keep showing me as "weird" chars. All email sent to users (table mail_queue) that have special chars, like "galdéria" as example, will arrive to user email account with that problem too.My question is, what is the charset that i must use on my DB to avoid that kind of problem? The perfect solution would be that same encoding was set to see the same data (DB vs. Script).Thank you for any kind of help.Best regards.

Hello,I think there is a problem with the Mail lib. I will take a look at it again later today if I get a chance and upload a fix to the dev snapshot and post back here to let you know when I do. :)Ryan

Hi Ryan :)Thank you for your quick response. This issue is really delaying my site launch.Maybe it's not a only a mail lib problem but a general encoding problem. If a user is created with the name "Anunciação" i should see "Anunciação" on the DB. The same for table mail_queue. On the message body i should see special chars too and i'm getting the same char mix user receives on his mail account.Another example. My actual currency symbol is €. On the DB i see messed up chars on the symbol field, the same i get on the ad published email. But if i update directly on the DB to the correct symbol (€) i get the correct symbol on the email sent.Maybe utf-8 html headers missing on form inputs?I'm doing some tests to see if i can figure it out.Thank you again.Regards,

Some steps forward here. I solved my DB vs. script data output simply editing functions2.php meta html from utf-8 to iso-8859-1 and encoding my translation file to iso-8859-15.Now another problem shows up. The ad text displayed on the ads grid and some javascript functions inside user control panel shows me the funny chars again. Any ideia the files to focus?Something came up to my mind but hard task... encode all script files to iso-8859-15... please no! :)Best regards,BM

SOLVEDRyan just replaced line on function "assign_ad_template" in "ads.inc.php":return $str;with...return utf8_encode($str);now chars look awesome on ads text :)Regards,BM