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

ASCII encryption

P: n/a
I'm trying to encrypt a string into ASCII, and it seems to encrypt fine,
but when I write it to my SQL Server database all the ASCII chars
between 128-159 and 191-255 are replaced with the ? symbol. I know that
ASCII values 128-159 aren't supported by Windows and 191-255 are
non-English characters, but I've never had a problem with these
characters before when encrypting stuff in VB6.

Can anybody help me out with this?
Cheers,

Mike

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Mike P <mr*@telcoelectronics.co.uk> wrote:
I'm trying to encrypt a string into ASCII, and it seems to encrypt fine,
but when I write it to my SQL Server database all the ASCII chars
between 128-159 and 191-255 are replaced with the ? symbol. I know that
ASCII values 128-159 aren't supported by Windows and 191-255 are
non-English characters, but I've never had a problem with these
characters before when encrypting stuff in VB6.


There *are* no ASCII characters above 127.

See http://www.pobox.com/~skeet/csharp/unicode.html

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
Nov 13 '05 #2

P: n/a
Mike P <mr*@telcoelectronics.co.uk> wrote:
I thought ASCII goes from 0-127 and the extended character set from
128-255?


No. There are various things which people call "the extended [ASCII]
character set" - which means that when one person says they're using
it, no-one really knows which they mean. It's basically a term which
should be avoided if you have any interest in actually conveying useful
and unambiguous information about the encoding you're using.

Specifying the Windows code page (eg 437, 850 etc) on the other hand,
is more useful. Specifying a standardised character encoding (eg ISO-
8859-1, UTF-8 etc) is even better.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.