Skip to content

Ability to set the output encoding, or disable byte-order-marker in output? #132

@gaskep

Description

@gaskep

I'm using NTypewriter to generate strongly typed model .ts files for the C# models in my project. It works great!

After building, however, I'll commonly get an error while viewing the web app in Chrome. The error will be unexpected character, and it'll point to the first line in a file in the sources area.

I eventually twigged to the problem - if the file begins with a byte-order marker then it'll more often than not fail at some point. I removed all the byte order markers from the generated files by hand, recompiled (using webpack) and re-ran the application. No more problems! So I'm wondering if we can get either a property on config to specify the output encoding, or an argument to pass to Save that allows the encoding to be set? Or perhaps even a config setting that can be used to disable the byte-order marker.

Cheers,
-pg

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions