读byte[]的时候不要用默认的ANSI,用Unicode试试

解决方案 »

  1.   

    stl是不是该有个使用utf-8的标志啊
      

  2.   

    我也有这个问题,vc中
    Reader->RPCStruct->childNodes->Getitem(i)->text得到的是xml文件中的字符串,即MTIzNA==,但希望得到字符串1234,该怎么办?
      

  3.   

    用XML WebService传递字节数组时是怎么编码的?
    我把字符串"1234"转成字节数组后传递时在XML文件里变成了MTIzNA==如下:
    -----SoapResponse at 2004-9-20 15:32:19
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <soap:Body><CommProcessArrResponse xmlns="http://tempuri.org/">
      <CommProcessArrResult>0</CommProcessArrResult>
      <pbyt>MTIzNA==</pbyt>
      <intSize>5</intSize>
      </CommProcessArrResponse>
     </soap:Body>
    </soap:Envelope>在.net下能很容易的读出来,可在vc下怎么读出来啊?
    .net如何把字节数组转换成XML文件的轩?为什么 1234 变成了 MTIzNA== ?
      

  4.   

    OK搞定了,MTIzNA==是1234的base64编码,解码即可