Page Editor Options - Authoring Tab
Define your Default HTML File Extensions and read about if you should ban the BOM or not.
Part 6 - Setting up Expression Web - Page Editor Options - Authoring Tab
Applies to Expression Web 2.0 & 3.0 Only New
Choose the default type of new documents and the default file extension of new HTML documents
(Click thumbnail to enlarge)
Expression 1.0, EW 2.0 & EW 30 were built with the adoption of the UTF-8 Character Set as the default which is the recommendation of the W3C, who define Internet standards.
UTF-8 Character Set (Charset) example - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />HOWEVER at this time not all applications and servers can handle UTF-8, in particular those that handle php documents and that includes the W3C validator too.
What are charsets, character sets or character encoding?
"Conventionally character set and character encoding were considered synonymous, as the same standard would specify both what characters were available and how they were to be encoded into a stream of code units. For historical reasons, MIME and systems based on it use the term charset to refer to the complete system for encoding a sequence of characters into a sequence of octets." Ref: Simple Character Sets
Character sets are are used to identify the encoding of a file and using the UTF-8 charset (8-bit Unicode Transformation Format) when it is not supported can cause characters such as ï«¿. to appear in your documents and might also create other issues, the characters are called a Byte-Order Mark (BOM).
In Expression Web 1.0 a BOM was included by default when any file was created and there was no way natively other than opening a file in a text editor to remove them. With the exception of the .css file where upon you can use the encoding selection on the right click menu to open the 'Encoding Text File' dialog box in a .css file to select or unselect your encoding.
Though you can't remove the BOM natively within Expression Web 1.0, Steve Easton has developed a method of Banning the BOM and Christoph Schneegans has written a VBA macro which can be run in EW 1.0. Make sure you back up your website before using either method.
However in Expression 2.0 & 3.0 settings are provided on the Authoring Tab so you can enable or disable the BOM at will in other file extensions pages (see listed below).'
Add a byte order mark (BOM) when creating or renaming UTF-8 documents with these file extensions in Expression Web 2.0 or 3.0
- .htm
- .html
- .css
- .dwt
- .js
- .php
- .txt
- .xml
Recommended setting for the byte order mark in Expression Web 2.0 & 3.0 for new documents
By default all settings are ticked except the PHP extension un-tick in particular the following: .htm .html .css .dwt .php, only retick when needed.
So unless you understand how to deal will UTF-8, in most cases I recommend using the character set below for your individual pages.
<meta http-equiv="Content-Type" content="text/html; charset=iso- 8859-1" />
Add or Remove the BOM from existing individual pages
Fig 2 - Language Tab - Encoding (click thumbnail to enlarge)
You can access the 'Language' Tab on the 'Page Properties' dialog box either by:
- Right click in Design View and choose Page Properties - Language Tab
- Go to File - Properties - Language Tab
- Right click in Code View and click Encoding
I recommend the last option as it will take you right to the 'Language' Tab without having to select it
In the 'Language' Tab select or clear ' Include a byte order mark (BOM)'
NOTE: The option' Include a byte order mark (BOM)' is not available if 'Save the document as:' is not set to Unicode (UTF-8).
Set the default encoding of the site character set
Fig 3 - Site Settings - Language Tab (click to enlarge)
Fig 4 - Site Settings - Advanced Tab (click to enlarge)
The Default Encoding on the 'Language' Tab in the Site - Site Settings dialog box for the Site character set is established as UTF-8
To change the encoding select the down arrow next to the Default Page Encoding and choose the charset you want.
NOTE: If you change the encoding to another charset, when publishing to some servers you may get the following error message
Fig 5 - Character Set Error Message
"The character set 'iso-8859-1' for the source web site 'example site' is not supported on the destination web server 'http://example-site.com/'. No files were published. To change the character set for the current open Web site, choose Site Settings on the Site menu."
It might be easier for blank new pages to carry the encoding you want to reset the default encoding of the site character set, then when you have finished making the site to change the setting back to UTF-8, if your server like mine throws up this error. I usually use dwts and have the character already set to iso-8859-1 within the template, so for me this method is usually not needed.
PHP Includes with menus in Expression Web 1.0
In Expression Web 1.0 PHP Includes are not incorporated natively within the program, coupled with the BOM problem this can be a bit of a quandary to say the least. However one method to get around this is to use the extension .inc instead of .php, this is not recommended and is very unsafe when your files are to do with databases where passwords and strings might be used, as it will display your coding. If a .php extension is used then the server will run the script and only the output will be seen, so .inc should only be used for simple innocuous files like menus, that must been seen anyway.
How to make a .inc file
Go to File - New - Page - Text File
File - Save As - Where it says 'Save as Type' Select 'All Files' and save
Fig 6- Text File Encoding (click to enlarge)
To access the Language Tab within a .inc file, right click and choose Encoding and the 'Text File Encoding' dialog will appear, whereupon you can unselect the BOM.
Default HTML File Extension
By selecting either .html or .htm you can set the default html file extension for newly made pages. Check which one your host uses if you are not sure which one to choose.
NOTE: If you have this setting on .htm when you select and make a Site from one of the generic Expression Web Site Templates you will see as if by magic the homepage file name change to default.html from index.html, this is a little known bug. If you have it set to .html then your homepage extension will remain index.html. Of course you can rename your homepage file to whatever your host requires by right clicking on the selected link in Folder List View (EW 3.0 - Panels - Folder List or Alt + F1) and choosing Rename.
Doctype and Secondary Schema
The default settings are:
- Document Type Declaration - XHTML 1.0 Transitional
- Secondary Schema - Internet Explorer 7.0 (EW 3.0 - Internet Explorer 8.0
- CSS Schema: - CSS 2.1
I recommend you keep these unless you are NOT using XHTML.Though the selection of the browser version depends on weather you have downloaded IE8.0 yet or not, this is something you should change when you start designing and using IE8.0.
Resources for Character Set and BOM
- Unicode Org
- Character set and page issues by Cheryl Wise. Microsoft MVP - Expression Web
- Banning the BOM by Steve Eason Microsoft MVP - Expression Web
- VBA Macro - Remove the BOM- By Christoph Schneegans. Microsoft MVP - Expression Web
- Character sets
- Simple Character Sets
Now Available: NEW: Free Expression Web Community Toolbar - Free Twibbon - New Free DWT
Cheshire Web Designs - Cheshire website Designs by Any Expression Web Designs
Owner Any Expression Web Designs and Clarke Abstract Art
Copyright © 2006 - 2010 Tina Clarke of Any Expression Web Designs All Rights Reserved
Are you looking for a Web Designer?Web Designs created by Any Expression Web Designs






