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 #MATLAB仿真#车辆换道路径规划
    • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
    • ¥15 数据可视化Python
    • ¥15 要给毕业设计添加扫码登录的功能!!有偿
    • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
    • ¥15 微信公众号自制会员卡没有收款渠道啊
    • ¥100 Jenkins自动化部署—悬赏100元
    • ¥15 关于#python#的问题:求帮写python代码
    • ¥20 MATLAB画图图形出现上下震荡的线条
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘