Re: [請益] 也是網頁亂碼的問題

看板PHP作者 (薛丁格的貓)時間17年前 (2007/08/15 16:44), 編輯推噓3(304)
留言7則, 3人參與, 最新討論串2/3 (看更多)
※ 引述《divaka (豬肉腳)》之銘言: : 推 alpe:你是用什麼環境去寫code& http 的環境是? 08/15 16:28 : 推 divaka:其實不太懂您的意思 不過我是用dreamweaver 08/15 16:31 : → divaka:AppServ2.5.9 08/15 16:31 中文編碼的問題, 要看很多地方. 1. 你寫code, 檔案的編碼. 2. db 的編碼 3. 產出html 的 編碼 全部都要統一. 不是說在html設個meta charset = utf8 就可以解決的 你在code用個ansi, echo 個中文, 但最後html 用utf8, 那就等者爆. 或是db 資料用utf8, html 用 big5, 那還是爆. html如果還有用到js/css 裡面有中文而且編碼還不同,那會更好玩,爆到怎麼死都不知道. -- Exactly. For that one fraction of a second, you were open to options you had never considered. THAT is the exploration that awaits you: not mapping stars and studying nebulae,but charting the unknown possibilities of existence. Star Trek S7E26 "All Good Thing" -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 202.132.72.186

08/15 16:49, , 1F
所以一開始就要決定好統一要用什麼編碼
08/15 16:49, 1F

08/15 16:52, , 2F
謝謝! 我SQL裡是存 校對 = utf8_unicode_ci
08/15 16:52, 2F

08/15 16:53, , 3F
mysql_query 設成 utf8
08/15 16:53, 3F

08/15 16:55, , 4F
產出html 的 編碼 我用IE開然後右鍵選 utf-8 但還是亂碼
08/15 16:55, 4F

08/15 16:57, , 5F
然後就不知道該怎麼改了 @@~~~不過還是謝謝你們
08/15 16:57, 5F

08/15 16:57, , 6F
我也都看過 big5/utf-8 都是爆了. 你回去查你每個當的charset
08/15 16:57, 6F

08/15 17:08, , 7F
@@ 結果我加了<mata> tag就ok了‧感謝itisjoe‧感謝大家 ~!
08/15 17:08, 7F
文章代碼(AID): #16mhpqKV (PHP)
文章代碼(AID): #16mhpqKV (PHP)