github / GitPad

Notepad.exe as Git commit editor
MIT License
187 stars 69 forks source link

Emit UTF-8 BOM for non-ascii environment. #11

Closed mayuki closed 11 years ago

mayuki commented 11 years ago

If using non-ASCII Windows environment(e.g Japanese), the commit log file will be open with "ANSI" codepage encoding in Notepad.exe or other text editors. But Git command expect UTF-8 encoding file only.

anaisbetts commented 11 years ago

Does git.exe correctly interpret the UTF-8 BOM? I would think that Git would get confused by its presence

mayuki commented 11 years ago

git.exe doesn't interpret BOM correctly. Therefore, it was changed to emit BOM only for a text editor.

for a text editor: https://github.com/github/GitPad/pull/11/files#L0R60 for git.exe: https://github.com/github/GitPad/pull/11/files#L0R86