use StringBuilder for consistent line endings
Merge remote-tracking branch 'upstream/master'
Merge branch 'master' into portable