2010/12/13

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄█▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓▓█▄▄
▄▀▀▓▒░░░░░░░░░░░░░░░░▒▓▓▀▄
▄▀▓▒▒░░░░░░░░░░░░░░░░░░░▒▒▓▀▄
█▓█▒░░░░░░░░░░░░░░░░░░░░░▒▓▒▓█
▌▓▀▒░░░░░░░░░░░░░░░░░░░░░░░░▒▀▓█
█▌▓▒▒░░░░░░░░░░░░░░░░░░░░░░░░░▒▓█
▐█▓▒░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓█▌
█▓▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓█
█▐▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒█▓█
█▓█▒░░░░░░░░░░░░░░░░░░░░░░░░░░░▒█▌▓█
█▓▓█▒░░░░▒█▄▒▒░░░░░░░░░▒▒▄█▒░░░░▒█▓▓█
█▓█▒░▒▒▒▒░░▀▀█▄▄░░░░░▄▄█▀▀░░▒▒▒▒░▒█▓█
█▓▌▒▒▓▓▓▓▄▄▄▒▒▒▀█░░░░█▀▒▒▒▄▄▄▓▓▓▓▒▒▐▓█
██▌▒▓███▓█████▓▒▐▌░░▐▌▒▓████▓████▓▒▐██
██▒▒▓███▓▓▓████▓▄░░░▄▓████▓▓▓███▓▒▒██
█▓▒▒▓██████████▓▒░░░▒▓██████████▓▒▒▓█
█▓▒░▒▓███████▓▓▄▀░░▀▄▓▓███████▓▒░▒▓█
█▓▒░▒▒▓▓▓▓▄▄▄▀▒░░░░░▒▀▄▄▄▓▓▓▓▒▒░▓█
█▓▒░▒▒▒▒░░░░░░▒▒▒▒░░░░░░▒▒▒▒░▒▓█
█▓▓▒▒▒░░██░░▒▓██▓▒░░██░░▒▒▒▓▓█
▀██▓▓▓▒░░▀░▒▓████▓▒░▀░░▒▓▓▓██▀
░▀█▓▒▒░░░▓█▓▒▒▓█▓▒░░▒▒▓█▀░
█░░██▓▓▒░░▒▒▒░▒▒▒░░▒▓▓██░░█
█▄░░▀█▓▒░░░░░░░░░░▒▓█▀░░▄█
█▓█░░█▓▒▒▒░░░░░▒▒▒▓█░░█▓█
▐█▓█░░█▀█▓▓▓▓▓▓█▀░░█░█▓█▌
█▓▓█░█░█░█▀▀▀█░█░▄▀░█▓█
█▓▓█░░▀█▀█░█░█▄█▀░░█▓▓█
█▓▒▓█░░░░▀▀▀▀░░░░░█▓▓█
█▓▒▒▓█░░░░░░░░░░░█▓▓█
▐█▓▒▓██▄█░░░▄░▄██▓▒▓█
█▓▒▒▓█▒█▀█▄█▀█▒█▓▒▓█
█▓▓▒▒▓██▒▒██▒██▓▒▒▓█
█▓▓▒▒▓▀▀███▀▀▒▒▓▓█
▀█▓▓▓▓▒▒▒▒▓▓▓▓█▀
▀▀██

2010/12/07

just back
this few days too busy
last Saturday, my good friend married.
i become the brother of his husband.
and i am the MC in that night.

i am not doing pretty good in that night (i think =[).
Hope you do not mind that.


this two days , i am doing the translation of Viet to CHI,FRA,JAP,ENG
oops...so crazy
everything is not under control.

2010/12/06

UTF8 to UTF16

為咗記得自己寫個D乜~~
打番 SIN
呢一個係個C版的utf8 to utf16 function
超級簡單
因為我在網上完全找唔到~~所以自己寫了一個

int utf8toutf16(char * input){
unsigned char data[16];
*data = input;
int size = sizeof(data);
int i = 0;
unsigned int value;
printf("%x , %d \n",data,size);

if((data[0] & 0xF8) == 0xF0){
//case 1 :4 bytes
value=((((((((unsigned int)data[0]&0x7)<<3)|((unsigned int)data[1]&0x3F))<<6)|((unsigned int)data[2])&0x3f))<<6)|((unsigned int)data[3]&0x3f);
}else if((data[0] & 0xF0) == 0xE0){
//case 2 :3 bytes
value=(((((unsigned int)data[0]&0xF)<<4)|((unsigned int)data[1]&0x3f))<<6)|((unsigned int)data[2]&0x3f);
}else if((data[0] & 0xE0) == 0xC0){
//case 3 :2 bytes
value=(((unsigned int)data[0]&0x1F)<<5)|((unsigned int)data[1]&0x3f);
}else{
//case 4 :1 bytes
value=(unsigned int)data[0];
}
printf("%x , %d\n",value,sizeof(value));
return value;
}

2010/12/01

who know me?
i dont know.
i just want to type something here.
=]
88