![]() |
PCDVD數位科技討論區
(https://www.pcdvd.com.tw/index.php)
- 疑難雜症區
(https://www.pcdvd.com.tw/forumdisplay.php?f=34)
- - php 與 mssql 的大麻煩
(https://www.pcdvd.com.tw/showthread.php?t=815647)
|
|---|
php 與 mssql 的大麻煩
目前遇到的問題
寫入資料庫會變亂碼 中文字數若為基數會出現錯誤,偶數則正常 編碼方式為utf8,用big5則完全正常,但許功蓋問題會浮現 重點是這個case要求utf8 連線方式: odbc mssql 環境: Windows Server 2003 PHP Apache Mssql Server 2005 測試網址 http://chan.idv.tw:90/debug/index.php FTP IP: chan.idv.tw Username: debug Password: debug DB IP: chan.idv.tw Username: debug Password: debug |
1. 請確定資料庫table編碼是否為UTF-8
2. 請確定寫進去的資料編碼真的是 UTF-8 3. 我懷疑你的資料庫是使用UTF-16編碼才導致寫入失敗 |
引用:
2.我確定,請教一下1要怎麼確定? |
引用:
剛剛點進去網頁 看到有些是亂碼 然後看網頁的編碼是UTF-8沒錯 然後我把網頁編碼換成Big5, 49 50亂碼就變中文了 1.去資料庫裡面看就知道了 |
引用:
喔,那是因為我有開放ftp,我朋友有去try一些方式,結果資料庫內容有些是big5 我去清理一下 |
|
|
| 所有的時間均為GMT +8。 現在的時間是03:52 PM. |
vBulletin Version 3.0.1
powered_by_vbulletin 2026。