# 方法: 各浏览器如何使用 utf-8 发贴

## wangxiaohu

设置方法

1. Firefox：

菜单-->查看-->字符编码-->Unicode(UTF-8)

2. Mozilla

3. Opera

View --> Encoding --> Unicode --> UTF-8

4. IE

查看 -> 编码 -> UTF-8

5. Safari:

View-> Text Encoding -> UTF8

Edits:

 - Eric.200412171008: 添加 IE 部分

 - Eric.200412141245: 把题目从原来的 "本版推荐用UTF-8发贴" 改成现在的 "方法: 各浏览器如何使用 UTF-8 发贴"

 - Eric.200412131941: 请有上述浏览器的朋友帮忙跟贴完整 UTF-8 的设置方法 :)

 - wangxiaohu.200506251202: 添加Safari设置 UTF-8 的方法

 - AKar.200710031246:  本帖完成了它的歷史任務，光榮地退下來。Last edited by wangxiaohu on Sat Jun 25, 2005 3:50 pm; edited 2 times in total

----------

## kohno

支持！请在贴名那儿用上中英双语，最好繁體也用上！

----------

## xiaosuo

不过看了这个网页的源码还是没有制定charset的

可不可以要求官方论坛改源码加上

charset=utf-8这样就能自动转换了。

----------

## Fleta

如果用Konqueror可以在Fonts那儿将Default encoding改成uft-8。

我的Mozilla似乎自动就转成了uft-8了！  :Smile: 

----------

## Hauser

Firefox選Auto-Detect Chinese就可以了，其他瀏覽器還沒試。

----------

## SnEptUne

For Opera:

View --> Encoding --> Unicode --> UTF-8

Make sure you have Chinese fonts installed.

----------

## ldh168

太感谢楼主了，按照建议设置好后试发此贴，不知楼上各们能否正常查看？

----------

## 3331

我也试试，

不好意思。

 :Laughing: 

----------

## akar

一個在本論譠上的中文編碼使用的技巧：

```
1. 用 論譠的個人設置，把論譠改為中文界面(Forum->profile), 讓瀏覽器有一定的中文文字來偵測頁面的中文編碼。（！必需的！）

2. 把 瀏覽器 設定為自動偵測中文編碼。
```

謝謝 vliqi 的提醒和測試，詳見：  :Smile: 

在編輯帖子的時候默認的編碼不是utf8

----------

## dundas

For IE

Same thing as firefox, just choose Unicode (UTF- :Cool: 

upup tiger!

----------

## wangxiaohu

 *dundas wrote:*   

> For IE
> 
> Same thing as firefox, just choose Unicode (UTF-
> 
> upup tiger!

 

哈哈哈，Dundas也来了，欢迎欢迎？在香港学得怎样？

----------

## lucida

IE好像只能每次手工改呀

有没有自动化的方法？

----------

## Hauser

To summarize:

Mozilla/Firefox

View -> Character Encoding -> Customize -> Remove all Active Character Encodings,  Add Unicode (UTF-8), Add back all the Encodings just removed so that  Unicode (UTF-8) is on the top of the list -> OK

Konqueror

Settings -> Configure Konqueror -> Fonts -> Default encoding: utf8

Opera

Tools -> Preferences -> Languages -> Encoding to assume for pages lacking specification: utf-8

IE

Sorry, I don't know how to make its setting automatic.

----------

## anstan

是啊，用ie每打开一个页面就要选一次，连回复的时候也要这样，挺麻烦的。

----------

## zonzi

for safari:

view-> text encoding ->utf8

----------

## kamanzhow

小弟刚来报到，发个贴测试一下UTF-8 ^_^

----------

## dundas

Hi, I got everything working so nicely in chinese fonts, however the only place which I see blocks of chinese character is here using utf-8

something like   常[] | 搜索 | 会[]列表 | [] | Statistics | 个人资料 | 您没有新的站内信件 | 注[] 

any one can give me some advices what I've done wrong?

thx a lot!

----------

## wangxiaohu

 *dundas wrote:*   

> Hi, I got everything working so nicely in chinese fonts, however the only place which I see blocks of chinese character is here using utf-8
> 
> something like   常[] | 搜索 | 会[]列表 | [] | Statistics | 个人资料 | 您没有新的站内信件 | 注[] 
> 
> any one can give me some advices what I've done wrong?
> ...

 

http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&t=78828

----------

## dundas

ok, give me some time to test it tiger.

----------

## dundas

well, all my settings works well under mozilla, so now I'll drop konqueror.

----------

## Jeremy_Z

Does anyone have this issue :

When i set the locales to en_US.UTF-8 firefox is behaving ok but i cannot use chinese input (fcitx).

When i set to zn_CH.UTF-8 to have chinese input to work, the font in firefox GUI is big and the letters are spaced a lot.

Well i think it makes firefox use chinese font, how can i stop it to do that ?

EDIT : Nevermind, i just switched to SCIM for firefox because fcitx just doesn't work with the locales set to non chinese  :Embarassed: 

----------

## dundas

ok, thx for that reminder.

----------

## Freesnake

IE不能选择自动utf8，TNND……

----------

## yinyou

初来乍道，一开始我也是看到一大堆乱码，还不知道是怎么回事，想了一会试使用UTF8编码浏览，才知道也可以显示简体中文。

可是每浏览一个页面就需要手动点一次编码，很麻烦，不过现在不用了。

编码－+自动选择

－－－｜简体中文

－－－+Unicode(UTF－8 )

----------

## TheFishMonkey

All this asking users to change there encodings isn't really necessary. Just add , 

<Directory />

AddDefaultCharset utf-8

</Directory>

 to your httpd.conf  file.  It will fix the French and Arabic text too.  

That way our "auto detect" encoding features will work correctly.

----------

## kohno

 *TheFishMonkey wrote:*   

> All this asking users to change there encodings isn't really necessary. Just add , 
> 
> <Directory />
> 
> AddDefaultCharset utf-8
> ...

 

I don't have httpd.conf, what is it?

----------

## TheFishMonkey

It's the apache configuration file. I meant the people who run this webserver  *could*  add this setting.(Please, Pretty, please any sysops reading this)

I used to work as a web manger, so I know a bit about this. All web pages are sent via HTTP messages, these messages have a header, which contains (amongst other things ) the encoding type of the page.  Apache can set this automaticly, if the index.html file is in UTF.8  set the header accordingly, but this doesn't always work with dynamic pages (like PHP) and is quite slow,so by default it doesn't, it just says everything is iso-8859-1 when it probably isn't, screwing up Hanzi, french accents, the pound sign, the euro sign, etc. etc.

To turn ON automatic charset, you have to put a "AddDefaultCharset off ", the Apache documentation isn't too helpful,  I worked that out by installing apache and playing with it. 

 As far as I know, setting the encoding in the <head><meta...> </head>  section of each web page NEVER works.  (i think it's just to help Google, but I'm not sure it even does that....)

If we set AddDefaultCharset utf-8 to the apache configuration, all web pages sent will have the correct encoding in the header, browsers will adjust accordingly.  The would be no need for anyone reading forums.gentoo.org to adjust their browsers encoding setting.

----------

