CURL导入字符编码问题 [英] CURL import character encoding problem

查看:368
本文介绍了CURL导入字符编码问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用CURL导入一些代码。然而,在法语,所有的字符出来好笑。例如:Bonjour ... ...

I'm using CURL to import some code. However, in french, all the characters come out funny. For example: Bonjour ...

我没有权限更改导入的代码。

I don't have access to change anything on the imported code. Is there anything I can do my side to fix this?

感谢

推荐答案

Like Jon Skeet指出很难理解您的情况,但是如果您只能访问最终文字,则可以尝试使用 iconv 更改文本编码。

Like Jon Skeet pointed it's difficult to understand your situation, however if you have access only to final text, you can try to use iconv for changing text encoding.

Ie

$text = iconv("Windows-1252","UTF-8",$text);

我已经有类似的问题时间(用意大利语和特殊字符)它以这种方式。

I've had similar issue time ago (with Italian language and special chars) and I've solved it in this way.

尝试不同的组合(UTF-8,ISO-8859-1,Windows-1252)。

Try different combination (UTF-8, ISO-8859-1, Windows-1252).

这篇关于CURL导入字符编码问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆