Try our conversational search powered by Generative AI!

Tobias Nilsson
Sep 22, 2011
  4278
(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
Anonymous Tracking Across Devices with Optimizely ODP

An article by Lead Integration Developer, Daniel Copping In this article, I’ll describe how you can use the Optimizely Data Platform (ODP) to...

Daniel Copping | Apr 30, 2024 | Syndicated blog

Optimizely Forms - How to add extra data automatically into submission

Some words about Optimizely Forms Optimizely Forms is a built-in add-on by Optimizely development team that enables to create forms dynamically via...

Binh Nguyen Thi | Apr 29, 2024

Azure AI Language – Extractive Summarisation in Optimizely CMS

In this article, I demonstrate how extractive summarisation, provided by the Azure AI Language platform, can be leveraged to produce a set of summa...

Anil Patel | Apr 26, 2024 | Syndicated blog

Optimizely Unit Testing Using CmsContentScaffolding Package

Introduction Unit tests shouldn't be created just for business logic, but also for the content and rules defined for content creation (available...

MilosR | Apr 26, 2024