Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Non-ASCII character logs and file names are garbled in the history view and changes view. #124

Closed
@shiena

Description

@shiena

history from https://github.com/unity3d-jp/piranhan

image

The reason is that Process::OutputDataReceived character-encodes with Encoding.Default, so the encoding output from the command does not match the encoding.

That is here.
https://github.com/Unity-Technologies/mono/blob/a449454f2128b2c0bb62d5ce3b8e22ab6b71db39/mcs/class/System/System.Diagnostics/Process.cs#L1424

call hierarchy

BeginOutputReadLine
-> ProcessAsyncReader
-> ProcessAsyncReader::AddInput
-> Encoding::Default::GetString

Since Process::StandardOutput::ReadLine uses Process::StartInfo::StandardOutputEncoding, combining git -c i18n.logoutputencoding=utf8 log and Encoding.UTF8 will not garbled. However, since this is a synchronization process, Unity freezes until the command is finished.

Also, I have submitted a pull request on Unity's problem.
Unity-Technologies/mono#582

For Encoding.Default,

  • Japanese Windows codepage is 932
  • OSX is the same as Encoding.ASCII

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions