473,320 Members | 1,921 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,320 software developers and data experts.

ASCII encryption

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

Similar topics

113
by: Bonj | last post by:
I was in need of an encryption algorithm to the following requirements: 1) Must be capable of encrypting strings to a byte array, and decyrpting back again to the same string 2) Must have the same...
3
by: JSM | last post by:
Hi, I am just trying to port an existing simple encryption routine to C#. this routine simply adds/substracts 10 ascii characters to each character in a text file (except quotes). The routine...
1
by: Paul W | last post by:
Hi - I'm doing simple XOR encryption on a password before storing it in a cookie. I use the same 2-way encryption/decryption routine at each end (before writing/after reading). Something is getting...
5
by: Sia Jai Sung | last post by:
Hi, I have a class that I modify from a sample program, like below ========================================== Imports System Imports System.Web.UI Imports System.Security.Cryptography ...
5
by: daz_oldham | last post by:
Hi I am using the RijndaelManaged encryption method in C#, but when I decode my string, the byte array is returning several ASCII null values at the end of my string, which is represented by...
4
by: pintu | last post by:
Hello everybody.. I hav some confusion regarding asymmetric encryption.As asymmetric encryption it there is one private key and one public key.So any data is encrypted using private key and the...
1
by: =?Utf-8?B?bWljcm9ob2Y=?= | last post by:
Short version: Is there a way to configure (preferably programmatically) the max encryption strength that will be used by the framework when connecting to a particular SSL-protected web service? ...
22
by: j1mb0jay | last post by:
I have had to create a simple string encryption program for coursework, I have completed the task and now have to do a write up on how it could be improved at a later date. If you could look...
6
by: Kate77 | last post by:
Hi, Im trying to build simple encryption, I use char d="a" int intASC = System.Convert.ToInt32(d); to convert it, and play with it, now I want to change it (d) back for the original ascii...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.