Moving From Delphi7 to Delphi XE or 2010 for Unicode?
Asked Answered
H

2

6

ive a news server Built on Delphi7, using Indy9 TIdTCPServer, and the clients are using TClientSocket from ScktComp for size, and the traffic is encrypted in RC4 (string)

what exactly do i need to make my app work on XE or 2010 with Unicode support? what of these things will i have to change?

Hope answered 12/11, 2010 at 12:42 Comment(0)
M
5

Unicode has introduced in Delphi 2009, so if you want the unicode support you can do it with Delphi 2009.

But if you are going to upgrade, get the latest one, you can get all the benefits of Delphi 2010 with less bugs and more Third party tools bundled with Delphi XE.

the other problem may you face is the translation between Indy 9 to Indy 10, because unicode support added to Indy 10, but also it's not 100% compatible with Indy 9.

I suggest you to try to compile your application with Delphi 7 and Indy 10, then move later to Delphi XE with Indy 10.

Muffler answered 12/11, 2010 at 13:47 Comment(1)
the bundled version of indy 9 and indy 10 has some bugs, but you can get it directly from indyproject website which has much better version than the bundled one.Muffler
M
0

Don't know if Indy 9 is still supported on XE and 2010. Indy 10 has improvements but also some breaking changes. Moving binary data into strings is IMHO never a good choice, but depending the situation it could just need some minor changes. What you exactly need depends on your application code - without actually looking at it is difficult to say. All string manipulation routine should be checked, especially if you use them as low-level binary buffers, and the select which path is best to port them to the Unicode world.

Monophony answered 12/11, 2010 at 13:22 Comment(5)
for example : result := RC4(memo1.text, 'password');, im using bare strings, dunno if thats what u mean?Hope
1) Memo1.text will be UnicodeString. 2) The constant password as well, as result, if it is of type string. Is the RC4 function able to cope with that?Monophony
@killercode: encryption functions like RC4 and hashing functions like MD5 are not meant to be run on strings; they are meant to hash bytes. Make sure you get the same array of bytes in Delphi 7 and your Unicode Delphi, and the encryption and hashing will work fine. Even running them on strings will fail in non-unicode Delphi versions (like Delphi 7) if you use them with 'high-bit non ASCII' characters on systems with different character encodings.Hypnotism
r u pointing that they will work better under Unicode Versions of delphi?Hope
Indy 9 DOES NOT support D2009 and later, and never will.Ecklund

© 2022 - 2024 — McMap. All rights reserved.