godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.74k stars 20.85k forks source link

Log chinese error. #93882

Closed CsloudX closed 2 months ago

CsloudX commented 3 months ago

Tested versions

v4.3.dev6.mono.official [89850d553]

System information

Godot v4.3.dev6.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 5GB (NVIDIA; 31.0.15.3623) - AMD Ryzen 9 3900X 12-Core Processor (24 Threads)

Issue description

image when print chinese, the output window was ok, but the godot.log was error.

Steps to reproduce

run the MRP

Minimal reproduction project (MRP)

logtest.zip

AThousandShips commented 3 months ago

Please try with beta2, you are two months behind and several improvements have been made since then

alvinhochun commented 3 months ago

Just an observation, the UTF-8 code units of "中文测试" is E4 B8 AD E6 96 87 E6 B5 8B E8 AF 95, which when misinterpreted as Latin-1 is exactly 中文测试.

AThousandShips commented 3 months ago

This might very easily be a windows error with notepad just reading it wrong indeed, the console log doesn't have BOM added afaik

alvinhochun commented 2 months ago

I just tested and I can confirm that Godot is writing the UTF-8 code units of 中��� to the log file itself. So it is not an issue with the text editor used but actually some erroneous encoding conversion inside Godot.