|
| |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
ConVertUnicodeToUTF8(const WCHAR *wstrIn, BYTE *buff,int vLen) { ASSERT(wstrIn); int wLen=wcslen(wstrIn); int i=0; #define putchar(a) buff[i++]=(BYTE)a; for(int j=0;(DWORD)j<wcslen(wstrIn);j++) { ASSERT(i<vLen); WCHAR c=wstrIn[j]; if (c < 0x80) { putchar (c); } else if (c < 0x800) { putchar (0xC0 | c>>6); putchar (0x80 | c & 0x3F); } else if (c < 0x10000) { putchar (0xE0 | c>>12); putchar (0x80 | c>>6 & 0x3F); putchar (0x80 | c & 0x3F); } else if (c < 0x200000) { putchar (0xF0 | c>>18); putchar (0x80 | c>>12 & 0x3F); putchar (0x80 | c>>6 & 0x3F); putchar (0x80 | c & 0x3F); } } } 返回类别: 教程 上一教程: .net下分层架构系统的开发技术规范(2) 下一教程: ASP.NET 打造互联网未来空间站(4) |
| 快精灵印艺坊 版权所有 |
首页 |
||