#1 2016-07-19 12:00:03

Sergio
Member
Registered: 2016-07-19
Posts: 2

Encoding of strings within an array of variants.

Hi.

I have an array of variants : TVariantDynArray = array of Variant.

When I send strings (along with other types, for example TVariantDynArray.Create(0, 'ﻏ﷼ﮯﮛﮖפּⱭ♦♪♫♯☼♀♂♣♥')) from the client to the server using an interface based service, I receive garbled results on the server showing me that there is an encoding problem.

I have unsuccessfully tried "forcing" the RawUTF8 type on the string using the S2U and VariantToVariantUTF8 and now I don't know how to proceed.

Is there a way to have strings correctly received on the server? If yes, how?


Thanks for the great framework. It's the best thing I've discovered this year.

I'm using Delphi XE4.

Offline

#2 2016-07-19 12:18:00

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Encoding of strings within an array of variants.

Try to use a plain variant parameter, but store within a TDocVariant custom value, storing an array.
It should work seamlessly...

Offline

#3 2016-07-19 12:57:15

Sergio
Member
Registered: 2016-07-19
Posts: 2

Re: Encoding of strings within an array of variants.

I tried it and it worked "seamlessly" as you said.

Thank you.

Offline

Board footer

Powered by FluxBB