Convert to C++ Builder XE from C++ Builder 6 and 2007

Any information regarding the roadblocks of converting the code build in C++ Builder 6,2007 to C++ Builder XE?
0
Girish
6/20/2012 3:20:44 PM
📁 embarcadero.cppbuilder.ide
📃 2180 articles.
⭐ 1 followers.

💬 6 Replies
👁️‍🗨️ 2499 Views

On 6/20/2012 8:20 AM, Girish Duddu wrote:
> Any information regarding the roadblocks of converting the code build in C++ Builder 6,2007 to C++ Builder XE?

The big change is the default string in XE is UnicodeString rather than 
AnsiString. All VCL String properites (Text, etc.) are Unicode in XE. 
There are good white papers regarding making this transition on the 
Embarcadero EDN site. I found that most of the changes I had to make 
fell into two categories:

1) Places where I was using moving data from VCL properties to or from 
explicit AnsiString, but I could easily change to String, i.e. convert 
to Unicode.

2) Places where I had relied on the c_str() method to provide a "C" 
string. If I really needed a "C" string, I would explicitly use 
AnsiString. It's a good idea to minimize these instances.

Joe
0
Joe
6/20/2012 8:58:37 PM
On 6/20/2012 8:20 AM, Girish Duddu wrote:
> Any information regarding the roadblocks of converting the code build in C++ Builder 6,2007 to C++ Builder XE?

The big change is the default string in XE is UnicodeString rather than 
AnsiString. All VCL String properites (Text, etc.) are Unicode in XE. 
There are good white papers regarding making this transition on the 
Embarcadero EDN site. I found that most of the changes I had to make 
fell into two categories:

1) Places where I was using moving data from VCL properties to or from 
explicit AnsiString, but I could easily change to String, i.e. convert 
to Unicode.

2) Places where I had relied on the c_str() method to provide a "C" 
string. If I really needed a "C" string, I would explicitly use 
AnsiString. It's a good idea to minimize these instances.

Joe
0
Joe
6/20/2012 8:58:55 PM
Joe is quite right about default string. It took me a long time to work out that "String" changes its meaning from "AnsiString" to "UnicodeString" Also I couldn't find the following tables in the XE2 help, so I don't agree that the EDN documentation has "good white papers". NB the second table needs editung, like he first.

NB2, My attempt to edit the tables into nice columns have failed, so I hope you understand them

George.
//---------------------------------------------------------------------------
The following table shows the formatted output specifiers for the Unicode family of functions. The table shows how the format specifier is used by scanf and the Unicode family of input functions to input strings and characters.

Format specifier	scanf function 
                                        	Unicode function
    %c           	narrow    	    wide
    %C          	wide    	narrow
    %hc    	                    narrow 	narrow
    %hC    	                    narrow   	 narrow
    %lc    	                    wide    	wide
    %lC    	                    wide    	wide
    %s    	                    narrow   	 wide
    %S    	                    wide    	narrow
    %hs    	                     narrow   	 narrow
    %hS    	                    narrow    	narrow
    %ls    	                    wide    	wide
    %lS    	                    wide    	wide

The following table shows the formatted output specifiers for the Unicode family of functions. The table shows how the format specifier is used by printf and the Unicode family of output functions to output strings and characters.

Format specifier	printf function	Unicode function
    %c	narrow 	wide
    %C  	wide	narrow 
    %hc 	narrow	narrow
    %hC    	narrow	narrow
    %lc    	wide	wide
    %lC    	wide	wide
    %s    	narrow	wide
    %S    	wide	narrow
    %hs    	narrow   	narrow
     %hS    	narrow    	narrow
    %ls    	wide    	wide
    %lS    	wide    	wide


> {quote:title=Joe Pasquariello wrote:}{quote}
> On 6/20/2012 8:20 AM, Girish Duddu wrote:
> > Any information regarding the roadblocks of converting the code build in C++ Builder 6,2007 to C++ Builder XE?
> 
> The big change is the default string in XE is UnicodeString rather than 
> AnsiString. All VCL String properites (Text, etc.) are Unicode in XE. 
> There are good white papers regarding making this transition on the 
> Embarcadero EDN site. I found that most of the changes I had to make 
> fell into two categories:
> 
> 1) Places where I was using moving data from VCL properties to or from 
> explicit AnsiString, but I could easily change to String, i.e. convert 
> to Unicode.
> 
> 2) Places where I had relied on the c_str() method to provide a "C" 
> string. If I really needed a "C" string, I would explicitly use 
> AnsiString. It's a good idea to minimize these instances.
> 
> Joe

Edited by: george probyn on Jul 2, 2012 11:43 AM

Edited by: george probyn on Jul 2, 2012 11:45 AM

Edited by: george probyn on Jul 2, 2012 11:50 AM
0
george
7/2/2012 6:51:17 PM
george wrote:

> I couldn't find the following tables in the XE2 help, so I don't
> agree that the EDN documentation has "good white papers".

Joe said the EDN website, not the Help documentation, has good papers on 
Unicode migration.  See http://www.embarcadero.com/rad-in-action/migration-upgrade-center.

--
Remy Lebeau (TeamB)
0
Remy
7/2/2012 7:42:03 PM
> {quote:title=george probyn wrote:}{quote}
> Joe is quite right about default string. It took me a long time to work out that "String" changes its meaning from "AnsiString" to "UnicodeString" Also I couldn't find the following tables in the XE2 help, so I don't agree that the EDN documentation has "good white papers". NB the second table needs editung, like he first.
> 
> NB2, My attempt to edit the tables into nice columns have failed, so I hope you understand them
> 
> George.
> //---------------------------------------------------------------------------
> The following table shows the formatted output specifiers for the Unicode family of functions. The table shows how the format specifier is used by scanf and the Unicode family of input functions to input strings and characters.
> 
> Format specifier	scanf function 
>                                         	Unicode function
>     %c           	narrow    	    wide
>     %C          	wide    	narrow
>     %hc    	                    narrow 	narrow
>     %hC    	                    narrow   	 narrow
>     %lc    	                    wide    	wide
>     %lC    	                    wide    	wide
>     %s    	                    narrow   	 wide
>     %S    	                    wide    	narrow
>     %hs    	                     narrow   	 narrow
>     %hS    	                    narrow    	narrow
>     %ls    	                    wide    	wide
>     %lS    	                    wide    	wide
> 
> The following table shows the formatted output specifiers for the Unicode family of functions. The table shows how the format specifier is used by printf and the Unicode family of output functions to output strings and characters.
> 
> Format specifier	printf function	Unicode function
>     %c	narrow 	wide
>     %C  	wide	narrow 
>     %hc 	narrow	narrow
>     %hC    	narrow	narrow
>     %lc    	wide	wide
>     %lC    	wide	wide
>     %s    	narrow	wide
>     %S    	wide	narrow
>     %hs    	narrow   	narrow
>      %hS    	narrow    	narrow
>     %ls    	wide    	wide
>     %lS    	wide    	wide
> 
> 
> > {quote:title=Joe Pasquariello wrote:}{quote}
> > On 6/20/2012 8:20 AM, Girish Duddu wrote:
> > > Any information regarding the roadblocks of converting the code build in C++ Builder 6,2007 to C++ Builder XE?
> > 
> > The big change is the default string in XE is UnicodeString rather than 
> > AnsiString. All VCL String properites (Text, etc.) are Unicode in XE. 
> > There are good white papers regarding making this transition on the 
> > Embarcadero EDN site. I found that most of the changes I had to make 
> > fell into two categories:
> > 
> > 1) Places where I was using moving data from VCL properties to or from 
> > explicit AnsiString, but I could easily change to String, i.e. convert 
> > to Unicode.
> > 
> > 2) Places where I had relied on the c_str() method to provide a "C" 
> > string. If I really needed a "C" string, I would explicitly use 
> > AnsiString. It's a good idea to minimize these instances.
> > 
> > Joe
> 
> Edited by: george probyn on Jul 2, 2012 11:43 AM
> 
> Edited by: george probyn on Jul 2, 2012 11:45 AM
> 
> Edited by: george probyn on Jul 2, 2012 11:50 AM
0
george
7/2/2012 7:45:29 PM
A bit better perhaps. 

George.






The following table shows the formatted output specifiers 
for the Unicode family of functions. The table shows how
 the format specifier is used by scanf and the Unicode
 family of input functions to input strings and characters.

		
Format specifier	scanf function	Unicode function
    %c    	narrow    	wide
    %C    	wide    	narrow
    %hc    	narrow 	narrow
    %hC    	narrow   	 narrow
    %lc    	wide    	wide
    %lC    	wide    	wide
    %s    	narrow   	 wide
    %S    	wide    	narrow
    %hs    	narrow   	 narrow
    %hS    	narrow    	narrow
    %ls    	wide    	wide
    %lS    	wide    	wide

The following table shows the formatted output specifiers
 for the Unicode family of functions. The table shows how 
the format specifier is used by printf and the Unicode 
family of output functions to output strings and characters.
		

Format specifier	printf function	Unicode function
    %c	narrow 	wide
    %C  	wide	narrow 
    %hc 	narrow	narrow
    %hC    	narrow	narrow
    %lc    	wide	wide
    %lC    	wide	wide
    %s    	narrow	wide
    %S    	wide	narrow
    %hs    	narrow   	narrow
     %hS    	narrow    	narrow
    %ls    	wide    	wide
    %lS    	wide    	wide




> {quote:title=george probyn wrote:}{quote}
> Joe is quite right about default string. It took me a long time to work out that "String" changes its meaning from "AnsiString" to "UnicodeString" Also I couldn't find the following tables in the XE2 help, so I don't agree that the EDN documentation has "good white papers". NB the second table needs editung, like he first.
> 
> NB2, My attempt to edit the tables into nice columns have failed, so I hope you understand them
> 
> George.
> //---------------------------------------------------------------------------
> The following table shows the formatted output specifiers for the Unicode family of functions. The table shows how the format specifier is used by scanf and the Unicode family of input functions to input strings and characters.
> 
> Format specifier	scanf function 
>                                         	Unicode function
>     %c           	narrow    	    wide
>     %C          	wide    	narrow
>     %hc    	                    narrow 	narrow
>     %hC    	                    narrow   	 narrow
>     %lc    	                    wide    	wide
>     %lC    	                    wide    	wide
>     %s    	                    narrow   	 wide
>     %S    	                    wide    	narrow
>     %hs    	                     narrow   	 narrow
>     %hS    	                    narrow    	narrow
>     %ls    	                    wide    	wide
>     %lS    	                    wide    	wide
> 
> The following table shows the formatted output specifiers for the Unicode family of functions. The table shows how the format specifier is used by printf and the Unicode family of output functions to output strings and characters.
> 
> Format specifier	printf function	Unicode function
>     %c	narrow 	wide
>     %C  	wide	narrow 
>     %hc 	narrow	narrow
>     %hC    	narrow	narrow
>     %lc    	wide	wide
>     %lC    	wide	wide
>     %s    	narrow	wide
>     %S    	wide	narrow
>     %hs    	narrow   	narrow
>      %hS    	narrow    	narrow
>     %ls    	wide    	wide
>     %lS    	wide    	wide
> 
> 
> > {quote:title=Joe Pasquariello wrote:}{quote}
> > On 6/20/2012 8:20 AM, Girish Duddu wrote:
> > > Any information regarding the roadblocks of converting the code build in C++ Builder 6,2007 to C++ Builder XE?
> > 
> > The big change is the default string in XE is UnicodeString rather than 
> > AnsiString. All VCL String properites (Text, etc.) are Unicode in XE. 
> > There are good white papers regarding making this transition on the 
> > Embarcadero EDN site. I found that most of the changes I had to make 
> > fell into two categories:
> > 
> > 1) Places where I was using moving data from VCL properties to or from 
> > explicit AnsiString, but I could easily change to String, i.e. convert 
> > to Unicode.
> > 
> > 2) Places where I had relied on the c_str() method to provide a "C" 
> > string. If I really needed a "C" string, I would explicitly use 
> > AnsiString. It's a good idea to minimize these instances.
> > 
> > Joe
> 
> Edited by: george probyn on Jul 2, 2012 11:43 AM
> 
> Edited by: george probyn on Jul 2, 2012 11:45 AM
> 
> Edited by: george probyn on Jul 2, 2012 11:50 AM
0
george
7/2/2012 7:50:42 PM