skaffold
skaffold copied to clipboard
skaffold destroys umlauts
skaffold v2.13.2 on Windows 10 destroys umlauts that appear in the build log output. This happens for jib, maven and even for simple things like custom buildCommand command like
echo "Hallo Überschall"
which becomes
"Hallo �berschall"
The Google Cloud Code plugin in IntelliJ stops filling the console the moment it hits such a broken output line. So using skaffold through the Google Cloud Code plugin, you cannot see any build results or logs after the broken line.
I have not found a way to configure encoding for skaffold or fixing this problem in any other way.
The reason for the error is: The Windows cmd.exe is started and the output is written to an io.Writer without conversion from Windows encoding to UTF8.
One example is pkg/skaffold/build/custom/script.go in line 67:
if runtime.GOOS == "windows" {
cmd = exec.CommandContext(ctx, "cmd.exe", "/C", command)
} else {
cmd = exec.CommandContext(ctx, "sh", "-c", command)
}
cmd.Stdout = out
cmd.Stderr = out
Corrected for custom and jib builds in https://github.com/jfabianmeier/skaffold/tree/umlauts-9768