Permalink
Browse files

Generator: pass Generator.Encoding to SW ctor

It seems that overriding StreamWriter.Encoding
does absolutely nothing. Instead pass
Generator.Encoding to
StreamWriter(Stream, Encoding), which does
actually write the bytes in the desired
encoding.

Fixes iOS .strings files (should have been
UTF-16LE, not UTF8).
  • Loading branch information...
1 parent 877da47 commit 15e769b26775faafe8a585419f57e5e8bf6b0a7a @abock abock committed Jul 12, 2012
Showing with 1 addition and 7 deletions.
  1. +1 −7 Vernacular.Tool/Vernacular.Generators/Generator.cs
@@ -76,15 +76,9 @@ public static Generator GetGeneratorForName (string name)
protected sealed class GeneratorWriter : StreamWriter
{
- private Encoding encoding;
- public override Encoding Encoding {
- get { return encoding; }
- }
-
public GeneratorWriter (Stream stream, Encoding encoding)
- : base (stream)
+ : base (stream, encoding)
{
- this.encoding = encoding;
NewLine = "\n";
}
}

0 comments on commit 15e769b

Please sign in to comment.