azure-functions-core-tools
azure-functions-core-tools copied to clipboard
Console encoding might be limited to ASCII?
Version
4.0.7030
Description
It appears that console output when running locally is not displaying all characters correctly. It might be limited to ASCII.
Steps to reproduce
From a dotnet isolated app write a log with Japanese characters, IE:
logger.LogError("Test String: こんにちは");
Console output will not be correct:
Hi @liliankasem @jviau I’ve started investigating the issue and added a simple line in the Main() method of Program.cs:
Console.OutputEncoding = Encoding.UTF8;
This change works as expected in all worker runtimes except for .NET in-process. It appears that the encoding is being reset to the default or overridden after the host starts in this case.
When you have a moment, could you please provide your feedback or insights on whether enabling UTF-8 output support for .NET in-process requires a change or update from the Azure Functions host? Any guidance or suggestions would be greatly appreciated.
Thank you!