Skip to content

useMavenLogger breaks nōn-ASCII characters (i.e. 99.9̅% of Unicode) #158

@mirabilos

Description

@mirabilos

I saw this in one of my scripts, but I reduced the script to just…

#!/bin/sh
echo mäh
exit 0

… for the reproduction of this.

$ mvn org.codehaus.mojo:exec-maven-plugin:exec@build-depsrcs@build-depsrcs -Dexec.useMavenLogger=false
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------< org.evolvis.tartools:csvfile >--------------------
[INFO] Building org.evolvis.tartools:csvfile 3.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:exec (build-depsrcs) @ csvfile ---
mäh
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.262 s
[INFO] Finished at: 2020-06-21T17:48:46+02:00
[INFO] ------------------------------------------------------------------------

… vs…

$ mvn org.codehaus.mojo:exec-maven-plugin:exec@build-depsrcs@build-depsrcs -Dexec.useMavenLogger=true
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< org.evolvis.tartools:csvfile >--------------------
[INFO] Building org.evolvis.tartools:csvfile 3.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- exec-maven-plugin:3.0.0:exec (build-depsrcs) @ csvfile ---
[INFO] [main] mᅢᄂh
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.685 s
[INFO] Finished at: 2020-06-21T17:49:00+02:00
[INFO] ------------------------------------------------------------------------

Watch it completely destroy the umlaut.

IMHO, the conversion between script output and string passed to the logger SHOULD use the locale encoding, and if that is not possible or ASCII, it MUST use UTF-8.

Cc @hankolerd

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions