本人(C#开发)遇到该问题的解决办法:使用System.Web.HttpUtility.UrlEncode(也可尝试用utf8等编码格式进行转换)将需要传入的参数转码,然后再将转码后的字符串转换为字节,最后传入,问题解决!
附
错误代码:
where = MC + " like '%" + 参数值 + "%'";
byte[] xml = this.Encoding.GetBytes(strXml + where);
解决后代码:
where = MC + " like '"+ System.Web.HttpUtility.UrlEncode("%" + 参数值 + "%") +"'";
byte[] xml = this.Encoding.GetBytes(strXml + where);