일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- dock
- oracle
- 전자정부프레임워크
- PLSQL
- iBATIS
- phonegap
- Android
- PHP
- GPS
- appspresso
- WebLogic
- Eclipse
- jQuery
- Struts
- MySQL
- 가우스
- ibsheet
- Spring
- node.js
- 선택적조인
- JDOM
- MFC
- sencha touch
- swingx
- JSON
- Google Map
- tomcat
- jsr 296
- rowspan
- Ajax
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);