dongling5411 2019-04-28 08:37
浏览 192
已采纳

将emojis从php web app传递到Oracle db和mysql

We have an php (codeigniter) web app that sending sms's. the db we connected to is oracle. when some customer trying to send emoji throgh our webapp the emoji is not displayed well on the message in the mobile phone. we can see the emoji in sql plus but it not displeyed well on pl sql. we assuming it related to some encoding issue but can't point to the exact problem.

the flow is like that

  1. PHPinsert into oracle.
  2. Java that take lines from oracle to mysql.
  3. Insert into mysql.
  4. Send as message to mobile phone.

for example :

This is how it looks in php text area :

img1

this is how it looks with PL/SQL after insert to oracle:

img1

this is how it looks with SQL PLUS after insert to oracle :

img1

and this is how it looks in mysql:

img1

and also in the mobile phone message:

img1

The charset in mysql and oracle is utf8mb4

we tryed to change the query in php to be like insert into sms(messaage) values(?) we tried to change the type of the column from varchar2 to clob

edit

the connection from the PHP to oracle is set well i think ,as you can see here:

img1

  • 写回答

1条回答 默认 最新

  • dp815292 2019-04-30 09:51
    关注

    i have found the solution . needed to change the connection charset from php to oracle to be 'AL32UTF8' insted of 'utf8'. now it works great. thank you

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵