Send UTF-8 character to WCF service

妖精的绣舞 提交于 2019-12-11 12:10:31

问题


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>

回答1:


There's no configuration necessary. basicHttpBinding already uses UTF-8 text encoding by default.



来源:https://stackoverflow.com/questions/2056642/send-utf-8-character-to-wcf-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!