Francois,
        Below you said:  "Simply do a search and replace to change all
occurrences of String type to AnsiString type. The compiler will
automatically convert AnsiString to UnicodeString when it is necessary. This
will work although you will not 
benefit from Unicode."

        I realize I'm missing something obvious here, but why won't it
benefit from Unicode if the strings are converted?

from "Robert Meek" dba "Tangentals Design"
Creative Concepts Programming for Windows Vista
E-mail:  ffo...@comcast.net
"Most people would sooner die than think; in fact, they do so!"
        [Bertrand Russell  1872-1970]

-----Original Message-----
From: delphi-talk-boun...@elists.org [mailto:delphi-talk-boun...@elists.org]
On Behalf Of Francois PIETTE
Sent: Sunday, May 03, 2009 12:58 PM
To: Delphi-Talk Discussion List
Subject: Re: Delphi 2009 and Strings

> Borland may have made a change that will cause us to leave Delphi.  The
> change in strings is creating a near epic conversion for us.  We use a lot
> of third party controls and apparently it was pretty common to interchange
> AnsiString with String as well as use functions like StrPas.

Bad code. Always tell programmer to use the correct datatype for what he is 
doing. If his code depends on strings being composed of ansi (8 bits) 
characters, then always tell him to use AnsiString. This is true for many, 
many versions now and for any strong typed language anyway. If his code 
doesn't depends on character size, then it is OK to use string and it will 
works unchanged with Delphi 2009.

> So now we have
> weeks of hacking through code casting, changing, etc.  After our pilot
> project to convert a small set of controls that normally would take about
> ten minutes to upgrade to the latest Delphi over about three days.  The 
> boss
> is asking if we would be better off spending that time and money 
> converting
> our client to C#.  This could be the end for us using Delphi.  Shame.

Converting to C# would be tremendously more time consuming and you'll have 
the risk to introduce a huge number of bugs because not only will you change

language but also all components and runtime.

> The big dumb question of the day is there any directive to turn off
> UnicodeString or to force String to be defined the old way?

Simply do a search and replace to change all occurences of String type to 
AnsiString type. The compiler will automatically convert AnsiString to 
UnicodeString when it is necessary. This will work altough you will not 
benefit from Unicode.

By the way, if you need help porting old Delphi code to Delphi 2009, my 
company provide such consulting services. Feel free to contact me by email.

Regards,
--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk

__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk

Reply via email to