WordPress Charset Encoding Problem After Upgrading to Version 2.2在WordPress字符的編碼問題後,升級到2.2版
WordPress blogs that upgraded to Wordpress version 2.2 may encounter strange character set (charset) encoding problem where several characters especially apostrophes (’), quotation marks (”), and hyphens or dashes (—) are displayed as strange characters such as ’ or simply as question marks (?) when the posts are output to web pages. WordPress Blogs的說,在WordPress升級到2.2版,可能會遇到奇怪的字符集(字符集)編碼的問題有幾個特徵,特別是撇號( ' ) ,引號( “ ) ,和連字號或破折號( -)顯示為奇怪的字符,如â € ™或乾脆為問號( ? )時,職位是輸出到網頁上。 As you have probably suspected, the issue is caused by character encoding method used by正如你可能懷疑,問題是所造成的字符編碼方法所使用的 WordPress 2.2 which supports setting of database collation and character set在WordPress 2.2支持設置數據庫的整理和字符集 in WordPress config file.在WordPress的config檔。
The error happens because up to and including WordPress ver 2.1.3, almost all WordPress databases were created using the latin1 character set and the latin1_swedish_ci collation.錯誤發生,因為直至並包括在WordPress 2.1.3查看,幾乎所有的WordPress數據庫的使用創造了以latin1字符集和latin1_swedish_ci整理。 Beginning WordPress v2.2, WordPress allows the user to define both the database character set and the collation in wp-config.php file, using DB_CHARSET and DB_COLLATE values.開始的WordPress 2.2版本,在WordPress ,使用戶可以界定雙方數據庫字符集和整理,在可濕性粉劑- config.php文件,使用db_charset和db_collate價值觀。 With these values set to another encoding, WordPress assumes that the databases are indeed using the charset and collation too, where it’s not the case for existing WordPress installation.與這些價值觀的設置為其他編碼,在WordPress假設條件是,該數據庫確實使用的字符集和整理過,在那裡的情況並非如此,現有的WordPress安裝。 So if you’re upgrading WordPress to 2.2 using the default wp-config.php, or have manually modified the file to include the new variables, or upgrading by using Fantastico which automatically update the wp-config.php file to include these two definitions which values set as Unicode UTF-8 by default, you will need to remove these definitions to solve the character encoding error.所以,如果您的WordPress升級至2.2使用默認可濕性粉劑- config.php ,或有手動修改的文件,包括新的變數,或升級使用fantastico ,其中自動更新可濕性粉劑- config.php文件以包括這兩個定義其中值設置為Unicode -8默認情況下,您將需要刪除這些定義,以解決漢字編碼的錯誤。
Open and edit your WordPress wp-config.php file.打開和編輯您的WordPress可濕性粉劑- config.php文件。 Then locate the following two lines:然後找到以下兩行:
define(’DB_CHARSET’, ‘utf8′);界定( ' db_charset ' , ' utf8進行' ) ;
define(’DB_COLLATE’, ”);界定( ' db_collate ' , “ ) ;
You can simply delete these 2 lines away, or just remove the utf8 from the first line to make them looks like this:您可以簡單地刪除這些2線遠離,或只刪除utf8進行,由第一線,使它們看起來像這樣:
define(’DB_CHARSET’, ”);界定( ' db_charset ' , “ ) ;
define(’DB_COLLATE’, ”);界定( ' db_collate ' , “ ) ;
With no charset and collation values set, WordPress will fall back to the old default, latin1 which matched the databases.沒有字符集和整理一套價值觀,在WordPress會回落到舊默認情況下,以latin1相符的數據庫。
A possible better solution is一個可能更好的解決辦法是 convert the Wordpress database to UTF8 Unicode轉換的WordPress數據庫utf8進行的Unicode . 。
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要說明 :這是一個機器翻譯網頁是“按原樣”提供的擔保。 Machine translation may be difficult to understand.機器翻譯可能很難理解。 Please refer to請參閱 original English article原來的英語文章 whenever possible.只要有可能。
Share and contribute or get technical support and help at分享和貢獻,或取得技術的支持和幫助,在 My Digital Life Forums 我的數字生活論壇 . 。
Related Articles相關文章
- How to Convert Character Set and Collation of WordPress Database如何轉換字符集和校對WordPress的數據庫
- Download Previous or Old Version of WordPress下載前或舊版本的WordPress
- How to Customize, Modify or Change WordPress Database Connection Error Page如何自訂,修改或改變的WordPress數據庫連接錯誤頁
- Download WordPress 2.3 Release Candidate 1 (RC1) with Tags Support下載的WordPress 2.3候選版本1 ( RC1的)與標籤支持
- Integrate WordPress including Comments with bbPress Forum using bbSync整合WordPress所包括的評論與bbpress論壇使用bbsync
- WordPress 2.1.1 Critical Security Alert - Download Upgrade to 2.1.2在WordPress 2.1.1關鍵的安全警戒-下載升級到2 .1.2
- Automatically Update WordPress to Latest Version with Automatic Upgrade Plugin (WPAU)自動更新的WordPress到最新版本,與自動升級插件( wpau )
- Disable Auto Go To (Jump) To Read More Tag禁用自動轉到(跳轉)來讀取更多的標籤
- Paginating or Split WordPress Post or Page with NextPage in WordPress Not Working paginating或分裂的WordPress郵寄或網頁下一頁在WordPress沒有工作
- Disable and Turn Off Post Revisions Tracking in WordPress 2.6 or Above禁用和關閉後的修改,跟踪在WordPress 2.6或以上




























August 24th, 2008 11:20 2008年8月24日11時20分
Thanks!謝謝! Saved me a lot of time.救了我很多的時間。
August 23rd, 2008 05:24 2008年8月23日5時24分
thanks謝謝
June 18th, 2008 08:42 2008年6月18日8時42分
Isn’t UTF8 much better?是不是utf8進行好得多? Why would you limit yourself to Latin1 just because it used to be the default?為什麼你會限制自己以latin1只是因為它曾經是默認?
June 6th, 2008 20:56 2008年6月6日20時56分
Just wanted to say: this had afflicted me for months.只想說:這是困擾我數月之久。 Never found a workable solution.從來沒有發現一個可行的解決方法。 Stumbled on your site today and it worked perfectly.偶然在您的網站上,今天和它完美的。 Thanks so much!感謝這麼多!
February 19th, 2008 05:04 2008年2月19日5時04分
Hi, thanks for doing this.您好,感謝這樣做。 it’s the only thing I’ve found.它的唯一的事,我發現。 I remove the utf8 and a lot of my posts still have the question marks.移除utf8進行和我的很多職位,仍然有問號。 any ideas what I may need to do?任何想法,我可能需要做什麼呢?
February 17th, 2008 03:44 2008年2月17日3時44分
thanks for the help, it worked out for me感謝您的幫助下,它的工作為我
January 5th, 2008 06:55 2008年1月5日6時55分
Thx a lot! thx了很多!
You saved me hours!你救了我小時!