Qiang has asked for the wisdom of the Perl Monks concerning the following question:
short version of my question: in a webapp, I am decoding utf8 encoded text and saving it to mysql database without encoding it back. Do you see a problem here?
a long version of my question: My webapp(html webpages) is utf-8 encoded. I need to do length checking before storing user generated data to database. I am using Data::FormValidator and created a unicode filter which decode input first (hense modify the input) before doing length checking. After validation, D::F offers the validated data as a hash ref which is really convenience for inserting to database.
So before I was simply storing utf8 encoded data directly to database. and now I am storing decoded utf8 text to mysql and the data looks fine when displayed back in webpage. I am wondering if this could cause problem.
short version of my question: in a webapp, I am decoding utf8 encoded text and saving it to mysql database without encoding it back. Do you see a problem here?
Not if you've read the DBD::mysql documentation, and have taken the appropriate steps (search for mysql_enable_utf8 for example).