473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

[Help] Client Server Question

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
3 1024
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Lorenzo | last post by:
hi you all, first of all apologies for having cross-posted this message but really i did not know where to post it. please let me know what ng you consider the most suitable for the described...
46
by: Kingdom | last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc. I'm using Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM Parts_Table") ...
12
by: Frank Hauptlorenz | last post by:
Hello Out there! I have a DB2 V7.2 Database (Fix11) on Win 2000 Professional. It was before a NT 4 based Domain - now it is a Win 2000 Domain. The database server is a domain member. Now...
4
by: Jm | last post by:
I'm trying to set up ASP.NET on my Windows 2000 server w/ IIS 5 and MS ISA Server. Here's what I have done so far without any luck. Here's the results from the pages I've created...
7
by: Mahesh Devjibhai Dhola | last post by:
Hi, I want to develop p2p (peer-to-peer) communication connection for chat in ..Net (Lang: c# - preferable) NOTE: if two LAN are behind their own router then also it should work as yahoo, msn...
8
by: pamelafluente | last post by:
I am beginning aspNet, I know well win apps. Need a simple and schematic code example to start work. This is what I need to accomplish: ---------------------- Given button and a TextBox on a...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
17
by: Timothy.Rybak | last post by:
Hello all, This is my first attempt at an application, so kid gloves are appreciated. I need to make a very simple form that only has a few elements. One is TraceCode - a text field that is...
12
by: smerf | last post by:
I have searched high and low (and even in some places I'd like to forget I ever saw) for the information that will tell me exactly how the Nat2Nat server for UltraVNC works (not just a vague...
6
by: zaina | last post by:
hi everybody i am nwebie in this forum but i think it is useful for me and the member are helpful my project is about connecting client with the server to start exchanging messages between...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.