cenotelie / hime

Apache License 2.0
27 stars 4 forks source link

Do not emit BOM for Hime outputs #55

Closed woutersl closed 6 years ago

woutersl commented 6 years ago

Original report by Laurent Wouters (Bitbucket: 557058:675792b6-d731-4823-9f7d-c6dfcb2df2b5, ).


A BOM can be emitted at the beginning of the text artifacts produced by Hime. This may be a problem for artifacts consumed by tools such as graphviz dot. The BOM is emitted in cases as explained in: System.IO.StreamWriter.

For example when a constructor like this is used:

new StreamWriter(file, false, Encoding.UTF8)

This should be replaced by the use of UTF8Encoding instance without the BOM.

woutersl commented 6 years ago

Original comment by Laurent Wouters (Bitbucket: 557058:675792b6-d731-4823-9f7d-c6dfcb2df2b5, ).


Verified

woutersl commented 6 years ago

Original comment by Laurent Wouters (Bitbucket: 557058:675792b6-d731-4823-9f7d-c6dfcb2df2b5, ).


[fix] Fixed issue #55 Do not emit BOM for Hime outputs