* finish task#762

This commit is contained in:
areyou123456
2012-05-01 06:42:22 +00:00
parent e86ff7b0b4
commit 3fe2f334c1
7 changed files with 25 additions and 12 deletions
+3 -6
View File
@@ -117,18 +117,15 @@ class file extends control
$this->view->fields = $this->post->fields;
$this->view->rows = $this->post->rows;
$output = $this->parse('file', 'export2csv');
/* If the language is zh-cn, convert to gbk. */
$clientLang = $this->app->getClientLang();
if($clientLang == 'zh-cn')
if( $this->post->CodeType != "utf-8")
{
if(function_exists('mb_convert_encoding'))
{
$output = @mb_convert_encoding($output, 'gbk', 'utf-8');
$output = @mb_convert_encoding($output, $this->post->CodeType , 'utf-8');
}
elseif(function_exists('iconv'))
{
$output = @iconv('utf-8', 'gbk', $output);
$output = @iconv('utf-8', $this->post->CodeType, $output);
}
}