php weird characters showing up on outputted data

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mckooter
Forum Commoner
Posts: 26
Joined: Fri Jul 28, 2006 10:02 pm

php weird characters showing up on outputted data

Post 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)

Code: Select all


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
mrkite
Forum Contributor
Posts: 104
Joined: Tue Sep 11, 2007 4:19 am

Post 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.
mckooter
Forum Commoner
Posts: 26
Joined: Fri Jul 28, 2006 10:02 pm

Post 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,
mckooter
Forum Commoner
Posts: 26
Joined: Fri Jul 28, 2006 10:02 pm

Post 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
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

We're cool like that 8)

Oh, and that'll be $27.50
mckooter
Forum Commoner
Posts: 26
Joined: Fri Jul 28, 2006 10:02 pm

Post by mckooter »

Kieran Huggins wrote:We're cool like that 8)

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
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

nice - reminds me of Creed's blog:

http://www.creedthoughts.gov.www\creedthoughts
mrkite
Forum Contributor
Posts: 104
Joined: Tue Sep 11, 2007 4:19 am

Post 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.
Post Reply