I have a problem with uploading special characters from excel files to
mysql 5. It doesn't matter if I use UTF-8 or iso-8859-1 when uploading
the trademark ™ symbol. htmlspecialchar s() or htmletities() doesn't
help? the database doesn't show the data in the field but replaces it
with the binary/Image information.
the following are examples of how I've tried loading the data along
with UTF-8 or iso-8859-1:
foreach ($SelectFields as $TempSelect) {
if($SelectedFie ldValues[$TempSelect] == ''){
$strSQLQuery .= "'',";
} else {
$strSQLQuery .=
"'".htmlentitie s(addslashes($S electedFieldVal ues[$TempSelect]))."',";
}
}
or
foreach ($SelectFields as $TempSelect) {
if($SelectedFie ldValues[$TempSelect] == ''){
$strSQLQuery .= "'',";
} else {
$strSQLQuery .=
"'".htmlentitie s($SelectedFiel dValues[$TempSelect])."',";
}
}
or
foreach ($SelectFields as $TempSelect) {
if($SelectedFie ldValues[$TempSelect] == ''){
$strSQLQuery .= "'',";
} else {
$strSQLQuery .=
"'".htmlspecial chars(addslashe s($SelectedFiel dValues[$TempSelect]))."',";
}
}
or
foreach ($SelectFields as $TempSelect) {
if($SelectedFie ldValues[$TempSelect] == ''){
$strSQLQuery .= "'',";
} else {
$strSQLQuery .=
"'".htmlspecial chars($Selected FieldValues[$TempSelect])."',";
}
}