![]() |
encoding problam with jquery - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: encoding problam with jquery (/showthread.php?tid=6636) |
encoding problam with jquery - El Forum - 03-06-2008 [eluser]A.M.F[/eluser] hello mates i want to make an add-comments-form with jQuery. therefore i writed this JS: Code: $(document).ready(function() { now, this is my html: Code: <div id="comment" style="display:block; float:right; width:30%; margin-right:15px;"> and that the php code inside my controller: Code: function comment($item_id) everything is ok, BUT- the $comment data that i get is in japanease or whatever, even though i added a header with my encoding. why is that? thank u guys encoding problam with jquery - El Forum - 03-06-2008 [eluser]xwero[/eluser] your return true instead of a string, the data your get will be the javascript version of the php true boolean. encoding problam with jquery - El Forum - 03-06-2008 [eluser]A.M.F[/eluser] [quote author="xwero" date="1204834685"]your return true instead of a string, the data your get will be the javascript version of the php true boolean.[/quote] the return value doesn't matter, i can also remove the 'return' cuz i don't need it. i am inserting the data into the DB before i am returning any value. the problam is only the text that i get from the POST. encoding problam with jquery - El Forum - 03-06-2008 [eluser]A.M.F[/eluser] anyone? i'm really hopeless right now =[ encoding problam with jquery - El Forum - 03-06-2008 [eluser]Avatar[/eluser] I think you must set the header: Code: header('Content-Type: text/html; charset=windows-1255'); also maybe try a different charset encoding problam with jquery - El Forum - 03-06-2008 [eluser]A.M.F[/eluser] [quote author="yingyes" date="1204847200"]I think you must set the header: Code: header('Content-Type: text/html; charset=windows-1255'); also maybe try a different charset[/quote] allready tried that... not working. |