doufu8887 2014-11-19 10:33
浏览 32

用oracle在wamp2.2上破解韩文字符

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".

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 R语言Rstudio突然无法启动
    • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
    • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
    • ¥15 用windows做服务的同志有吗
    • ¥60 求一个简单的网页(标签-安全|关键词-上传)
    • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值