Posted on September 14th, 2008 at 17:17 by fr3@K
一方面是受到 jeffhung 與 augustinus 在 我家 與 clsung 那邊留下的迴響所啟發, 令一方面也是為了讓自己更清楚了解正確 wide string and multi-byte string 間轉換的 issue. 我寫了兩個 Wide string and Multi-Bytes string conversion functions 以及方便性的 wrapper (source code hosted by Google Code).
希望能做為一個範例提供給想進一步了解這題目的朋友 (this includes me) 把玩. 也希望能請對這題目有研究的朋友來 code review 以及留下意見, 幫助讓我完善這對 conversion functions 一起造福有這需求的使用者.
Disclaimer: 小弟對實作所使用的 API (wcrtomb 與 mbrtowc) 的行為不是非常肯定, 不敢宣稱其功能上的正確. 歡迎自行取用 (MIT-licensed), 但不提供任何保證.