Microsoft SQL Server UTF-16

Hello!

I am currently developing an app with electron framework (JS/HTML with chromium) and Xojo for the back office.

Xojo/App are talking each other via Ajax.
And Xojo does connect to databases.

Conenction to Microsoft SQL Server leads to the German umlauts problem and as I have read MS SQL Server does use UTF-16BE encoding.

Any hint if I can use Xojo to map/convert/interpret from UTF-16 to UTF-8?

Charset at html site is

<meta charset="UTF-8">

Any info/Hint really apreciated!

Thank in advance!

ConvertEncoding?

Thanks for the hint.

Tried with ConvertEncoding; did not work.
Anyway I will check this way again…

I think you need to DEFINE the Encoding of the Text you read from the Database and then CONVERT it to UTF-8. :slight_smile:

So it is…

T = F.StringValue.DefineEncoding(Encodings.ISOLatin1).ToText()

I like new Text type;-)

If you are sure that the database is giving you UTF16, you really should define to that and then convert to UTF8.