She call me Mr BomBastic say me fantastic

Ok, so this post has nothing to do with shaggy and his 90’s hit, and yes its spelt wrong anyway. The point here is that certain web files for this site were saved using regular notepad on a windows machine, this wasn’t a problem until the latest update to the wordpress app for iphone, the problem in question is the BOM BOM BOM BOM. When the app tried to log into a self hosted wordpress blog an error would pop up saying “blog returned invalid data”. This was due to windows notepad adding the BOM byte code at the beginning of php and javascript files. There is also a warning on this when trying to validate using or at least there is when validating html 5.

Thanks to Brandon in the comments for pointing out there are also some plugins that have the same problem, the fix below should still work, but to cut some time and stress, he suggests to deactivate all plugins and add them back one at a time to locate which one(s) maybe causing the problem. Thanks Brandon.

The solution….

The simple work around i found was to use an ftp client like the free filezilla from to download any files that may have been saved in notepad when messing around with either the theme or the config file. Then use notepad++ another free app from to open the files and convert to utf-8 without BOM. This takes a little time though, but you should be able to drag a group of files or a folder onto notepad++ to open them all and then just go a tab at a time and go to encoding ->convert to utf-8 without BOM, then save it and move on. when finished, right click a tab and select “close all but me” to get rid of the 20 odd tabs you might have if you dragged the entire theme folder into notepad++. next step is to re upload the files to you server with filezilla. And that should be done and now working again, plus with the added bonus of 1 less warning on the validator page. 🙂

There is also a setting in the settings->preferences ->New Document/Default DIrectory tab that sets the default encoding type, and can be applied to opened ANSI files. Though it does not recognise this as a change enough to save straight away, so either typing something in and deleting it would be necessary to save as the new encoding type. As of yet i have not found a way to batch encode, even with macros. Sorry

As a last note. I should point out that notepad++ is an amazing text editor, especially for developers on a shoe string budget, or who find dreamweaver just to clunky when all that’s needed is a little tweak here and there to a file. It has support for recognising and colour highlighting all sorts of programming/scripting languages, run macros, and even use a spell checker for regular text documents (need to download dictionary first though). All this and more in a light weight application that doesn’t necessarily need to be installed, just unzip the file and start using, or even point files to the notepad++.exe application file as the default app for a file type. The zip file actually gives 2 directories for different version of the app, unicode and ansi. Ansi isn’t in the install version as this will eventually be dropped, so unicode is the version to go for.

This entry was posted in General, iPhone and iOs, lartens, PC, Quirks, Tech and tagged , , , , , , , , . Bookmark the permalink.

Recent Posts

8 Responses to She call me Mr BomBastic say me fantastic

  1. Pingback: WordPress für iOS Update: Blog returned invalid data | Niklas Rother – XNA, Computer & mehr

Leave a Reply

Your email address will not be published.