From a66d98b871bea3667c507be7f73e9e2f3b662dd8 Mon Sep 17 00:00:00 2001 From: nosami Date: Fri, 7 Oct 2016 22:06:42 +0100 Subject: [PATCH] Fix FAKE Chinese text bug See https://github.com/fsharp/FAKE/issues/1196, https://github.com/fsharp/FAKE/pull/1212, https://github.com/fsharp/FAKE/pull/1213 & https://github.com/fsharp/FAKE/pull/1194 Not sure of the ramifications of this change, but this fixes the encoding issues in FAKE for me. l.Head.Encoding was `System.IO.StringWriter(new System.Text.StringBuilder()).Encoding` which evaluates to utf-16 /cc:@forki --- src/source/Yaaf.FSharp.Scripting/YaafFSharpScripting.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/source/Yaaf.FSharp.Scripting/YaafFSharpScripting.fs b/src/source/Yaaf.FSharp.Scripting/YaafFSharpScripting.fs index 2cda3ea..506f951 100644 --- a/src/source/Yaaf.FSharp.Scripting/YaafFSharpScripting.fs +++ b/src/source/Yaaf.FSharp.Scripting/YaafFSharpScripting.fs @@ -1180,7 +1180,7 @@ module internal Helper = override __.Dispose (r) = base.Dispose r if r then doAll (fun t -> t.Dispose()) - override __.Encoding = l.Head.Encoding + override __.Encoding = Encoding.UTF8 static member Create l = new CombineTextWriter (l) :> TextWriter type OutStreamHelper (saveGlobal, liveOutWriter : _ option, liveFsiWriter : _ option) = let globalFsiOut = new StringBuilder()