When you create a column on a list or site column in SharePoint through the user interface you enter the column name, type and any other properties. The name is used for the internal name and display name. The internal name is escaped to remove any special characters and spaces. The table below displays the list of characters and their escaped version.
| Character | Hex Code | Escaped Version |
| [space] | 20 | _X0020_ |
| | | 7C | _X007C_ |
| - | 2D | _X002D_ |
| \ | 5C | _X005C_ |
| ( | 28 | _X0028_ |
| ) | 29 | _X0029_ |
| ' | 27 | _X0027_ |
| , | 2C | _X002C_ |
| ! | 21 | _X0021_ |
| % | 25 | _X0025_ |
| & | 26 | _X0026_ |
| ? | 3F | _X003F_ |
| $ | 24 | _X0024_ |
| £ | A3 | _X00A3_ |
| " | 22 | _X0022_ |
| < | 3C | _X003C_ |
| > | 3E | _X003E_ |
| = | 3D | _X003D_ |
| # | 23 | _X0023_ |
The following are examples of this escaping:
| Name entered | Escaped Version |
| Published Date | Published_X0020_Date |
| Buyer's Name | Buyer_X0027_s_X0020_Name |
| Zip / Postal Code | Zip_X0020__X002F__X0020_Postal_X0020_Code |
Please note: The internal name has a maximum length which is calculated after the internal name has been escaped.
There are a few way's to check the internal name, one of which is the through the User Interface, here's how:
1. Open a web browser.
2. If you have created a site column open the site column gallery, if you created a column on a list open the list settings.
3. Click on the column name.
4. Check the URL for the "field" querystring parameter, as you see from the screenshot below it contains the internal name.
Other ways include ...
using .NET
You can also find out the escaped version using the System.Xml namespace and the XmlConvert.EncodeName. For example:
using System.Xml;
// encode the column name
string escapedString = XmlConvert.EncodeName("Published Date");
// decode the escaped column name
string normalString = XmlConvert.DecodeName(escapedString);
which produces
escapedString = Published_X0020_Date
normalString = Published Date
Content Types Viewer
Download it here MOSS Content Types Viewer - Home
More about the Content Type Viewer http://www.davehunter.co.uk/Blog/Lists/Posts/Post.aspx?ID=100.
You can browse to the SharePoint environment, browse the content types and investigate the columns which are associated to the content type chosen, using the "show fields" button.
Controlling the internal name
You can control the internal names when you provision the site columns using a feature. You can also do this using the User Interface by creating a field without any spaces or special characters and then re-edit the column to change the display name with any characters you wish.
Hope this helps