Hi Josh
I followed the link above for odbc and have tried both suggested methods but I have yet been able to get ShinyApps.io to display UTF-8 Characters correctly when querying my database. (Although it works fine when running the app locally)
In SQl Server Management Studio... Running
SELECT @@Version
... gives "Microsoft SQL Azure (RTM) - 12.0.2000.8 Dec 4 2019 21:24:18 Copyright (C) 2019 Microsoft Corporation"
The collation of the database is SQL_Latin1_General_CP1_CI_AS
However I have also tried running the following code to change the collation of specific columns to UTF-8
ALTER TABLE dbo.Translations ALTER COLUMN [To] VARCHAR(50) COLLATE Latin1_General_100_CI_AI_SC_UTF8
When querying the data base I have tried setting to both latin1 and utf-8 but cant seem to find a combination which does anything other than work fine locally but not work when publishing to ShinyApps.io
DBI_Connection <- dbConnect(odbc(),driver = conn_args$driver,server = conn_args$server,database = conn_args$database,port = conn_args$port,UID = conn_args$uid,PWD = conn_args$pwd,
encoding = "UTF-8")
DBI_Connection <- dbConnect(odbc(),driver = conn_args$driver,server = conn_args$server,database = conn_args$database,port = conn_args$port,UID = conn_args$uid,PWD = conn_args$pwd,
encoding = "latin1")
I have also tried setting the encoding of the collected data using Encoding() but that doesn't seem to work.
I have a meeting with our SQL guy in a few hours (I dabble but am certainly not an expert!) so hopefully he will be able to shine some light on this issue.