Text Encoding - ASCII

A

Amjad

Hi,
Why do I get this character (ÿ) when I try to display the
blank ASCII character number 255?

MsgBox (Chr(255))

I think I need to set the text encoding to ASCII somehow,
but I don't know how. Any ideas?
 
H

Herfried K. Wagner [MVP]

* "Amjad said:
Why do I get this character (ÿ) when I try to display the
blank ASCII character number 255?

There is no ASCII character. ASCII has only characters from 0 to 127,
it's a 7 bit encoding.
 
A

Amjad

Thanks.
How can I receive (in a string) only ASCII characters
from the user's input textbox and simply ignore non-ASCII
characters if there was any?

Amjad
 
M

Mattias Sjögren

Amjad,
How can I receive (in a string) only ASCII characters
from the user's input textbox and simply ignore non-ASCII
characters if there was any?

That sounds like a great way to make non-English users hate your
application.

But if you really want to do it, I suppose you could scan the string
for any characters with a value >=128, since the first 128 characters
of Unicode are the same as the ASCII IIRC.



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