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
- From ‘Tools’ menu choose ‘Page Editor Options’.
- In ‘Page Editor Options’ window, switch to the ‘Authoring’ tab.
- 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.
To add or remove BOM from existing documents
- Open the web page.
- 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.
Filed Under: Expression Web
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