German Umlaute not supported using Log Messages

Hi,

when using a custom log message with German Umlaute, these don’t get handled correctly.

For example a C# console app which writes to the console:
Console.WriteLine($“Test: AE=Ä ae=ä OE=Ö oe=ö UE=Ü ue=Ü ss=ß”);

is being logged by Continua using the Log Output option:
Test: AE=Ž ae=„ OE=™ oe=” UE=š ue=š ss=á

This bug affects custom log messages as well.

Thomas

Hi Thomas,

What code page does the console use on your agent? Type chcp into a Command Prompt to find out.

Can you try running the following in your c# console app and let us know the output?

Console.WriteLine("Default output encoding code page: " + Console.OutputEncoding.CodePage);
Console.WriteLine("================");
Console.WriteLine("Test: AE = Ä ae = ä OE = Ö oe = ö UE = Ü ue = Ü ss = ß");
Console.WriteLine();

Console.OutputEncoding = Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.OEMCodePage);
Console.WriteLine("OEM code page: " + CultureInfo.CurrentCulture.TextInfo.OEMCodePage);
Console.WriteLine("=============");
Console.WriteLine("Test: AE = Ä ae = ä OE = Ö oe = ö UE = Ü ue = Ü ss = ß");
Console.WriteLine();

Console.OutputEncoding = Encoding.GetEncoding(850);
Console.WriteLine("Code page 850");
Console.WriteLine("=============");
Console.WriteLine("Test: AE = Ä ae = ä OE = Ö oe = ö UE = Ü ue = Ü ss = ß");
Console.WriteLine();

Console.OutputEncoding = Encoding.GetEncoding(1252);
Console.WriteLine("Code page 1252");
Console.WriteLine("=============");
Console.WriteLine("Test: AE = Ä ae = ä OE = Ö oe = ö UE = Ü ue = Ü ss = ß");
Console.WriteLine();

Console.OutputEncoding = Encoding.UTF8;
Console.WriteLine("UTF8 encoding");
Console.WriteLine("================");
Console.WriteLine("Test: AE = Ä ae = ä OE = Ö oe = ö UE = Ü ue = Ü ss = ß");
Console.WriteLine();

Hi Dave,

the result of chcp is 850.

The output of a c# console app running under control of Continua on our buildserver (running Win7 Pro German) is:

Default output encoding code page: 850

Test: AE = Ž ae = „ OE = ™ oe = ” UE = š ue = š ss = á

OEM code page: 850

Test: AE = Ž ae = „ OE = ™ oe = ” UE = š ue = š ss = á

Code page 850

Test: AE = Ž ae = „ OE = ™ oe = ” UE = š ue = š ss = á

Code page 1252

Test: AE = Ä ae = ä OE = Ö oe = ö UE = Ü ue = Ü ss = ß

UTF8 encoding

Test: AE = Ä ae = ä OE = Ö oe = ö UE = Ü ue = Ü ss = ß

Note

Running the same consoleapp on my Win10 german system will produce correct results, also using chcp=850.

Hi Thomas,

Did you run chcp on the agent or build server? From the output, it looks like the default standard output encoding code page while running processes on your agent is 1252.

We’ll look into this a bit further. It may be necessary to provide an option to set the process.StartInfo.StandardOutputEncoding for each action.

For now, can you add the line Console.OutputEncoding = Encoding.GetEncoding(1252); to your code before writing out your custom log messages?

In our configuration the server and the agent runs on the same machine.

Why do you think so? Running ‘chcp’ returns 850.

Ok, i’ll tell my buddy.

because setting the console output encoding to 1252 produced the correct output

Hi Dave,

we changed our tool to set the codepage as suggested. The output works fine now. No need to fix/enhance Continua at this point. Thanks for your help.

Thomas

Hi Dave,

as reported the results look fine, when we call our tool by ContinuaCI. Now we have integrated the tool to FinalBuilder as well. Now there’s the opposite effect. Umlaute are broken. Looks like we actually need the enhancement you suggested, to have both tools run correctly.

Thomas

Hi Thomas,

We’re looking into this and will possibly make some changes next week.

Hi Dave,

we changed our tool to support configuration of it. The default is not to change the codepage, which will give correct results when using FinalBuilder. When using Continua we pass an argument to assign the requested codepage, which works fine for us.

Thomas

1 Like

We have added action settings and agent properties to control the process encoding in version 1.9.1.336