ascii encoding

E

edi sol

Hi,

I want to convert byte array to a string using ascii encoding. I use
asciiEncoding.GetChars (asciiEncoding is ascii encoding instance).

I want symbols greater than 127 to be represented with '.' symbol (not
with '?') or another.

How could I do this?

Thanks.
 
M

Mattias Sjögren

I want symbols greater than 127 to be represented with '.' symbol (not
with '?') or another.

How could I do this?

Loop through the byte array and replace any value > 127 with (byte)'.'
before using the Encoding class.


Mattias
 

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

Top