Welcome Guest, Not a member yet? Register   Sign In
Some file printing an illegal character
#1

[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
#2

[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.
#3

[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..
#4

[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.
#5

[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!
#6

[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. Smile Good luck with your app!




Theme © iAndrew 2016 - Forum software by © MyBB