tags:

views:

606

answers:

4

We have large commercial app that we want to convert from Delphi 6 to 2010. Approx 10 3rd party component sets, all with source code... I have heard warnings about Unicode with 2010 - Does anyone have experience and or suggestions?

+1  A: 

i've been in the same circumstance recently. you mostly need to pay attention to the "edges" of the app. INI files, file I/O, log files, etc. win API calls from delphi work since they've now connected the unicode API calls instead. check each 3rd party component set to make sure they're at least ready for Delphi 2009...better yet 2010. even my use of databases simply wasn't an issue...nearly everything worked right away. it just wasn't a big deal. anything that relies on the size of a character should be reviewed.

really the transition of most concern is 2007_or_earlier --> 2009_or_later.

there are plenty of discussions/blog entries about it. you could read, read, read...or you could get started & see what happens. (i did some of both). i'm sure there are "stack overflow" issues discussing your question. i'm not pretending to give a detailed description of what could happen.

it's simply not as scary as it sounds.

X-Ray
+7  A: 

There are many resources available that you can read and that you will assist in the migration from Delphi 6 to Delphi 2009/2010 (Unicode).

You can use these articles as a guide.

Bye.

RRUZ
Don't forget the Unicode session I gave on CodeRage4, it contains even more reference material: http://wiert.wordpress.com/2009/09/11/coderage-4-session-using-unicode-and-other-encodings-in-your-programs-chat-and-qa-transcripts/
Jeroen Pluimers
@Jeroen, Great Video, Added ;)
RRUZ
+1  A: 
lkessler
+1  A: 

Approx 10 3rd party component sets, all with source code.

One thing I'd add is if the component doesn't support Delphi 2009/2010, don't try to upgrade it by hacking the code.

Following is what I posted on How do the new string types work in Delphi 2009/2010?:

See Delphi and Unicode, a white paper written by Marco Cantù and I guess The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!), written by Joel.

One pitfall is that the default Win32 API call has been mapped to use the W (wide string) version instead of the A (ANSI) version, for example ShellExecuteA If your code is doing tricky pointer code assuming internal layout of AnsiString, it will break. A fallback is to substitute PChar with PAnsiChar, Char with AnsiChar, string with AnsiString, and append A at the end of Win32 API call for that portion of code. After the code actually compiles and runs normally, you could refactor your code to use string (UnicodeString).

eed3si9n