-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
But what is the content of the byteArray, exactly? I mean, when I did this:
~ char[] charArray = "Hello World!\u03a0".ToCharArray();
~ byte[] byteArray = new
byte[Encoding.Unicode.GetByteCount(charArray, 0, charArray.Length)];
~ Encoding.Unicode.GetBytes(charArray, 0, charArray.Length,
byteArray, 0);
// Get string from the byte array
~ string challenge = Encoding.Unicode.GetString(byteArray, 0,
byteArray.Length);
~ Console.WriteLine(challenge);
The challenge is printed just fine (Hello World! plus the PI symbol). So
it really depends on what the initial content of your bytearray is. If
you convert it to ascii, what is the content? Can you print it?
Mark Relly wrote:
| When I say seeing the contents of the string yes I do mean using
| System.WriteLine.
|
| The code below
| challenge = Encoding.Unicode.GetString(byteArray,0,byteArray.Length);
|
| Console.WriteLine(challenge);
|
| Will give me the output "???????????????????????"
|
| Which is unfortunate as I cannot "see the contents" in a usefull way
|
| Regards
|
| Mark
- --
Ray Hsieh (Ray Djajadinata) [SCJP, SCWCD]
ray underscore usenet at yahoo dot com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Thunderbird -
http://enigmail.mozdev.org
iD8DBQE/oR5TwEwccQ4rWPgRApgmAJ9aRG8H5riwm4ZEjjoiU4gO+1SstACeL0fw
95ZqTQ5TFnpebIeb90DTUeU=
=uWun
-----END PGP SIGNATURE-----