Hi,
I am having a real issue with sending data across a network.
I have a string that is composed of the following:
NEW|192.168.0.12|_000000038|_000000001|_000000109| 312886|1|0|_000000001|C|AUTO-ASSIGN|??| ||EN|
I am using the method below to send this string to another systemover tcp that accepts the data over port 5021.
All data is transferred to the other system except the "??". Thisis in hindi or it can be in any other language. The problemarises when the other system receives the data; the "??" isdisplayed as ???. How do i send a string in a diffrent languageover TCP. Your help is appreciated.
public string GetToken(string tosend)
{
try
{
m_socWorker = new Socket(AddressFamily.InterNetwork,SocketType.Strea m, ProtocolType.Tcp);
string szIPSelected = GetIPaddress();
string szPort =System.Configuration.ConfigurationSettings.AppSet tings["RemotePort"];
int alPort = System.Convert.ToInt16(szPort,10);
System.Net.IPAddress remoteIPAddress =System.Net.IPAddress.Parse(szIPSelected);
System.Net.IPEndPoint remoteEndPoint = newSystem.Net.IPEndPoint(remoteIPAddress, alPort);
m_socWorker.Connect(remoteEndPoint);
Object objData = tosend;
byte[] byData =System.Text.Encoding.ASCII.GetBytes(objData.ToStr ing ());
m_socWorker.Send(byData);
}
}
Thanks
--------------------------------
From: Siddharth Sood
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>mpIke1qAK0CsYWPVfplw4A==</Id>