일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- WebLogic
- 선택적조인
- iBATIS
- tomcat
- swingx
- Eclipse
- 전자정부프레임워크
- phonegap
- dock
- appspresso
- PHP
- Spring
- 가우스
- oracle
- PLSQL
- rowspan
- Android
- jQuery
- Ajax
- GPS
- JSON
- MFC
- Google Map
- node.js
- sencha touch
- jsr 296
- ibsheet
- Struts
- JDOM
- MySQL
Archives
- Today
- Total
Where The Streets Have No Name
UTF-8 인코딩 본문
function toUTF8(szInput)
{
var wch,x,uch="",szRet="";
for (x=0; x<szInput.length; x++)
{
wch=szInput.charCodeAt(x);
if (!(wch & 0xFF80)) {
szRet += "%" + wch.toString(16);
}
else if (!(wch & 0xF000)) {
uch = "%" + (wch>>6 | 0xC0).toString(16) +
"%" + (wch & 0x3F | 0x80).toString(16);
szRet += uch;
}
else {
uch = "%" + (wch >> 12 | 0xE0).toString(16) +
"%" + (((wch >> 6) & 0x3F) | 0x80).toString(16) +
"%" + (wch & 0x3F | 0x80).toString(16);
szRet += uch;
}
}
return(szRet);
{
var wch,x,uch="",szRet="";
for (x=0; x<szInput.length; x++)
{
wch=szInput.charCodeAt(x);
if (!(wch & 0xFF80)) {
szRet += "%" + wch.toString(16);
}
else if (!(wch & 0xF000)) {
uch = "%" + (wch>>6 | 0xC0).toString(16) +
"%" + (wch & 0x3F | 0x80).toString(16);
szRet += uch;
}
else {
uch = "%" + (wch >> 12 | 0xE0).toString(16) +
"%" + (((wch >> 6) & 0x3F) | 0x80).toString(16) +
"%" + (wch & 0x3F | 0x80).toString(16);
szRet += uch;
}
}
return(szRet);