function getByte(contents){


var str_character;

var int_char_count;

var int_contents_length;


int_char_count = 0;

int_contents_length = contents.length;


// 한글과 영문 바이트수 계산하는 부분

for(var k=0; k < int_contents_length; k++)

{

str_character = contents.charAt(k);

if(escape(str_character).length > 4)

int_char_count += 2;  

else

int_char_count++;

}

return int_char_count;

    }


음음 그러하다.


+ Recent posts