问题
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