c#-php socket_read() 接受C# 发送的字节数组 byte[] ,汉字出现乱码。

WBOY
Release: 2016-06-02 11:27:57
Original
1348 people have browsed it

乱码c#socketphp

如标题,在C#中,用系统函数
socket.BeginReceive(resultByte, 0, resultByte.Length, System.Net.Sockets.SocketFlags.None, new AsyncCallback(this.OnDataReceived), socket);
resultString = Encoding.Unicode.GetString(resultByte, 0, Count);

<code>            这个resultString是正常接收返回,但是PHP中用socket_read()读取出来的确有乱码问题,可能是中文编码的问题。            求大神该怎么解决啊?</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!