Re: Encoding problem with helpers
i just solved the problem by encoding all data and html in utf-8. thanks so much for your help. On Jan 22, 8:16 pm, brian wrote: > First thing is to make sure that the page with the form is being > served with the proper encoding. Use $html->charset() in your layout. > The form should submit using the character set that it was displayed > with. > > Next, make sure that that's what your browser is using--check "page > info" in the browser. > > Also, you say that $post['title'] is empty, but could this be due to > some other issue? Are you sure that $post contains what you think it > does? > > 2009/1/22 ABY : > > > > > hi, > > i am currently developing an application with CakePHP, but i have a > > serious problem with encoding. my database records are in Turkish. > > when i view a record, there is no problem and i can view Turkish > > characters. but when i try to edit a record, all fields that contain > > at least a Turkish character are just empty. for example when i set a > > new variable like > > > $var = $this->data in the controller, > > in edit.ctp i can display the $var correctly (by pr() command), but > > the edit form that i create using $form helper does not display the > > fields with Turkish characters. > > > i have the same problem with $html helper. for example; > > echo $post['title'] displays "çağrı",but > > $html->link($post['title'], '/posts') displays nothing.. > > > can somebody help me with that problem please. i have been trying to > > fix it for hours by changing database encodings, but it didin't work > > out.. > > > thanks --~--~-~--~~~---~--~~ 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: Encoding problem with helpers
1. Make sure everything in your database is utf8 (or other encoding needed). 2. Make sure you're connecting to your database with utf8[1]. 3. Make sure your pages are served in utf8. [1] http://groups.google.com/group/cake-php/browse_thread/thread/dcdbcc085dcd09a0 Hope that helps! On Jan 22, 11:04 pm, ABY wrote: > hi, > i am currently developing an application with CakePHP, but i have a > serious problem with encoding. my database records are in Turkish. > when i view a record, there is no problem and i can view Turkish > characters. but when i try to edit a record, all fields that contain > at least a Turkish character are just empty. for example when i set a > new variable like > > $var = $this->data in the controller, > in edit.ctp i can display the $var correctly (by pr() command), but > the edit form that i create using $form helper does not display the > fields with Turkish characters. > > i have the same problem with $html helper. for example; > echo $post['title'] displays "çağrı",but > $html->link($post['title'], '/posts') displays nothing.. > > can somebody help me with that problem please. i have been trying to > fix it for hours by changing database encodings, but it didin't work > out.. > > thanks --~--~-~--~~~---~--~~ 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: Encoding problem with helpers
First thing is to make sure that the page with the form is being served with the proper encoding. Use $html->charset() in your layout. The form should submit using the character set that it was displayed with. Next, make sure that that's what your browser is using--check "page info" in the browser. Also, you say that $post['title'] is empty, but could this be due to some other issue? Are you sure that $post contains what you think it does? 2009/1/22 ABY : > > hi, > i am currently developing an application with CakePHP, but i have a > serious problem with encoding. my database records are in Turkish. > when i view a record, there is no problem and i can view Turkish > characters. but when i try to edit a record, all fields that contain > at least a Turkish character are just empty. for example when i set a > new variable like > > $var = $this->data in the controller, > in edit.ctp i can display the $var correctly (by pr() command), but > the edit form that i create using $form helper does not display the > fields with Turkish characters. > > i have the same problem with $html helper. for example; > echo $post['title'] displays "çağrı",but > $html->link($post['title'], '/posts') displays nothing.. > > can somebody help me with that problem please. i have been trying to > fix it for hours by changing database encodings, but it didin't work > out.. > > thanks > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Encoding problem with helpers
hi, i am currently developing an application with CakePHP, but i have a serious problem with encoding. my database records are in Turkish. when i view a record, there is no problem and i can view Turkish characters. but when i try to edit a record, all fields that contain at least a Turkish character are just empty. for example when i set a new variable like $var = $this->data in the controller, in edit.ctp i can display the $var correctly (by pr() command), but the edit form that i create using $form helper does not display the fields with Turkish characters. i have the same problem with $html helper. for example; echo $post['title'] displays "çağrı",but $html->link($post['title'], '/posts') displays nothing.. can somebody help me with that problem please. i have been trying to fix it for hours by changing database encodings, but it didin't work out.. thanks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---