UTF-8垃圾字符 [英] UTF-8 garbage characters

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

问题描述

我很想问为什么这个页面在Safari上没有正确呈现?

一台Macintosh但我怀疑有人会告诉我验证页面

。然而,如果有人看到一个明显的原因,我错过了b
,我想知道。它看起来像一个缺失的div标签,但是我不能看到一个。

http://www.krubner.com/

让我们继续讨论一个可能有问题的问题。如果我复制并且

将非UTF-8字符粘贴到页面上,然后发出一个UTF-8

charset UTF-8标题然后我会得到我看到的垃圾字符是什么?

I''d love to ask why this page is not rendering correctly in Safari on
a Macintosh but I suspect someone will tell me to validate the page
first. Nevertheless, if anyone sees an obvious reason that I''m
missing, I''d like to know. It looks like a missing div tag but I
can''t see one.

http://www.krubner.com/
Let''s move on to a question that might be answerable. If i copy and
paste non-UTF-8 characters to the page, and then send out a UTF-8
charset UTF-8 header then I''ll get the garbage characters that I''m
seeing?

推荐答案

* lawrence * skrev 2004-10-01 09: 34:
*lawrence* skrev 2004-10-01 09:34:
我很想问为什么这个页面在Safari上没有正确呈现在Macintosh上但是我怀疑有人会告诉我首先验证页面。然而,如果有人看到我失踪的明显原因,我想知道。它看起来像一个缺失的div标签,但我看不到一个。

http://www.krubner.com/

让我们继续讨论一个可能有问题的问题。如果我复制并粘贴非UTF-8字符到页面,然后发送一个UTF-8
字符集UTF-8标题然后我会得到垃圾字符我是
看到了吗?
I''d love to ask why this page is not rendering correctly in Safari on
a Macintosh but I suspect someone will tell me to validate the page
first. Nevertheless, if anyone sees an obvious reason that I''m
missing, I''d like to know. It looks like a missing div tag but I
can''t see one.

http://www.krubner.com/
Let''s move on to a question that might be answerable. If i copy and
paste non-UTF-8 characters to the page, and then send out a UTF-8
charset UTF-8 header then I''ll get the garbage characters that I''m
seeing?




如果你在标题中设置字符集UTF-8,你还必须将

文档保存为UTF -8上传之前。我相信它'保存在我的默认值

charset,可能是iso-8859-1


-

/ Arne



If you set charset UTF-8 in the header, you also have to save the
document as UTF-8 before uploading it. I belive it''s saved in i default
charset, probably iso-8859-1

--
/Arne


Arne< ar ** @ luras.nu>在消息新闻中写道:< SH ***************** @ newsb.telia.net> ...
Arne <ar**@luras.nu> wrote in message news:<SH*****************@newsb.telia.net>...
* lawrence * skrev 2004-10 -01 09:34:
*lawrence* skrev 2004-10-01 09:34:
我很想问为什么这个页面在Safari上没有正确呈现在Macintosh上但是我怀疑有人会告诉我验证页面
首先。然而,如果有人看到我失踪的明显原因,我想知道。它看起来像一个缺失的div标签,但我看不到一个。

http://www.krubner.com/

让我们继续讨论一个可能有问题的问题。如果我复制并粘贴非UTF-8字符到页面,然后发送一个UTF-8
字符集UTF-8标题然后我会得到垃圾字符我是
看到了吗?
I''d love to ask why this page is not rendering correctly in Safari on
a Macintosh but I suspect someone will tell me to validate the page
first. Nevertheless, if anyone sees an obvious reason that I''m
missing, I''d like to know. It looks like a missing div tag but I
can''t see one.

http://www.krubner.com/
Let''s move on to a question that might be answerable. If i copy and
paste non-UTF-8 characters to the page, and then send out a UTF-8
charset UTF-8 header then I''ll get the garbage characters that I''m
seeing?



如果你在标题中设置了字符集UTF-8,你还需要在上传之前将
文件保存为UTF-8。我相信它'保存在我默认的
charset,可能是iso-8859-1



If you set charset UTF-8 in the header, you also have to save the
document as UTF-8 before uploading it. I belive it''s saved in i default
charset, probably iso-8859-1




由于发送UTF-8标题,我已经开始在页面上获得大量垃圾

字符。这个despit在

PHP中使用encode_UTF-8。问题是我不知道文本是什么字符串在

时间的头部,所以我不能对文本做任何正确的转换。网络

太异质了。我想知道Blogger和TypePad是如何处理这个问题的?b $ b问题?只是运气,他们的用户很少会得到

垃圾字符?或者是因为他们标准化了不同的

字符集?



Since sending out UTF-8 headers, I''ve started to get a lot of garbage
characters on the page. This despit hitting it with encode_UTF-8 in
PHP. The problem is I don''t know what charset the text is in a head of
time, so I can''t do any kind of proper conversion on the text. The web
is too heterogenous. I wonder how Blogger and TypePad tackle this
problem? Is it just luck that so few of their users end up with
garbage characters? Or is it because they standardize on a different
charset?


* lawrence * skrev 2004-10-02 02:13:
*lawrence* skrev 2004-10-02 02:13:
Arne< ar ** @ luras.nu>在消息新闻中写道:< SH ***************** @ newsb.telia.net> ...
Arne <ar**@luras.nu> wrote in message news:<SH*****************@newsb.telia.net>...
* lawrence * skrev 2004-10 -01 09:34:
*lawrence* skrev 2004-10-01 09:34:
>我很想知道为什么这个页面在Safari上无法正确呈现
> Macintosh,但我怀疑有人会告诉我验证页面
>第一。然而,如果有人看到一个明显的原因,我是
>失踪,我想知道。它看起来像一个丢失的div标签,但我
>看不到一个。
>
> http://www.krubner.com/
>
>
>让我们继续讨论一个可能有问题的问题。如果我复制并且
>将非UTF-8字符粘贴到页面上,然后发送出一个UTF-8
> charset UTF-8标题然后我会得到垃圾字符我是
>看?
> I''d love to ask why this page is not rendering correctly in Safari on
> a Macintosh but I suspect someone will tell me to validate the page
> first. Nevertheless, if anyone sees an obvious reason that I''m
> missing, I''d like to know. It looks like a missing div tag but I
> can''t see one.
>
> http://www.krubner.com/
>
>
> Let''s move on to a question that might be answerable. If i copy and
> paste non-UTF-8 characters to the page, and then send out a UTF-8
> charset UTF-8 header then I''ll get the garbage characters that I''m
> seeing?



如果你在标题中设置了字符集UTF-8,你还必须在上传之前将
文件保存为UTF-8。我相信它已经保存在我默认的
字符集中,可能是iso-8859-1



If you set charset UTF-8 in the header, you also have to save the
document as UTF-8 before uploading it. I belive it''s saved in i default
charset, probably iso-8859-1



由于发送了UTF-8标题,我已经开始得到一个页面上有很多垃圾
字符。这个despit在PHP中用encode_UTF-8命中它。问题是我不知道文本是什么字符串在时间的头部,所以我不能对文本做任何正确的转换。网络
太异质了。我想知道Blogger和TypePad是如何解决这个问题的?只是运气,他们的用户很少有垃圾字符?或者是因为它们标准化了不同的字符集?



Since sending out UTF-8 headers, I''ve started to get a lot of garbage
characters on the page. This despit hitting it with encode_UTF-8 in
PHP. The problem is I don''t know what charset the text is in a head of
time, so I can''t do any kind of proper conversion on the text. The web
is too heterogenous. I wonder how Blogger and TypePad tackle this
problem? Is it just luck that so few of their users end up with
garbage characters? Or is it because they standardize on a different
charset?




您使用什么编辑器来构建和编辑页面?

在我使用的编辑器中,我可以选择我想要使用的任何编码,并且

保存文件时会保存在该编码中。如果我打开一个文件,我可以用同样的方式更改编码,只需点击

编辑器工具栏中的按钮即可。在Windows XP中,你也可以选择编码文件

将它们保存在Notebook中。


因为我用UTF-8保存文件我不会在编写时,手动需要在文本中进行任何

转换。我的猜测是Blogger和

TypePad以同样的方式完成,用户编写的帖子保存为

UTF-8,因为这是一个unicod,所有类型可以使用字符和语言




-

/ Arne



What editor do you use for building and editing the pages?

In the editor I use, I can choose whatever encoding I want to use, and
on saving the file is saved in that encoding. If I open a file I can
change the encoding the same way, with just a click on a button in the
editors toolbar. In Windows XP you can also choose encoding for files
when saving them in Notebook.

Because I save the files in UTF-8 I don''t manually need to do any
conversion in the text, when writing it. My guess is that Blogger and
TypePad is done the same way, the posts that the user write is saved as
UTF-8 and since that is a unicod, all kind of characters and languages
can be used.

--
/Arne


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

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