Try our conversational search powered by Generative AI!

Tobias Nilsson
Sep 22, 2011
  4312
(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
Integrating HubSpot CRM without the MA Connector

Have HubSpot CRM? Want to push user data into it from Optimizely? Don’t have any personalisation requirements with that data? Don’t want to pay $80...

Matt Pallatt | Jun 27, 2024

Keeping the website secure by updating external packages

Did you see the latest warning from Optimizely to update this package with a critical security warning? https://world.optimizely.com/documentation/...

Daniel Ovaska | Jun 27, 2024

Optimizely CMS image anonymization now available for Linux!

The famous image anonymization add-on for Optimizely CMS, with at least 5 downloads, is now finally available for use on Linux. Supports simultaneo...

Tomas Hensrud Gulla | Jun 25, 2024 | Syndicated blog

Remove a segment from the URL in CMS 12

Problem : I have created thousands of pages dynamically using schedule jobs with different templates (e.g. one column, two columns, etc..) and stor...

Sanjay Kumar | Jun 21, 2024