Sed和UTF-8编码 [英] Sed and UTF-8 encoding

查看:193
本文介绍了Sed和UTF-8编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SSH(Putty)中,我使用命令来替换UTF-8编码的文件中的某些文本。

In SSH (Putty) I'm using a command to replace some text in a file which is encoded in UTF-8

例如

cd〜/ public_html / app / Config; sed -i的/ ADDRESS_SSH / l'adresseàétécorrectementintégréé/ g'param.php;

在文件中都可以但是当在浏览器中显示重音是奇怪的
当验证文件param.php时,我发现它的编码从 UTF-8 变为欧洲de L'Ouest

In the file all is OK but when displaying in the browser the accents are strange When verifing the file param.php I found that it's encoding was changing from UTF-8 to Europe de L'Ouest

.xml文件也是同样的问题

Same problem for .xml file too

任何帮助使用sed而不改变编码,或者可能添加一个其他ssh行重新编码UTF-8中的新的php和xml文件?

Any help to use sed without changing the encoding or maybe to add an other ssh line for rencoding the php and xml files newly in UTF-8 ?

最好的问候和谢谢你

推荐答案

这是在Putty配置==>翻译==>接收到的数据假定是在哪个字符集==>选择UTF-8
最好的方式

It was on Putty configuration ==> Translation ==> Received data assumed to be in which character set ==> Choose UTF-8 Best regards

这篇关于Sed和UTF-8编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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