I am using WAMP 2.2 with oracle. I am loading an xsl content from the oracle table and loading it on a textarea
in a php page and allowing the user to edit and save this.
The problem is:
If that xsl contains any korean character, php doesn't show the data.
At other environments it shows the data but when we save that data, it stores the special characters as question marks so I am loosing the Korean characters.
I have checked UTF-8 and AL32UTF8 but I am poor in applying those techniques.
Could someone help me on this?
this is the code i am using
$db_charset = 'AL32UTF8';
$db = "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)";
$db .= "(HOST = ".$ini_array["DB_HOST"].")(PORT =
".$ini_array["DB_PORT"].")) )";
$db .= "(CONNECT_DATA = (SID = ".$ini_array["DB_SID"].") ) )";
$ds_conn = ocilogon("eres", "eres123", $db, $db_charset);
$query="some SQL query;
$results = executeOCIQuery($query,$ds_conn);
$status = sendmail("Random Confirm Letter",$html,$results["EMAIL_TO"][$row],$ini_array);
function sendmail($mail_subject,$mail_body, $mail_to,$ini_array){
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->IsHTML(true);
$mail->Host = $ini_array["SMTP_HOST"];
if ($ini_array["SMTP_AUTH"] == "YES") {
$mail->SMTPAuth = true;
$mail->Username = $ini_array["SMTP_USER"];
$mail->Password = $ini_array["SMTP_PWD"];
}
$mail->From = $ini_array["MAIL_FROM"];
$mail->FromName = $ini_array["MAIL_FROMNAME"];
$mail->AddAddress($ini_array["MAIL_ADMIN_EMAIL"],$ini_array["MAIL_ADMIN_NAME"]);
$mail->AddAddress($mail_to,$mail_to);
$mail->Subject = $mail_subject;
$mail->Body = $mail_body;
$mail->CharSet = $db_charset;
}
This script sends email with broken Korean characters. target computer has the nls character set as "AL32UTF8".