* fix bugs.

This commit is contained in:
wangyidong
2015-01-30 15:27:51 +08:00
parent 03dae63dd0
commit 4d7feceb69
5 changed files with 15 additions and 9 deletions
+3 -4
View File
@@ -348,12 +348,11 @@ class gitModel extends model
public function iconvComment($comment)
{
/* Get encodings. */
$encodings = str_replace(' ', '', trim($comment));
if($encodings == '') return $comment;
$encodings = explode(',', $encodings);
$encoding = str_replace(' ', '', $this->config->git->encodings);
if($encoding == '') return $comment;
/* Try convert. */
foreach($encodings as $encoding)
if($encoding != 'utf-8')
{
$result = @iconv($encoding, 'utf-8', $comment);
if($result) return $result;