douyong5825 2014-05-21 05:05
浏览 87

ADODB + php不会在Oracle中存储西班牙语字符

I am using Spanish characters in my application. Currently I am storing Spanish accents like this in to database

 é í ó útestestet 

If I am using query from database like this

UPDATE indi_cmi_unidad
    SET 
        nombre='Oscar:Oscar: Oscar:    é í ó ú',
        factor='0',
        indi_unidad_base='',
        abreviatura='tc'
    WHERE idunidad='3'

Then it is Okey it will save this charactersenter image description here

But when I am passing this query from ADODB + PHP, then it is reflecting special character in database like,

enter image description here

I tried a lot I also put this query in my constructor class of adodb

$sql = "ALTER SESSION SET NSL_CHARACTERSET = 'US7ASCII'";

But not getting any result. Please help me

Thanks & Regards

  • 写回答

1条回答 默认 最新

  • doushaiyu5065 2014-06-24 12:27
    关注

    Do you set the correct charset on the connection to the database ?

    http://www.php.net//manual/es/function.oci-connect.php

    Check the character_set parameter.

    Something like this should work:

    $connection = oci_connect(DB_USER, DB_PASS, DB_CONN_STRING, 'WE8ISO8859P15');
                                                                ^^^^^^^^^^^^^^^
    
    评论

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测