Page 1 of 1
php weird characters showing up on outputted data
Posted: Fri Oct 26, 2007 10:24 pm
by mckooter
this may or may not be a php releated thing directly, I am simply coding a new template for a customer who uses the subdreamer cms, he has the design and the cms already, I am simply placing the two together. Upon doing so I keep running into the following text being outputted to the browser in various areas, (i am unable to nail down exactly where it is coming from)
is this something that might be coming from something I did directly or is it possible its from either subdreamer or the template itself, I have been racking my brain for hours and cannot determine where its coming from (it even shows up on the source as the very first thing output to the browser, before the DOC type
any help would be greatly appreciated, and if its something from the script just let me know and atleast ill have a starting area
i think my main problem for finding it is that its alternate characters so i cannot search for it at all
Posted: Fri Oct 26, 2007 11:13 pm
by mrkite
It looks like a BOM.
Check your text editor, see if it has an option to turn off UTF-8 Byte Order Marks.
Posted: Fri Oct 26, 2007 11:16 pm
by mckooter
okay, solved, and boy was i lucky
i was so stressed about how these phantom characters got there that i began searching google for anything, and i mean anything, hell , im surprised i didnt search for new york,
beat this, the search phrase that i used to find my answer was:
php outputting "three characters"
and to me thats amazing, as i never really thought it would work, i was just giving up,
as for the answer:
dont ever use microsoft products again
apparently the new Expression Web (apparently used to be frontpage) cant seem to edit simple .php files without messing something up, it outputs the string i listed above, somewhere thats not visible (you can see it in hex editing), so by copying and pasting the contents to a simple notepad doc and saving, all is good. and the reason i was seeing it on random parts of the page, is because each part was where a php file was included that i had edited in expression web.
gah, i feel dumb,
Posted: Fri Oct 26, 2007 11:18 pm
by mckooter
mrkite wrote:It looks like a BOM.
Check your text editor, see if it has an option to turn off UTF-8 Byte Order Marks.
of course you posted that while i was typing my response, thanks so much, i got it but its nice to know that people are willing to help when my issue obviously has absolutely nothing to do with php and i posed in the php code forums, it is much appreciated
Posted: Sat Oct 27, 2007 12:43 am
by Kieran Huggins
We're cool like that
Oh, and that'll be $27.50
Posted: Sat Oct 27, 2007 12:46 am
by mckooter
Kieran Huggins wrote:We're cool like that
Oh, and that'll be $27.50
checks in the mail, i just wrote "Kieran Huggins" on the envelope, i assume usps will be able to get that to you, good luck, if you have any problems recieving that just email mckooter@youtube/gmail.org/gov.com.list/info/bestmanever.com
thats definately my email
regardless, i appreciate it, even though i found the answer ive always found that if im really stuck, i can come here and someone can help, even though im quite new to php and ask stupid questions, you guys are helpful. and for that i give many thanks
Posted: Sat Oct 27, 2007 12:48 am
by Kieran Huggins
nice - reminds me of Creed's blog:
http://www.creedthoughts.gov.www\creedthoughts
Posted: Sat Oct 27, 2007 12:48 am
by mrkite
It's not a bad place to pose the question. I'm sure many others have seen those byte order marks show up in their own PHP scripts.
I've personally seen it happen with BBEdit output... luckily in BBEdit there's an option to save files without the byte order mark.