Conversation
ekohl
left a comment
There was a problem hiding this comment.
In itself this looks like a reasonable change, but how is the user expected to use this? Are you using bump2version more as a library than as a CLI tool?
|
We are using bump2version as a CLI tool. If a file that is to be modified by bump2version has a non-utf8 encoding, then this has to be stated in the configuration file. E.g.: (That way, bump2version will not raise an exception if the file is latin1 encoded and there are, for example, german umlauts in the file.) |
|
Could you add that to the README? With that I think this should be ok to merge. Ideally it would also have a test. |
|
I've added documentation to the README and a test. |
|
The test should also verify that the file content is still intact in the correct encoding. I'll take a look. |
|
Hi 4hopp, I extended the test a bit. If you approve that merge in your branch (next time, create a separate feature branch for it!), then this can go in. |
Hi there,
please add encoding support for files to be modified. This feature is very important to us as we maintain many files that use to have latin1 encoding for legacy reasons.
(An alternative solution might be to read files with binary mode; I have not tested this, though, and there might be sideeffects in doing so.)
Cheers,
Joshua Hopp