By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,060 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

[Help] Client Server Question

P: n/a
hi,

i build some client server application which work with sockets
(System.Net.Sockets)

and when i m sending data (Hebrew text) from the server to the client and
backward i m getting the text not so well (gibberish or some thing not
readable)

any idea ?

Best Regards ,

Tiraman :-)
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
hi,

i m using this kind of code to send the data

Dim oSWriter As New IO.StreamWriter(client.GetStream) ' the client is
TcpClient
oSWriter.Write(data & vbCr)
oSWriter.Flush()

and i m reading the data by doing this

sText = Encoding.ASCII.GetString(readBuffer, 0, BytesRead)

Thanks For your Help.
"David Williams" <Da***********@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
How are you transfering the text? It sounds like the method that you are using is not fully Unicode aware, or at least is not using the Unicode
encoding class.
HTH
--
David Williams, VB.NET MVP
"Tiraman" wrote:
hi,

i build some client server application which work with sockets
(System.Net.Sockets)

and when i m sending data (Hebrew text) from the server to the client and backward i m getting the text not so well (gibberish or some thing not
readable)

any idea ?

Best Regards ,

Tiraman :-)

Nov 20 '05 #2

P: n/a
you might want to try Encoding.Unicode.GetString(readBuffer, 0, BytesRead)
instead of the ASCII version..

imran.
"Tiraman" <ti*****@netvision.net.il> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
hi,

i m using this kind of code to send the data

Dim oSWriter As New IO.StreamWriter(client.GetStream) ' the client is
TcpClient
oSWriter.Write(data & vbCr)
oSWriter.Flush()

and i m reading the data by doing this

sText = Encoding.ASCII.GetString(readBuffer, 0, BytesRead)

Thanks For your Help.
"David Williams" <Da***********@discussions.microsoft.com> wrote in message news:D8**********************************@microsof t.com...
How are you transfering the text? It sounds like the method that you are
using is not fully Unicode aware, or at least is not using the Unicode
encoding class.

HTH
--
David Williams, VB.NET MVP
"Tiraman" wrote:
hi,

i build some client server application which work with sockets
(System.Net.Sockets)

and when i m sending data (Hebrew text) from the server to the client

and backward i m getting the text not so well (gibberish or some thing not
readable)

any idea ?

Best Regards ,

Tiraman :-)


Nov 20 '05 #3

P: n/a
Thanks i will try it.

"Imran Koradia" <no****@microsoft.com> wrote in message
news:#Q**************@TK2MSFTNGP12.phx.gbl...
you might want to try Encoding.Unicode.GetString(readBuffer, 0, BytesRead)
instead of the ASCII version..

imran.
"Tiraman" <ti*****@netvision.net.il> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
hi,

i m using this kind of code to send the data

Dim oSWriter As New IO.StreamWriter(client.GetStream) ' the client is
TcpClient
oSWriter.Write(data & vbCr)
oSWriter.Flush()

and i m reading the data by doing this

sText = Encoding.ASCII.GetString(readBuffer, 0, BytesRead)

Thanks For your Help.
"David Williams" <Da***********@discussions.microsoft.com> wrote in

message
news:D8**********************************@microsof t.com...
How are you transfering the text? It sounds like the method that you are
using is not fully Unicode aware, or at least is not using the Unicode
encoding class.

HTH
--
David Williams, VB.NET MVP
"Tiraman" wrote:

> hi,
>
> i build some client server application which work with sockets
> (System.Net.Sockets)
>
> and when i m sending data (Hebrew text) from the server to the client and
> backward i m getting the text not so well (gibberish or some thing

not > readable)
>
> any idea ?
>
> Best Regards ,
>
> Tiraman :-)
>
>
>



Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.