Message-ID: <53ZCdU$E9W@newsmth.net>
Subject: Re: xerces-C++��XmlCh��双�纸诘模�����unix平台��wchar_t��4�纸诘�
Date: Sat, 01 Jan 2011 01:29:18 +0000
From: thinkhy@newsmth.net-SPAM.no (<Test/>)
Path: 74.82.202.154!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-cn.bbs.comp.xml.mbox.zip!g2news2.google.com!news1.google.com!news.glorb.com!news.neu.edu.cn!news.byr.edu.cn!news.newsmth.net!NEWSMTH
Newsgroups: cn.bbs.comp.xml
Organization: 水木����
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: XML/x/M.1293845358.30
Xref: 74.82.202.154 cn.bbs.comp.xml:7788

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++�����郑�xerces�远����XmlCh��双�纸�short,��
平台�系�wchar_t��4���纸诘�,����直���谩������char�幕�
:     XMLPlatformUtils::Initialize();
:     XMLCh nameStr[100]="abc";
: ...................

--
Happy XMLing


�� ��源:��水木���� http://newsmth.net��[FROM: 114.249.209.*]