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 我的數字生活論壇 .



32 Responses to “WordPress Charset Encoding Problem After Upgrading to Version 2.2” 32反應“的WordPress字元編碼問題後,升級到2.2版”

Pages: [2]頁數: [ 2 ] 1 » Show All顯示所有

  1. Ates Goral門斑羚
    August 24th, 2008 11:20 2008年8月24日11時20分
    32

    Thanks!謝謝! Saved me a lot of time.救了我很多的時間。

  2. Rodrigo羅德里戈
    August 23rd, 2008 05:24 2008年8月23日5時24分
    31

    thanks謝謝

  3. Endolith endolith
    June 18th, 2008 08:42 2008年6月18日8時42分
    30

    Isn’t UTF8 much better?是不是utf8進行好得多? Why would you limit yourself to Latin1 just because it used to be the default?為什麼你會限制自己以latin1只是因為它曾經是默認?

  4. Tom Clarke湯姆克拉克
    June 6th, 2008 20:56 2008年6月6日20時56分
    29

    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!感謝這麼多!

  5. Josh喬什
    February 19th, 2008 05:04 2008年2月19日5時04分
    28

    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?任何想法,我可能需要做什麼呢?

  6. Marthin marthin
    February 17th, 2008 03:44 2008年2月17日3時44分
    27

    thanks for the help, it worked out for me感謝您的幫助下,它的工作為我 : )

  7. Bruno Silva布魯諾席爾瓦
    January 5th, 2008 06:55 2008年1月5日6時55分
    26

    Thx a lot! thx了很多!
    You saved me hours!你救了我小時!

Pages: [2]頁數: [ 2 ] 1 » Show All顯示所有

Leave a Reply離開的答复

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> 您可以使用這些標籤:的<a href="" title=""> <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> <刪除日期時間= “ ” >的<em>的<i> <q cite=""> <strike>的<strong>

Subscribe without commenting訂閱無評論


Custom Search

New Articles新的條款,

Incoming Search Terms for the Article傳入的搜索條件文章

wordpress charset 在WordPress字符 - - wordpress encoding 在WordPress編碼 - - charset wordpress 字符集的WordPress - - wordpress utf8 在WordPress utf8進行 - - wordpress utf-8 在WordPress -8 - - wordpress DB_COLLATE 在WordPress db_collate - - wordpress change charset 在WordPress改變字符集 - - wordpress encoding problem WordPress所編碼的問題 - - wordpress weird characters 在WordPress怪異的字符 - - wordpress character encoding 在WordPress字符編碼 - - wordpress apostrophes 在WordPress撇號 - - all 全部 - - utf-8 wordpress -8的WordPress - - utf8 wordpress utf8進行的WordPress - - encoding wordpress 編碼的WordPress - - Charset Encoding 字符的編碼 - - rendering apostrophe in wordpress 繪製撇號在WordPress - - problem with Iphone after upgrading to version 2 問題iphone後,升級到第2版 - - wordpress DB_CHARSET 在WordPress db_charset - - wordpress utf 在WordPress的UTF - - wordpress 2.6 charset 在WordPress 2.6字符集 - - wordpress charset problem upgrade 在WordPress字符集的問題升級 - - DB_COLLATE wordpress db_collate的WordPress - - wordpress 2.6 charset problema 在WordPress 2.6字符集problema - - wordpress korean 在WordPress韓國 - - remove cech characters utf8 移除切赫字符utf8進行 - - Windows japanese charset encoding problem characters 日本的Windows字符的編碼字符問題 - - php charset encoding utf PHP中的字符的編碼為UTF - - DB_CHARSET Wordpress db_charset的WordPress - - wordpress change encoding 在WordPress改變編碼 - - "WordPress" "charset" “在WordPress ” , “字符集” - - wordpress character support 在WordPress字符支持 - - wordpress encoding error 在WordPress編碼錯誤 - - wordpress encoding collation 在WordPress編碼整理 - - wordpress charset problem 在WordPress字符集問題 - - encoding method used in the wordpress for password 編碼所採用的方法,在WordPress所為密碼 - - wordpress upgrade character encoding problem 在WordPress升級的字符編碼問題 - - wordpress strange characters 在WordPress奇怪的字符 - - charset 字符集 - - wordpress utf 8 在WordPress的UTF 8 - - change wordpress encoding 改變的WordPress編碼 - - wordpress upgrade charset 在WordPress升級字符 - - wordpress bilingual post korean 在WordPress雙語郵政朝鮮 - - wordpress text encoding problem 在WordPress文字編碼的問題 - - info about UTF8&a 信息utf8進行& - - norwegian characters wordpress 挪威字符的WordPress - - wordpress 2.6 charset error 在WordPress 2.6字符集錯誤 - - utf-8 wordpress 2.6 -8的WordPress 2.6 - - wordpress+charset 在WordPress +字符集 - - wordpress nextpage multilingual 在WordPress下一頁多語種 - -