This isn't really a PHP question but I couldn't find the right place for it.

I'm getting these strange characters -  - in my source code before the Doctype tag.

I've encountered this before when working in Notepad++ using ANSI as UTF-8 or similar formats with BOM for encoding. Usually converting the files to UTF-8 solves the problem but it isn't this time.

I've even gone so far as to open all the files in gEdit on a Linux box and save them as UTF-8 and Linux end of line but to no avail. That garbage keeps showing up in my Linux or Windows development environments.

Any other ideas would be most welcome.

May be tabs or new line CR or/and LF. Make sure you have delete all data before Doctype tag.

Its possible in some converting between different encoding formats to get any specific characters bugged forever.

Member Avatar for diafol

have you tried creating a new file, pasting the revelant code into it and saving as UTF-8 WITHOUT BOM?

Thanks for all your suggestions. It took copying and pasting the files into new docs in gedit to wipe out the problem, whatever it was. Nothing showed up in the new docs that may have been hidden in the old.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.