Reputation: 1
I have 1,000's of HTML files all with BOM at the beginning. When a page loads in the browser it displays chinese looking charecters.
My question - is there a way to remove BOM from the beginning of my html files using find and replace with regex in Dreamweaver?
If not, any other solutions would be great I just need the pages to display properly in a browser. At this point I am open to anything - including anything I could do with apache. Please keep in mind I am not a developer.
Upvotes: 0
Views: 2450
Reputation: 1986
I'm not sure if can do the find and replace within Dreamweaver but the expression to match the BOM character is \uFEFF
I have a gulp task which strips the characters. In JavaScript it's pretty easy to strip them from the string:
fileStr = fileStr.replace(/\uFEFF/g, '');
There is also also plugins for gulp that do this (as well as for Grunt). I'm not sure if that will work into your workflow or not.
Upvotes: 1