.Net unicode problem, vb6 legacy -


I have a decryption routine in VB6. Now I want the same decryption in C # string which requires decryption is in Unicode, so I use encoding to read the input in C # .UnicodeGetString. The input looks exactly like the VB6.

The first few letters in the loop are decrypted properly! So I'm getting a difference ... The program parses the '~' character with a different indicator compared to VB6.

When debugging I see in VB and in the following. Net:
VB6 ~ code 152
c # ~ = code 732

No need to say, decryption fails. I need to get 152 for the character described above.

What's wrong here?

Regards,

Michael

Your VB6 was not reading Unicode (I guess in the Windows-1252 codepage), which is why That it is back with a different character code.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -