Send UTF-8 character to WCF service

2019-07-24 06:01发布

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条回答
Luminary・发光体
2楼-- · 2019-07-24 06:21

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

查看更多
登录 后发表回答