Skip to content
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

Encoding check fails when enforcing UTF-8 and the file is us-ascii #48

Closed
bjornpalmqvist opened this issue Mar 26, 2018 · 6 comments
Closed
Milestone

Comments

@bjornpalmqvist
Copy link

The requireEncoding check fails when guessing on a file that is us-ascii and we like it to enforce UTF-8. The requireEncoding guesses ISO-8859-1 instead. We are running linux with locale se_SV.utf8.

bjornpalmqvist added a commit to bjornpalmqvist/extra-enforcer-rules that referenced this issue Mar 26, 2018
@bjornpalmqvist bjornpalmqvist changed the title Encoding check fails when enforsing UTF-8 and the file is us-ascii Encoding check fails when enforcing UTF-8 and the file is us-ascii Mar 26, 2018
@bjornpalmqvist
Copy link
Author

What type of encoding's are desirable to be detected? It's hard to detect the difference between ISO-8859-1 and ISO-8859-2. But to say that this i probably in the ISO-8859 family is easier. What encoding's do you need to be able to enforce? If I get some examples, I could change the implementation to try to detect them as well.

@khmarbaise
Copy link
Member

If you like to make a contribution please do not change formatting of the code...otherwise it's more or less impossible to understand the change...

@bjornpalmqvist
Copy link
Author

Oh, sorry about that, do you have your formatting rules documented or as an eclipse formatter rule file?

bjornpalmqvist added a commit to bjornpalmqvist/extra-enforcer-rules that referenced this issue May 31, 2018
@bjornpalmqvist
Copy link
Author

bjornpalmqvist commented May 31, 2018

I believe I got the formatting correct now.

@bjornpalmqvist
Copy link
Author

Have you looked at the new pull request? Is that something that you think could be useful for solving this issue? Please let me know if there is something that I could do to make it better.

mfriedenhagen pushed a commit that referenced this issue Mar 15, 2020
@mfriedenhagen mfriedenhagen added this to the 1.3 milestone Jun 26, 2020
@mfriedenhagen
Copy link
Member

Looks to me your code was merged by me with 52017dd (you are of course still mentioned as author) so I close this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants