Click here to Skip to main content
15,900,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..

With a small client program to send data to a server that listen on 8001 port I'm trying. But I send data on a server chinese characters appear in the information received and only then going on a server problem does not appear when tested on other servers, all data goes smoothly. Server's client program is going full data gone. Can I be in a place I doing wrong.

Note: Listener server is korean made.


my code:

Dim Baglanti As New TcpClient
Dim Data As NetworkStream


connect

Baglanti.Connect(IPBox.Text, PortBox.Text)
Data = Baglanti.GetStream()


Data send

Dim GidenVeri() As Byte = Encoding.UTF8.GetBytes(TextBox5.Text)
Data.Write(GidenVeri, 0, GidenVeri.Length)
Data.Flush()


close

Baglanti.Close()



listener output ( my problems)


RecvData:[幞偞偞㉉〰ㄵㄴ㤱帱乐䕍啓⁔䕃䱙乁偞䵓偞幁䉐幁ぐ㈱⸷㠰ㄮ㠹帲幞偟幞卞卞幓協㔳㔵〹〷㌰呞ぃ㌰呞卄剁⁉匨剅⥏呞ㅐ呞䭎乁呞㄰䅄ⵈ′匨䵅⁁䅂䅓⩔⤪呞㈰卓⁋䅃䥌䅓幎ご䐳䡁㈭⠠䕓䅍䈠十呁⨪帩ご临䅈䥎幋ご〵彞卓卞幓協㔳㔵〹〷㠰呞ぃ㠰呞䵄剏⠠䕈䅍佔佌䥊帩偔帱乔䅋幎ご䐱䡁㈭⠠䕓䅍䈠十呁⨪帩ご匲䭓䌠䱁卉乁呞㌰䅄ⵈ′匨䵅⁁䅂䅓⩔⤪呞㐰䡎乁䭉呞㔰帰卟幓卓呞㍓㔵㤵㜰〰帱䍔〰帱䑔䅓䥒⠠䥂余帩偔帱乔䅋幎ご䐱䡁㈭⠠䕓䅍䈠十呁⨪帩ご匲䭓䌠䱁卉乁呞㌰䅄ⵈ′匨䵅⁁䅂䅓⩔⤪呞㐰䡎乁䭉呞㔰帰卟幓卓呞㍓㔵㤵㜰〰帲䍔〰帲䑔䅓䥒⠠䵉⥍呞ㅐ呞䭎乁呞㄰䅄ⵈ′匨䵅⁁䅂䅓⩔⤪呞㈰卓⁋䅃䥌䅓幎ご䐳䡁㈭⠠䕓䅍䈠十呁⨪帩ご临䅈䥎幋ご〵彞卓卞幓協㔳㔵〹〷〱呞ぃ〱呞卄奉䡁⠠䕓䥄⥍呞ㅐ呞䭎乁呞㄰䅄ⵈ′匨䵅⁁䅂䅓⩔⤪呞㈰卓⁋䅃䥌䅓幎ご䐳䡁㈭⠠䕓䅍䈠十呁⨪帩ご临䅈䥎幋ご〵彞卓幞彞�]
Posted

1 solution

Ok my problem was solved. I solved the problem as follows:

I changed this line and worked successfully.

Dim GidenVeri() As Byte = Encoding.Unicode.GetBytes(Textbox5.text)


Thanks to everyone.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900