November Happy Hour will be moved to Thursday December 5th.

Tobias Nilsson
Sep 22, 2011
  5284
(0 votes)

Mapping a folder with non ascii characters with EPiServer's VPPs

Just a quick tips to you out there that aren't english or for some odd reason have folders that have non ascii characters in physical folder names, i.e. "c:\files\Földer". You might have tried to mapp it to a VPP before and got a error about non compatible characters in your episerver.config. It may look something like this:


System.TypeInitializationException: Ett undantagsfel uppstod för typinitieraren för EPiServer.DataFactory. ---> System.Configuration.ConfigurationErrorsException: Det finns ett ogiltigt tecken i den givna kodningen. Rad 19, position 180. (C:\EPiServer\Sites\World\episerver.config line 19) ---> System.Xml.XmlException: Det finns ett ogiltigt tecken i den givna kodningen. Rad 19, position 180.
vid System.Xml.XmlTextReaderImpl.Throw(Exception e)
vid System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
vid System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res)
vid System.Xml.XmlTextReaderImpl.InvalidCharRecovery(Int32& bytesCount, Int32& charsCount)
vid System.Xml.XmlTextReaderImpl.GetChars(Int32 maxCharsCount)
vid System.Xml.XmlTextReaderImpl.ReadData()
vid System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
vid System.Xml.XmlTextReaderImpl.ParseAttributes()
vid System.Xml.XmlTextReaderImpl.ParseElement()
vid System.Xml.XmlTextReaderImpl.ParseElementContent()
vid System.Xml.XmlTextReaderImpl.Read()
vid System.Xml.XmlTextReader.Read()
vid System.Configuration.XmlUtil.CopyXmlNode(XmlUtilWriter utilWriter)
vid System.Configuration.XmlUtil.CopyElement(XmlUtilWriter utilWriter)
vid System.Configuration.XmlUtil.CopySection()
vid System.Configuration.BaseConfigurationRecord.LoadConfigSource(String name, SectionXmlInfo sectionXmlInfo)
vid System.Configuration.BaseConfigurationRecord.GetSectionXmlReader(String[] keys, SectionInput input)
--- Slut på stackspårning för interna undantag ---
vid System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
vid System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
vid System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
vid System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
vid System.Configuration.Configuration.GetSection(String sectionName)
vid EPiServer.Configuration.EPiServerSection.get_Instance()
 vid EPiServer.DataFactory..cctor()

 

To get around this problem can encode your path so it reads c:\files\Földer and put that as your physicalPath in the VPP configuration (episerver.config). I used http://coderstoolbox.net/string/ for this.

OR like Peter Suneson figured out just resave the episerver.config as utf-8.

Sep 22, 2011

Comments

Fredrik Josefsson
Fredrik Josefsson Sep 23, 2011 09:48 AM

Nice folder name! Good to know btw, thanks :)

Please login to comment.
Latest blogs
Optimizely SaaS CMS + Coveo Search Page

Short on time but need a listing feature with filters, pagination, and sorting? Create a fully functional Coveo-powered search page driven by data...

Damian Smutek | Nov 21, 2024 | Syndicated blog

Optimizely SaaS CMS DAM Picker (Interim)

Simplify your Optimizely SaaS CMS workflow with the Interim DAM Picker Chrome extension. Seamlessly integrate your DAM system, streamlining asset...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Optimizely CMS Roadmap

Explore Optimizely CMS's latest roadmap, packed with developer-focused updates. From SaaS speed to Visual Builder enhancements, developer tooling...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Set Default Culture in Optimizely CMS 12

Take control over culture-specific operations like date and time formatting.

Tomas Hensrud Gulla | Nov 15, 2024 | Syndicated blog

I'm running Optimizely CMS on .NET 9!

It works 🎉

Tomas Hensrud Gulla | Nov 12, 2024 | Syndicated blog

Recraft's image generation with AI-Assistant for Optimizely

Recraft V3 model is outperforming all other models in the image generation space and we are happy to share: Recraft's new model is now available fo...

Luc Gosso (MVP) | Nov 8, 2024 | Syndicated blog