php - 这是什么编码?

标签 php encoding

如何确定这个字符串是什么编码?

Sometimes, it’s the little things that make us the happiest.

最佳答案

它是 UTF-8 解码为 Latin-1 编码为 UTF-8 解码为 CP1252。

>>> u'’'.encode('cp1252').decode('utf8').encode('latin1').decode('utf8')
u'\u2019'

说真的……这是谁干的?

关于php - 这是什么编码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4952595/

相关文章:

r - 将阿拉伯语数据保存为 csv 文件

php - symfony Doctrine 顺序

php - 编码 php postgres json_encode

go - Golang无法使用math.Float64frombits将[] byte (“1575455669.4”)转换为float64

javascript - 如何将一个十六进制数压缩成一个短字符串?

angular - CentOs - Tomcat - Angular2 - 编码 UTF-8

php - 使用 php 将命令行发送到 Linux 服务器

php - 按天从不同时区的mysql中选择(php)

php - 使用php从mysql编码或解码字符串

php - facebook->getUser 返回 0