2017-07-15 27 views
0

如何从Excel工作表上传泰米尔信件,我使用<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">,并试图使用$ProductName = mb_convert_encoding($ProductName, "auto");,但信件显示为���� �����如何通过excel上传将泰米尔字母导入到mysql数据库中?

我正在使用excel_reader2.php导入Excel工作表。

请帮我解决这个问题的字体

+0

可以使用Unicode字体在Excel工作表。 –

回答

0

您应该设置UTF-8,你使用连接:

<?php 
$mysqli = new mysqli("localhost", "my_user", "my_password", "test"); 

/* check connection */ 
if (mysqli_connect_errno()) { 
    printf("Connect failed: %s\n", mysqli_connect_error()); 
    exit(); 
} 

printf("Initial character set: %s\n", $mysqli->character_set_name()); 

/* change character set to utf8 */ 
if (!$mysqli->set_charset("utf8")) { 
    printf("Error loading character set utf8: %s\n", $mysqli->error); 
    exit(); 
} else { 
    printf("Current character set: %s\n", $mysqli->character_set_name()); 
} 

$mysqli->close(); 
?> 

Refrence link (php.net)

+0

数据库接受不从Excel获取的泰米尔字体 – Madhan

相关问题