Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2011-11

UnicodeStrings - Variant conversion

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alexander Shishkin

Currently assigning UnicodeString to variant converts string to WideString and makes variant of type varOleStr.
I think it should be varUString and w|o any conversion (also this is delphi compatible). But the question is which type should be if WideString=UnicodeString?

Reply by email

Paul Ishenin
to Alexander Shishkin

14.11.11 11:02, Alexander Shishkin пишет:

Show quoted text 5 lines
Currently assigning UnicodeString to variant converts string to WideString and makes variant of type varOleStr. I think it should be varUString and w|o any conversion (also this is delphi compatible). But the question is which type should be if WideString=UnicodeString?

I don't remember exactly but it is seems to me that delphi also uses unicodestring for WideStrings on osx.

If this is ideed so it will be easy to check.

Best regards,
Paul Ishenin

Reply by email

Sven Barth
to Paul Ishenin
Paul Ishenin wrote 11 lines
14.11.11 11:02, Alexander Shishkin пишет: > Currently assigning UnicodeString to variant converts string to > WideString and makes variant of type varOleStr. > I think it should be varUString and w|o any conversion (also this is > delphi compatible). But the question is which type should be if > WideString=UnicodeString? I don't remember exactly but it is seems to me that delphi also uses unicodestring for WideStrings on osx. If this is ideed so it will be easy to check.

Somehow I wish that Delphi stayed on Windows... now we have to pay attention to Delphi compatibility on other platforms as well... :(

Regards,
Sven

Reply by email

Alexander Shishkin
to Alexander Shishkin: Currently assigning UnicodeString to variant converts string to WideString and makes…

14.11.2011 7:02, Alexander Shishkin пишет:

Show quoted text 10 lines
Currently assigning UnicodeString to variant converts string to WideString and makes variant of type varOleStr. I think it should be varUString and w|o any conversion (also this is delphi compatible). But the question is which type should be if WideString=UnicodeString? _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

But real problem is that varUString is not supported by RTL. ( Variant<->UnicodeString assignment can be easily overriden with operator overloading). Sрould I write custom variant manager also to work with unicode?

Reply by email