简体   繁体   English

VB6通过HTTP发布XML(UTF-8)

[英]VB6 post XML (UTF-8) via HTTP

i have written visual basic 6 code. 我已经编写了Visual Basic 6代码。 It's working well but now i'm posting xml with cyrilic in UTF-8 and other site see different chars. 它工作正常,但是现在我在utf-8中发布了带有cyrilic的xml,其他站点看到了不同的字符。 I think because i read and post xml as string. 我想是因为我以字符串形式读取和发布xml。 Is there any chance to send them in utf-8? 有机会用utf-8发送它们吗?

xmlContent()=fs.GetFileContent(Replace(Me.txtOutputFileName.Text, fs.GetFileNameByPath(Me.txtOutputFileName.Text), "") & xmlFileNames(i))
xmlString = MFunctions.GetString(xmlContent())

o.Open "POST", server, False, EE_XML_EXCHANGE_ID, EE_XML_EXCHANGE_PWD

o.setRequestHeader "Content-Type", "text/xml" ' "text/xml;charset=utf-8"

o.setRequestHeader "SOAPAction", ""
o.send xmlString

Me.txtResponseHeaders = o.getAllResponseHeaders
Me.txtResponse = o.responseText

Thank you 谢谢

You seem to be posting with an explicit label of charset=utf-8 . 您似乎在使用显式标签charset=utf-8 Is that also how the server is serving the data to the other sites that report seeing different characters? 这也是服务器如何将数据提供给报告看到其他字符的其他站点的方式吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM