需要将页面大规模转换为UTF-8编码 [英] need to mass convert pages to UTF-8 encoding

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

问题描述

验证器现在在我的页面上窒息,因为我开始发送一个

字符编码标题UTF-8,但该页面充满了非UTF-8

字符。无论如何快速转换它们?

http://validator.w3.org/check?uri=ht...krubner.com%2F

Validator chokes on my pages now because I started sending an
character encoding header of UTF-8 but the page is full of non UTF-8
characters. Anyway quick way to convert them?

http://validator.w3.org/check?uri=ht...krubner.com%2F

推荐答案

2004年9月29日13:50:30 -0700, lk******@geocities.com (lawrence)写道:
On 29 Sep 2004 13:50:30 -0700, lk******@geocities.com (lawrence) wrote:
验证器现在在我的页面上窒息,因为我开始发送一个UTF-8的
字符编码标题,但该页面充满了非UTF-8
字符。无论如何快速转换它们?

http://validator.w3.org/check?uri=ht...krubner.com%2F
Validator chokes on my pages now because I started sending an
character encoding header of UTF-8 but the page is full of non UTF-8
characters. Anyway quick way to convert them?

http://validator.w3.org/check?uri=ht...krubner.com%2F




从什么转换它们?在不知道源编码的情况下你无法转换。


你有哪些工具?我会倾向于使用Encode模块敲出一个简短的Perl

脚本,如果有很多

要更改,可能会使用File :: Find :: Rule 。


-

Andy Hassall /< an ** @ andyh.co.uk> /< http://www.andyh.co.uk>

< http://www.andyhsoftware.co.uk/space>空间:磁盘使用情况分析工具



Convert them from what? You can''t convert without knowing the source encoding.

What tools do you have available? I''d be inclined to knock up a short Perl
script using the Encode module and possibly File::Find::Rule if there''s a lot
to change.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool


lawrence写道:
lawrence wrote:
验证器现在在我的页面上窒息,因为我开始发送一个
字符编码头UTF-8,但页面中充满了非UTF-8
字符。无论如何快速转换它们?

http://validator.w3.org/check?uri=ht...krubner.com%2F
Validator chokes on my pages now because I started sending an
character encoding header of UTF-8 but the page is full of non UTF-8
characters. Anyway quick way to convert them?

http://validator.w3.org/check?uri=ht...krubner.com%2F



http://www.php.net/utf8_decode


....并检查你的meta标签


-

如果每个人都读到USENET将是一个更好的地方:|给我发电子邮件:使用|
http:/ /www.catb.org/~esr/faqs/smart-questions.html |我的名字在收件人:中|
http://www.netmeister.org/news/learn2quote2 .html |标题,textonly |
http://www.expita.com/nomime。 HTML |没有附件。 |



http://www.php.net/utf8_decode

.... and check your meta tags

--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |


2004年9月29日21:13:30 GMT,Pedro Graca< he **** @ hotpop.com>写道:
On 29 Sep 2004 21:13:30 GMT, Pedro Graca <he****@hotpop.com> wrote:
劳伦斯写道:
验证器现在在我的页面上窒息,因为我开始发送一个UTF-8的
字符编码头但是页面充满了非UTF-8
字符。无论如何快速转换它们?

http://validator.w3.org/check?uri=ht...krubner.com%2F
Validator chokes on my pages now because I started sending an
character encoding header of UTF-8 but the page is full of non UTF-8
characters. Anyway quick way to convert them?

http://validator.w3.org/check?uri=ht...krubner.com%2F



http://www.php.net/utf8_decode

。 ..并检查你的meta标签



http://www.php.net/utf8_decode

... and check your meta tags




这不是错误的方法吗?他正在发送非UTF8数据,但将其标记为

UTF8,导致错误 - 如果标题保持这种状态,那么他不是b $ b b b b b b b b b b b b将它编码为UTF8,而不是解码?


另一个重要的问题是 - 为什么OP开始发送UTF8标题,如果他是

不是实际上发送UTF8?

-

Andy Hassall /< an ** @ andyh.co.uk> /< http://www.andyh.co.uk>

< http://www.andyhsoftware.co.uk/space>空间:磁盘使用情况分析工具



Isn''t that the wrong way around? He''s sending non-UTF8 data but flagging it as
UTF8, resulting in errors - if the headers remain that way, then isn''t what he
wants is to encode it to UTF8, not decode?

The other big question is - why did the OP start sending UTF8 headers if he''s
not actually sending UTF8?

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool


这篇关于需要将页面大规模转换为UTF-8编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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