Re: [問題] CString 含中文字,compiler如何處理?

看板Programming作者時間16年前 (2007/11/01 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
※ 引述《AuronC.bbs@ptt.cc (AuronC)》之銘言: : Dear all: : CClientDC dc(this); : CString str = "abc上中下"; : dc.TextOut( 0, 0, str ); : 編譯器: VC6 : OS: WinXP : TextOut可以正確顯示英漢字,是因為compilier(?)or OS(?) or CString(?) : 作了一些手法,可以正確秀出字來,它怎麼知道一次看1byte or 2bytes? 因為 OS.... 對電腦來說, 都是當作 byte 處理, OS 再以系統設定的 Codepage 字碼表去 決定如何解譯這些 bytes 的內容. 例如 ASCII-BIG5 字碼表會定義哪幾個 byte 開頭的必需 2 bytes 一起看, 這種我們稱為 leading byte.... 簡單吧 -- ╭──── Origin:<不良牛牧場> bbs.badcow.com.tw (210.200.247.200)─────╮ Welcome to SimFarm BBS -- From : [220.138.45.9] ◣◣◢ ◢◢不良牛免費撥接→電話:40586000→帳號:zoo→密碼:zoo ◣◣─╯
文章代碼(AID): #17ACBW00 (Programming)
討論串 (同標題文章)
文章代碼(AID): #17ACBW00 (Programming)