Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: xerces-C++的XmlCh是双字节的,但是unix平台的wchar_t是4字节的

4 views
Skip to first unread message

<Test/>

unread,
Dec 31, 2010, 8:29:18 PM12/31/10
to
int byte2_to_byte4(char* src, char* des)
{
if(NULL == src || NULL == des)
return -1;
int flag = 0;
int n = 0;
while(2 != flag)
{
*des = *src;
if(0 == *des)
flag ++;
else if(0 != flag)
flag = 0;
des++;
src++;
n++;
//注锟斤拷锟斤拷小锟剿伙拷锟斤拷锟斤拷
if(0 == n%2)
{
*des++ = 0;
*des++ = 0;
}
}
return 0;
}

锟斤拷 锟斤拷 daishu59 (daishu59) 锟侥达拷锟斤拷锟斤拷锟结到: 锟斤拷
: 锟斤拷锟斤拷solaris平台锟斤拷使锟斤拷xerces-C++锟斤拷锟斤拷锟街o拷xerces锟皆讹拷锟斤拷锟絏mlCh锟斤拷双锟街斤拷short,锟斤拷
平台锟较碉拷wchar_t锟斤拷4锟斤拷锟街节碉拷,锟斤拷锟斤拷直锟斤拷锟矫★拷锟斤拷锟斤拷锟絚har锟侥伙拷
: XMLPlatformUtils::Initialize();
: XMLCh nameStr[100]="abc";
: ...................

--
[1;36mHappy XMLing


[m [32m锟斤拷 锟斤拷源:锟斤拷水木锟斤拷锟斤拷 http://newsmth.net锟斤拷[FROM: 114.249.209.*] [m

0 new messages