Declaring the Language Encoding on Websites

Macintosh and Windows

Declaring the Language Encoding on Websites


word processing web encoding sending e-mail insert accent marks setting up a keyboard


Encoding Declarations
Tweaking Browsers to View Improperly Coded Sites

If you create a Web site, it is good practice to declare the encoding. Properly encoded Web pages declare the encoding to a browser through a meta tag in the header. Without this tag, a browser may not know to switch to the proper encoding and characters may be displayed as gibberish.

In most cases, you should use UTF-8 encoding for non-roman characters.

Use Dreamweaver MX to set encoding declarations:

  1. Open the webpage in Dreamweaver MX.
  2. Go to Modify > Page Properties.
  3. In the Document Encoding field, click the drop-down menu and select UTF-8 (Unicode). Click OK.

Manually set encoding declarations in your HTML script:

Copy and paste the following code into your HTML script

<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>

For more information on Web encodings, go to: http://tlt.its.psu.edu/suggestions/international/web/tips/declare.html.


Tweaking browsers to view improperly coded sites

If the website is non-Roman and no encoding is declared with the special meta tag, then you might see Roman alphabet gibberish instead of the foreign script. Follow the instructions below to fix the problem.

  1. Go to the View menu of your internet browser.
  2. Select Character Set/Encoding/Character Coding (depends on the browser).
  3. Choose UTF-8.

For more information on tweaking browsers, go to: http://tlt.its.psu.edu/suggestions/international/web/encoding/10messup.html.