GetFeatureValue encodingSolved

Hi!

Usin Xojo, i have a custom license field calles expiry_date. wich is a date/time field.

When I try to convert that field in my app, by retrieving it via GetFeatureValue("expiry_date"), I can se in the debugger that i get the correct date.

But when i send this date to my date functions I get a date from the 16'th century 🙂

I see that the string returney from GetFeatureValue("expiry_date") is encoded, how do i decode the string so my applications date function understands it

/Ronny

Hey Ronny,

On Windows TurboActivate returns UTF16 strings, on Unix (Linux, Mac, Android, etc.) TurboActivate returns UTF8 strings.

In Xojo, the actual "string data" is stored in a "WString" object on Windows, and on other platforms the string data is stored in a "CString" object.

So, short answer: all strings are Unicode. The particular type of Unicode depends on the platform details (and historical quirks, like UTF8 not existing when Windows implemented Unicode strings, thus they're "stuck" with UTF16 as a Windows API default).

great, converted it to utf-8 and works fine now, thanks