Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

If I upload php files that are encoded in UTF-8, instead of ANSI, it creates problems with "headers already sent" on the server.

vi shows {feff} at the start and nano does not show the \ at the start. When I remove the {feff} manually in vi, it works fine. But after every new FTP upload, this is added again.

This also happens to .html and .ctp files, but so far never has been a problem.

share|improve this question
    
Have you tried uploading your files using the binary transfer type instead of the ASCII one? –  gekkz Sep 3 '12 at 14:39
    
Try uploading "good" files? ie files that don't begin with buggy characters (I saw some windows text editors who had bad behaviour). –  Eric DANNIELOU Sep 3 '12 at 14:46
add comment

1 Answer 1

up vote 1 down vote accepted

Instruct your editor to save UTF-8 files without a BOM.

share|improve this answer
    
Thanks, that was it! I already used to use "UTF-8" in notepad++. I have set notepad++ to use UTF-8 without a BOM. –  ujjain Sep 3 '12 at 14:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.