Fix #4559: don't use multibytes to read hash.

Reference to http://sourceforge.net/p/phpmyadmin/bugs/4559/
Improve read of git hash.