New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
shiena opened this Issue Jul 12, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@shiena
Contributor

shiena commented Jul 12, 2017

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

@StanleyGoldman StanleyGoldman added the bug label Jul 12, 2017

@StanleyGoldman

This comment has been minimized.

Show comment
Hide comment
@StanleyGoldman

StanleyGoldman Jul 12, 2017

Member

Thanks @shiena for such a thorough bug report

Member

StanleyGoldman commented Jul 12, 2017

Thanks @shiena for such a thorough bug report

@StanleyGoldman

This comment has been minimized.

Show comment
Hide comment
@StanleyGoldman

StanleyGoldman Jul 12, 2017

Member

I suspect this is the cause for #35

Member

StanleyGoldman commented Jul 12, 2017

I suspect this is the cause for #35

@shiena

This comment has been minimized.

Show comment
Hide comment
@shiena

shiena Jul 15, 2017

Contributor

I compared Unity 2017's Scripting Runtime Version .NET 3.5 with .NET 4.6.
.NET 3.5 is the same result as previous Unity, but .NET 4.6 is perfect!

https://gist.github.com/shiena/0dcd5e44197fcd4dc03efe67d6622ffc

image

Contributor

shiena commented Jul 15, 2017

I compared Unity 2017's Scripting Runtime Version .NET 3.5 with .NET 4.6.
.NET 3.5 is the same result as previous Unity, but .NET 4.6 is perfect!

https://gist.github.com/shiena/0dcd5e44197fcd4dc03efe67d6622ffc

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment