将 UTF-8 字符发送到 WCF 服务
如何配置 WCF 服务/客户端以将 UTF-8 字符发送到服务? 我想发送挪威语、芬兰语、罗马尼亚语文本,例如“ţşîăâăâşţŞŢĂΔ 我的绑定是这样的:
<basicHttpBinding>
<binding name="myBindingConfiguration" receiveTimeout="00:21:00"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text"
transferMode="Buffered"
useDefaultWebProxy="true"
textEncoding="utf-8"
>
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None"/>
</binding>
</basicHttpBinding>
How can i configure WCF service / client to send UTF-8 characters to the service?
I want send norwegian, finnish, romanian text like this "ţşîăâăâşţŞŢĂÎÂ"
My binding is like this:
<basicHttpBinding>
<binding name="myBindingConfiguration" receiveTimeout="00:21:00"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text"
transferMode="Buffered"
useDefaultWebProxy="true"
textEncoding="utf-8"
>
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None"/>
</binding>
</basicHttpBinding>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无需配置。默认情况下,basicHttpBinding 已使用 UTF-8 文本编码。
There's no configuration necessary. basicHttpBinding already uses UTF-8 text encoding by default.