Skip to content

Commit

Permalink
Add UTF-8 to new ConfigFile - references #2003
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Nov 4, 2016
1 parent 1cb04a6 commit d1d06b7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Paket.Core/ConfigFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ let private rootElement = "configuration"
let private getConfigNode (nodeName : string) =
let rootNode =
let doc = XmlDocument ()

let xmldecl = doc.CreateXmlDeclaration("1.0",null,null)
xmldecl.Encoding <- "UTF-8"
xmldecl.Standalone <- "yes"

doc.InsertBefore(xmldecl, doc.DocumentElement) |> ignore

if File.Exists Constants.PaketConfigFile then
try
use f = File.OpenRead(Constants.PaketConfigFile)
Expand Down

0 comments on commit d1d06b7

Please sign in to comment.