Understanding the changes to Strings on 9.2


(Rodrigo Gómez) #1


I’ve just installed the latest gamma of 9.2 and I’m rebuilding my apps.

I had to change basically every part of my app where I had, for instance, UTF8String types, to use the UnicodeString. This for both the server and the client. The _Intf file and so on were also changed to reflect this by the codegen tools automatically. I’m using C++Builder 10.1 Berlin.

My question is: what happens with older clients? For the readmes and so on I understand that the serialization works fine for older types, but I don’t really understand if that means that older clients, using still the older types, will be able to talk with a newer server.

My plan is to update the clients also to use the newer types, but from time to time customers don’t update all the apps at the same time, so I need to know and be prepared if there will be issues. I also plan to try here in my office this case, but I would like some more assurance or warnings from RO in this case :slight_smile:

In a related note: I was able to use the latest build from C++Builder without having to do nor fix anything. No apparent problems so far with the codegen/headers or anything like that. Great!


(EvgenyK) #2

old pre-compiled clients will work as expected because serialization wasn’t changed itself.

for backward compatibility we have this define in RemObjects.inc

  // codegen4: use AnsiString/UTF8Strings

after uncommenting and rebuilding RO packages, RO 9.1 clients/servers that used AnsiString/UTF8String types will work as before.

(Rodrigo Gómez) #3

Thanks Evgeny,

I did some quick tests yesterday with a 9.2 server and a 9.1 client and had no problems, as you say.

I’m not interested in having the old style strings. For me UnicodeString is good (actually I always wondered why that type was not available from ServiceBuilder, etc.), so I don’t expect to enable that $DEFINE.

Thanks for your confirmation.

(EvgenyK) #4

actually, UnicodeString is used instead of WideString at generation of files