Re: specify charset for commits
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 22, 2006, 12:07 UTC
- Message-ID
- <Pine.LNX.4.63.0612220351520.19693@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <7vejqtaz7q.fsf@assigned-by-dhcp.cox.net>
Hi,
On Thu, 21 Dec 2006, Junio C Hamano wrote:
> (2) update commit-tree to reject non utf-8 log messages and > author/committer names when i18n.commitEncoding is _NOT_ > set, or set to utf-8.
The problem is: you cannot easily recognize if it is UTF8 or not, programatically. There is a good indicator _against_ UTF8, namely the first byte can _only_ be 0xxxxxxx, 110xxxxx, 1110xxxx, 11110xxx. But there is no _positive_ sign that it is UTF8. For example, many umlauts and other special modifications to letters, stay in the range 0x7f-0xff.
Ciao, Dscho