Re: Foreign Characters
Can you show us the headers you are setting in order to specify the utf-8 encoding? When a form is being submitted, the form will use the page's encoding, so that must be set correctly to utf-8. Enjoy, John On Mar 21, 5:14 pm, blckspder blcksp...@gmail.com wrote: Hello, I have a form that people from all different countries use. I see to have a problem with foreign characters. my page is in utf-8, i tried using the php function utf8_encode and htmlspecialchars but everything comes out jumbled when foreign characters are used. here is an example of what I see in the database and in the email: arabacı That example is when I use htmlspecialchars, The database is utf-8 as well. If anyone can help I would appreciate it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Foreign Characters
I setting it to utf in the meta tag meta http-equiv=Content-Type content=text/html; charset=utf-8 / On Mar 21, 2:50 pm, John Andersen j.andersen...@gmail.com wrote: Can you show us the headers you are setting in order to specify the utf-8 encoding? When a form is being submitted, the form will use the page's encoding, so that must be set correctly to utf-8. Enjoy, John On Mar 21, 5:14 pm, blckspder blcksp...@gmail.com wrote: Hello, I have a form that people from all different countries use. I see to have a problem with foreign characters. my page is in utf-8, i tried using the php function utf8_encode and htmlspecialchars but everything comes out jumbled when foreign characters are used. here is an example of what I see in the database and in the email: arabacı That example is when I use htmlspecialchars, The database is utf-8 as well. If anyone can help I would appreciate it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Foreign Characters
That is fine, so the problem is not in the html! In what way are you looking at the data and seeing the erroneous representation (in another page, using a tool or what)? How are you processing your data before saving them in the database? And when you are retrieving them from the database? And before presenting the data in html? Enjoy, John On Mar 21, 9:28 pm, blckspder blcksp...@gmail.com wrote: I setting it to utf in the meta tag meta http-equiv=Content-Type content=text/html; charset=utf-8 / [snip] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Foreign Characters
John, Thanks for the help. I see the errors in the mysql database using query browser and I also see the error in outlook and gmail when the results are emailed. I basically keep all the results in an array. I then loop through the array and do mysql_real_escape_string(). I tried nesting the utf8_encode function and the htmlspecialchars function into the escape function like so: mysql_real_escape_string(utf8_encode($array['item'])); or mysql_real_escape_string(htmlspecialchars($array['item'])); On Mar 21, 3:41 pm, John Andersen j.andersen...@gmail.com wrote: That is fine, so the problem is not in the html! In what way are you looking at the data and seeing the erroneous representation (in another page, using a tool or what)? How are you processing your data before saving them in the database? And when you are retrieving them from the database? And before presenting the data in html? Enjoy, John On Mar 21, 9:28 pm, blckspder blcksp...@gmail.com wrote: I setting it to utf in the meta tag meta http-equiv=Content-Type content=text/html; charset=utf-8 / [snip] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Foreign Characters
On Sat, Mar 21, 2009 at 12:14 PM, blckspder blcksp...@gmail.com wrote: Hello, I have a form that people from all different countries use. I see to have a problem with foreign characters. my page is in utf-8, i tried using the php function utf8_encode and htmlspecialchars but everything comes out jumbled when foreign characters are used. here is an example of what I see in the database and in the email: arabacı That example is when I use htmlspecialchars, The database is utf-8 as well. If anyone can help I would appreciate it. Well, I wrote a checklist about it. Hope it helps: http://tinyurl.com/dxwx7z Best regards. -- MARCELO DE F. ANDRADE (aka eleKtron) Belem, PA, Amazonia, Brazil Linux User #221105 Visit my blog: http://mfandrade.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---