how to convert ASCII stram to Unicode string

J

Jay

Hi,
I am passing a char array through infrared socket.In .net compact
framework I am using IrDAClient class to get the stream.This stream
I'll read in byte array. I want to convert the ASCII byte array to
Unicode string. How to do that?

Thanks
Jayshri
 
N

Norman Rericha

You can use the System.Encoding class. It supports ASCII, Unicode, UTF7
and UTF8.


--
I hope this helps

--
Norman Rericha
Senior Software Engineer
Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member
 
A

Alex Feinman [MVP]

To expand slightly:
string sAscii = Encoding.ASCII.GetString(arrBytes, 0, numBytes);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top