本文介绍了通过NetworkStream编写唯一字符(üûùúýýþ)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用网络流发送文本üûùúýýþ"?
我通过networkstream发送后,它变成"???????"即时通讯使用ASCII编码.我尝试更改为Unicode编码,但无法正常工作.

这是我的代码,可以正常使用字母,麻木和符号等普通字符:

How can i send text "üûùúýýþ" using network stream??

after i send it via networkstream, it become "???????" im using ASCII encoding. i try to change to Unicode encoding, and its not working.

This is my Code, its work fine with normal character like alphabets, numbes and symbols :

Public Sub SendRequest(ByVal str As String, ByVal cl As clsTcpClient)
    Try
        Dim strm As NetworkStream = cl.GetStream

        strm.Write(Encoding.ASCII.GetBytes(str), 0, str.Length)
        gvar_status = "Idle"
    Catch ex As Exception
        gvar_status = "Failed"
    End Try
End Sub



谢谢.



Thanks.

推荐答案


这篇关于通过NetworkStream编写唯一字符(üûùúýýþ)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 05:21