-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"-i" option doesn't adjust Unicode BOM #46
Comments
Thanks for the bug report, @belm0! Just to clarify, are you looking for the output to look as follows?
|
Yes, that's it. Thank you |
Thinking through this a little bit, I think this feature is complex enough to warrant a rewrite of I've also been thinking of adding a configuration mechanism (see issue #23) and that almost caused me to embed an inline Python code snippet into a shell script, which would be quite a hack, so I think this is helping make a stronger case that we should use a real programming language instead. |
@belm0 — I just came across a similar project: https://github.com/google/addlicense (which was released 2 years after Autogen) — I'm not sure if it already handles Unicode BOM correctly, but the tool is written in Go, so even if it doesn't, it should be easy to add this functionality there. |
When using "-i" option on a file having an existing Unicode BOM, the BOM appears to be left it place. autogen should insert the new text following the BOM.
Example diff after applying "autogen -i" follows. The string
<U+FEFF>
shows BOM location.The text was updated successfully, but these errors were encountered: