Skip to content

skaffold destroys umlauts #9768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jfabianmeier opened this issue Mar 27, 2025 · 3 comments
Open

skaffold destroys umlauts #9768

jfabianmeier opened this issue Mar 27, 2025 · 3 comments

Comments

@jfabianmeier
Copy link

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.

@jfabianmeier
Copy link
Author

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

@jfabianmeier
Copy link
Author

Corrected for custom and jib builds in https://github.com/jfabianmeier/skaffold/tree/umlauts-9768

@Rungphet777
Copy link

[email protected]

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

No branches or pull requests

2 participants