Hiteshsai007 commented on PR #12260: URL: https://github.com/apache/maven/pull/12260#issuecomment-4717044202
> Does UTF-8 care for endianness? How and why did BOM appear in your UTF-8 text file? No, UTF-8 doesn't care about endianness at all. The BOM showed up because a lot of standard Windows tools (like Notepad or default PowerShell redirections) silently prepend the UTF-8 BOM to distinguish the file from legacy ANSI encoding. If a Windows user creates or edits their `.mvn/jvm.config` with one of these tools, the BOM gets inserted automatically. Since our parser wasn't stripping it, that invisible `\uFEFF` character was being passed straight to the JVM launcher (e.g., `\uFEFF-Dprop=val`), causing the JVM to reject the argument. Stripping it just makes Maven resilient against files saved by default Windows text editors. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
