Comments (4)
Thanks for the report. Clearly, there is a mismatch between the encoding of the file and the encoding the plugin is using. Could you please provide the following info to be able to tell if this is a bug or just a misconfiguration?
(1) What is the encoding of the file?
(2) Have you set the encoding at the Maven level for all files, via editorconfig.encoding
or project.build.sourceEncoding
property?
(3) Have you set charset
in any of the relevant .editorconfig
files?
from editorconfig-maven-plugin.
Hi!
(1) What is the encoding of the file?
- With linux
file -i
: text/plain; charset=iso-8859-1 - With Sublime Text 3: Western (Windows 1252) Unix
- With Eclipse: ISO-8859-1
- With Geany: ISO-8859-1
- With Notepadqq: UNIX / OX S ISO-8859-1
(2) Have you set the encoding at the Maven level for all files, via editorconfig.encoding or project.build.sourceEncoding property?
- My
pom.xml
contains<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- I did not set the
editorconfig.encoding
property (My maven command line was just as it is in the first post)
(3) Have you set charset in any of the relevant .editorconfig files?
Yes. Below is my .editorconfig
file (I only have one in the root directory of the app):
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[*.yml]
indent_size = 2
from editorconfig-maven-plugin.
Thanks, let me try to reproduce it.
from editorconfig-maven-plugin.
Yes, this is definitely a misconfiguration. You instruct the plugin to handle the file as UTF-8 but in reality the file is ISO-8859-1. It will work if you add something like the following to the bottom of your .editorconfig file:
[*.properties]
charset = iso-8859-1
from editorconfig-maven-plugin.
Related Issues (20)
- This project is not using .editorconfig
- No support for java files HOT 1
- insert_final_newline does not work
- Link to central.maven.org unreachable HOT 1
- 404 for maven goals on http://ec4j.github.io/editorconfig-maven-plugin/ HOT 3
- A pair has a key but not a value HOT 3
- Plugin not apply indent_style, indent_size to *.java files HOT 1
- Mark mojos as threadSafe HOT 2
- Links in the README broken after moving the linters to a separate git repo HOT 2
- Plugin doesn't respect .editorconfig sections HOT 2
- Empty files should pass with insert_final_newline = true HOT 3
- Ignore files in .gitignore HOT 6
- YAML Linter HOT 1
- Default excludes are lost if supplied excludes are null
- Wrong tab indentation with XML linter HOT 6
- Sometimes check goal fails during a Jenkins build HOT 1
- standalone XML files
- [Query] Editor Config Maven Plugin for Java HOT 1
- Disable the check for single mvn calls HOT 1
- DirectoryScanner missing on Maven 3.9.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from editorconfig-maven-plugin.