Skip to content

Use correct file encoding when analyzing files#237

Merged
amitdev merged 2 commits intoamitdev:masterfrom
adangel:use-correct-file-encoding
May 24, 2025
Merged

Use correct file encoding when analyzing files#237
amitdev merged 2 commits intoamitdev:masterfrom
adangel:use-correct-file-encoding

Conversation

@adangel
Copy link
Contributor

@adangel adangel commented May 22, 2025

  • Use IntelliJ's VirtualFile until PMD is called
  • Set charset before adding file to PMD

If the charset is not explicitly set, then the platform default charset will be used.
This problem might appear e.g. under Windows, where the default charset is in Germany still Cp1252. But the Java source files might be encoded in UTF-8.

adangel and others added 2 commits May 22, 2025 18:06
- Use IntelliJ's VirtualFile until PMD is called
- Set charset before adding file to PMD
@amitdev amitdev merged commit 10769f5 into amitdev:master May 24, 2025
4 checks passed
@adangel adangel deleted the use-correct-file-encoding branch May 29, 2025 10:30
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

Successfully merging this pull request may close these issues.

2 participants