Ajax-繁簡轉換工具

聽了很耐 Ajax (Asynchronous JavaScript and XML) 技術,總是沒有動手玩過。今天終於 “的起心胱” 做了這個小玩意。

在繁簡轉換概念上,由於內容是 UTF-8 格式的關係,用了三行 iconv 語句。如繁體轉簡體的程式是:

$newStr = iconv(“UTF-8”, “big5”, $orgStr);
$newStr = iconv(“big5”, “gb2312”, $newStr);
$newStr = iconv(“gb2312”, “UTF-8”, $newStr);

3 replies
  1. kenji
    kenji says:

    想請教一下,我的檔案是UTF-8 格式,可惜執行上述編碼之後出現亂碼,是出了什麼問題嗎?

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.