![]() |
Some file printing an illegal character - 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: Some file printing an illegal character (/showthread.php?tid=27098) |
Some file printing an illegal character - El Forum - 02-01-2010 [eluser]Mum_Chamber[/eluser] Hi everyone, I'm developing some basic CI web application to get familiar with CI, however, not without problems. One of the files in my application is printing an illegal character or a white space, which messes the html layout. I know it's related to one particular controller, but I can't pinpoint which included file, exactly. I've tried all tricks in my sleeve and failed repeatedly. Do you have any ideas on how I can find that out? Any nifty debugging techniques are also welcome. Thanks a lot in advance Some file printing an illegal character - El Forum - 02-01-2010 [eluser]Joshua Logsdon[/eluser] Hi Mum_Chamber, Ouch. Whenever I run into these, I usually have to change the file encoding (I work in Eclipse) to track down nasty characters that appear out of nowhere... if the file is encoded in UTF-8 I have to change it to ASCII to find it for example. Some file printing an illegal character - El Forum - 02-01-2010 [eluser]Mum_Chamber[/eluser] Hi Joshua, I've tried different encodings on Notepad++ and Coda to no avail.. The problem is, I'm not even sure which file is printing those characters and pointing that out in the MVC architecture is killing me.. Some file printing an illegal character - El Forum - 02-01-2010 [eluser]Joshua Logsdon[/eluser] Hmmm, not that you haven't tried, but the last thing I can offer is to break things down... see if echoing nothing from your controller (no views, etc.) still gives the characters. If that doesn't help track it I'm at a loss. Some file printing an illegal character - El Forum - 02-01-2010 [eluser]Mum_Chamber[/eluser] Well, that kind of thinking actually helped! I've tried to track the differences between views (and views that include other views) and found that it was indeed an encoding issue caused by a file I'd never suspect. Seems like Coda's BOM support is a bit flawed. Thank you very much Joshua! Some file printing an illegal character - El Forum - 02-01-2010 [eluser]Joshua Logsdon[/eluser] No problem, those things are always a pain to track down! When in any situation I'm ready to pull my hair out, I have to remind myself to break things down into simple and controllable steps. ![]() |