azure-functions-core-tools icon indicating copy to clipboard operation
azure-functions-core-tools copied to clipboard

Console encoding might be limited to ASCII?

Open jviau opened this issue 6 months ago • 1 comments

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:

Image

jviau avatar May 19 '25 22:05 jviau

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!

VineethReyya avatar Jun 30 '25 14:06 VineethReyya