During my last projects I have been asked the same questions. The question was how can you get the normal name of a SharePoint field name that is encoded like this: Test_x0020_ Name.
The field names get encoded because XML elements names can’t contain spaces or other different characters. In the example above the x0020 represents the space and the _ represents a delimiter.
You can decode those SharePoint fields by using:
System.XML.XmlConvert.DecodeName("[Fieldname]") ;
You can encode fieldnames if you would like by using:
System.XML.XmlConvert.EncodeName("[FieldName]")
Hope this helps you when developing for SharePoint and remember when you have questions about Microsoft technology don’t be afraid to ask.
this not true. in sharepoint 2010 field name “RTM1” will be encoded to “_0x0052_TM1”.
Hi Tony,
As you can read in the post the x0020 I’m revering to in the post stands for the space.