我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

DB不接受中文空格字符

My website contains data in Chinese language. When I am trying to save it in DB it is not accepting spaces instead it is replacing '?'. I have tried using UTF-8, utf8mb4, utf-8 charset.

What do I have to use to accept the Chinese language in DB columns type?

Do some encoding and then insert it into your DB, so it will accept it and you will get the same when you decode it.

There are lot of encodings available. You can use gzcompress(), base64encode(),etc

近期文章

  • PHP cURL调用在Ubuntu 14.05中使用PHP 5.5.9,但在使用PHP 5.3的Ubuntu 12.04上不起作用
  • 防止PHP DomDocument loadHTML()删除由于实体编码而导致的字符
  • Avconv中的视频太短 - 但仅在作为crontab运行时
  • 无法使用AngularJS $ http.get从000webhost服务器获取JSON数据
  • 编辑表单PHP PDO
  • 如何裁剪pdf并保留链接
  • 当索引处的值是对象时,在PHP中处理未定义的偏移量警告
  • 自定义字体预览
  • 如何获得反向路由?
  • 带参数的htaccess RewriteRule
  • 链接到内部Javascript无法正常工作
  • 如何编辑Wordpress post.php文件?
  • Php时间数学与小数秒
  • Php颜色替换图像
  • 仍无法获取HTML表单以提交给使用PHP的电子邮件[复制]
  • 当连接到localhost时,为什么MySQL“写入网络”?
  • 如何通过php更新wp bloginfo('admin_email')?
  • PHP基本测试页无法加载(Netbeans 7.4和WAMP)
  • 使用echo语句显示上传图像的完整URL
  • 如何使用javascript显示随机id值

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华