views:

177

answers:

1

Hello all,

I intend to create asp.net pages using Visual Studio 2008. Preferably, the pages should be fully compliant with XHTML standard. How should I include the diacritics into the page content (no need to use diacritics in URLs)? Should I use character references (the ones with "&"), or just writing them directly form the keyboard?

Thank you.

+1  A: 

You will need to ensure the correct character set encoding for the page, UTF-8 usually covers most western alphabets and UTF-16 for double byte characters required by languages that use ideograms.

In the HEAD element of the page you will need some form of the following tag;

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

You will also need to ensure you have the correct DOCTYPE specified;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

This is well covered by the W3C Character Sets Tutorial

Dave Anderson