Currently if you regenerate a file that contains a multi-byte UTF-8 codepoint (such as €) the file will falsely be identified as having changed. This PR adds a test to the create_file_spec to identify the problem, and then fixes the problem.
The change is the same as in https://github.com/rails/thor/pull/656, but that PR seems to have languished unmerged for just over 3yrs. I'm hoping the testing approach in the PR will address the previous objections so that the change can be merged.
🌈
Currently if you regenerate a file that contains a multi-byte UTF-8 codepoint (such as €) the file will falsely be identified as having changed. This PR adds a test to the create_file_spec to identify the problem, and then fixes the problem.
The change is the same as in https://github.com/rails/thor/pull/656, but that PR seems to have languished unmerged for just over 3yrs. I'm hoping the testing approach in the PR will address the previous objections so that the change can be merged.