String to Text question re encodings

In the past, I thought I had to make sure code like

MyRecordSet.Field("FirstName").StringValue.ToText

had to include reference to encodings, like

MyRecordSet.Field("FirstName").StringValue.DefineEncoding(Encodings.UTF8).ToText

Otherwise I would get a runtime error. But this no longer seems necessary. Has something changed in Xojo with respect to this?

Using Xojo 2017r3.

It must mean the encoding is already defined.

[quote=419616:@Ralph Alvy]In the past, I thought I had to make sure code like

MyRecordSet.Field("FirstName").StringValue.ToText

had to include reference to encodings, like

MyRecordSet.Field("FirstName").StringValue.DefineEncoding(Encodings.UTF8).ToText

Otherwise I would get a runtime error. But this no longer seems necessary. Has something changed in Xojo with respect to this?

Using Xojo 2017r3.[/quote]

I think for this the default encoding is UTF8 so nothing extra needed. See

http://documentation.xojo.com/api/databases/database.htmlField.StringValue

This seems odd. I definitely used to get a runtime error because of not referencing encoding in such a situation. But now I don’t. I do see now in the documentation that the default encoding is UTF8 when extracting StringValue from a SQLite database, which is what I’m doing here. Perhaps this became the default in a recent version of Xojo.

Or perhaps I saw this runtime error when using StringValue.ToText to extract data from a nonTEXT field in SQLite (e.g., an INTEGER field).