程式
#include <iostream> #include <string> using namespace std; int main() { char c = 0xb1,c2 = 0x69; system("chcp 950"); cout<<c<<c2; //張 char s = 0xa1,s2 = 0xb9; //星星 cout<<s<<s2<<endl; system("pause"); system("chcp 437"); return 0; }
說明
張的big5碼是B169,儲存到char裡要拆分成兩個,也就變成c和c2這兩個變數,星星也是,他的big5碼是A1B9。
這是我大學的程式作業,當時我真的是想了很久阿,big5碼這東西我還真是第一次見。
0 Comments
張貼留言