Tobias Nilsson
Sep 22, 2011
  4385
(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
Change texts in TinyMCE, inside Optimizely CMS 12

Not happy with some of the default texts in TinyMCE? Don't worry, simply update them.

Tomas Hensrud Gulla | Oct 16, 2024 | Syndicated blog

Headless with Content Delivery API

Hello Everyone, This blog will help anyone who wants to start or build an architecture of headless using content delivery api. When we shifted to...

PuneetGarg | Oct 15, 2024

Introducing Optimizely Graph Source .NET SDK

Overview Of Optimizely Graph Optimizely Graph is a cutting-edge, headless content management solution designed to integrate seamlessly with any...

Jake Minard | Oct 15, 2024

SEO redirects in .NET + Optimizely

Nice and easy way to add necessary SEO redirects

Damian Smutek | Oct 14, 2024 | Syndicated blog

Multiple Anonymous Carts created from external Head front fetching custom Api

Scenario and Problem Working in a custom headless architecture where a NextJs application hosted in Vercel consumes a custom API built in a...

David Ortiz | Oct 11, 2024

Content Search with Optimizely Graph

Optimizely Graph lets you fetch content and sync data from other Optimizely products. For content search, this lets you create custom search tools...

Dileep D | Oct 9, 2024 | Syndicated blog