Add or Remove Byte order marks (BOM) in Microsoft Expression Web 2

A Byte Order Mask (BOM) is a sequence of reserved bytes embedded in some documents that use the Unicode encoding like UTF-8 and other Unicode Transport Formats (UTFs). These bytes are interpreted differently depending on the machines, viz. “big-endian” like Sun and Apple or “little-endian” like Windows and many Linux machines. BOM specifies the byte order as well as the type of UTF encoding used in the document. It makes sure that an encoded document is correctly read and interpreted by all the browsers and environments. UTF-8 standard is the most commonly used encoding, is same for big-endian and little-endian machines; hence a BOM is not required for UTF-8 files.

Microsoft Expression Web adds a BOM to all the new documents created that are encoded as UTF-8 or UTF-16, by default. However Expression Web enables you to add or remove a BOM to and from an existing document. PHP pages do not support BOM; hence do not use it with them.

To add or remove BOM from new documents

  1. From ‘Tools’ menu choose ‘Page Editor Options’.
  2. In ‘Page Editor Options’ window, switch to the ‘Authoring’ tab.
  3. Then under the New Document section, under the ‘Add a byte order mark (BOM)’ to new UTF-8 documents with these file extensions, uncheck the box next to each file extension you do not want  a BOM.

 pg_ed_opt 

To add or remove BOM from existing documents

  1. Open the web page.
  2. Do either of the following:
  • In ‘File’menu and click ‘Properties…’
  • In ‘Format’ menu and choose ‘Properties…;
  • Or in the ‘Code view’ right click anywhere in the page and then click  ‘Encoding’.

      3.    In the Page Properties dialog box, in the Language tab, check or uncheck the ‘Include a byte order mark (BOM)’ box.

pg_prop

Filed Under: Expression Web

Tags:

About the Author: Minal is a freelance web and graphics designer. She specializes in designing Logos, Stationery, Graphics and Icons as well as website templates using graphical tools like Photoshop, Illustrator and Expression Web. Twitter @saffronstroke

RSSComments (5)

Leave a Reply | Trackback URL

  1. Daniel says:

    I have gone to three different sites before this. One even being microsoft’s. You are the only one able to give the correct way to fix the problem; thanks!

  2. Megan Thomas says:

    Thank you. A great tip which came in handy when modifying a html file to include some php code and gets renamed to the php extension. Solved the constant header messages I was seeing.

  3. Mike says:

    Hi,

    Do you know why Expression Web removes the BOM after a search and replace?

    If I open a document and save it with EW, everything’s fine. But if I edit several files with a search and replace, they all lose the BOM and don’t render accentued characters properly. I then have to manually add the missing BOM in the properties for each files which is quite tedious.

    I browsed through all the options but failed to see where this can be corrected. Would you have any suggestions ?

Leave a Reply