PMTexporter 0.65

在我釋出程式並把我自己的資料轉換到AM之後,就把code埋到svn裡去了。畢竟,把資料從PMT轉換到AM這種事,作一次就夠了。

不過感謝 GAAP 的測試,他發現一個在note(附註欄位)的bug。這個 bug 會使得某些中文字在轉換後變成亂碼,如 “)” 這個全形的括號。

在檢視code之後,發現是在使用 search&replace 作escape 時出了問題。

在QIF的規格中,”^”這個符號是作為一筆紀錄的結束字元。但在PMT的note欄位中,”^”這個字元好像作為分行符號。因此當我使用了簡單的 $t_note =~ s/\^/\;/g; 來把note裡的 “^” 換成 “;”時,碰到低位元為”^”的中文字就亂掉了。

所以現在改用$t_note =~ s/([x20-x7E])^/$1;/g;來代替,希望會好一點 :)

修正後的新版(0.65版)請到 PMTexporter 專屬網頁 下載。

延伸閱讀

更多閱讀選擇

文章資訊

 

4 Responses to PMTexporter 0.65

  1. jeffhung says:

    PMTexporter is written in Perl? Why not ‘use utf8′ and do regular expression replacements in UTF-8 encoding internally. Those annoy Chinese problems will all gone.

  2. PipperL says:

    jeffhuang:
    我跟 UTF-8 perl不熟….^^;
    不過我會試試看 :)

  3. Pingback: JeffHung.Blog

  4. Pingback: Perl with UTF-8 mode [JeffHung.Blog]

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>