Forum Moderators: phranque

Message Too Old, No Replies

Characters added to my files after upload

         

DaveLite

9:40 pm on Mar 24, 2009 (gmt 0)

10+ Year Member



I have just discovered characters in my files that I can not see while the files are on my machine.

The characters are: ""

I can not see them in Notepad++ or Notepad.

My FTP client is SmartFTP. I use EW to create the files.

This came to my attention after the characters started showing up on the front end through SSIs for my menu and footer of a site I am redesigning. After calling my host, they led me to the file manager of cPanel and I was able to see the characters do exist in my files and are not being added during parsing. This was the first time I used the cPanel file manager. I edited the characters out and the site looked good.

I explored the other files in my other sites using the file manager in cPanel and to my surprise, the characters are on the first line of all my files. The characters are to the left of my doc type of my main files and on the first line of my includes. If I download the files, NP++ and Notepad do now show the characters.

I use shared hosting with addon domains. The characters are not showing up on any other SSIs from the other domains and do not show up in the source code sent to browsers except for the site I'm redesigning.

I can remove the code in cPanel as a work around. I'm curious if there might be a program that would show the characters on my machine or some other hint as to where they are coming from and what I might be doing wrong.

I would hate to have to go to cPanel every time I upload a file to this site.

g1smd

9:42 pm on Mar 24, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Are you using UTF-something-or-other encoding?

That's the BOM (Byte Order Mark).

I found that what I thought was being saved as UTF-8 was really UTF-16-LE last time I saw something like that.

DaveLite

10:25 pm on Mar 24, 2009 (gmt 0)

10+ Year Member



g1smd,

Thank you for defining the characters for me. As I continue on with my investigation it will help me sound like I know what I'm talking about.

It is also being added to the text files that I am using as includes.

I guess I'd like to know why I can only see the BOM while the file is on the server.

g1smd

10:58 pm on Mar 24, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



'cus Wordpad, etc, know what to do with it, and other programs treat it as literal characters.

DaveLite

11:09 pm on Mar 24, 2009 (gmt 0)

10+ Year Member



Thank you for your replies.

You have allowed me to do further searching here and do a lot of reading.

Thank you, thank you, thank you