Special Characters UTF-8

Hello!

Yes finally solved the problem.

Basically SQL server guy helped out by checking that the database was all set up correctly... using SSMS - we checked that each column was nvarchar(255) - which he assured me was what we needed.

From my Apps perspective - Another thing it does apart from get information from a database is to append the database according to stuff user inputs. Even if the input looked to be in UTF-8 format (and indeed was in UTF-8 Format according to Notepad ++) - the database connection string needed to specify not that the encoding was 'UTF-8' but that the encoding was 'windows-1252'

  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 = 'windows-1252')

NOTE: I am still unsure why UTF-8 doesn't work when running locally? Ideas would be welcome here. Also I presume that if my app was running locally on a Mac or Linux machine we'd have problems -however my company is all windows so hopefully this shouldn't be a problem (Unless windows 1252 encoding can change from one windows machine to another - I have no idea TBH)

To solve the problem of Local vs Running on ShinyApps I used a config.yml file. This means that the encoding can be changed from Windows 1252 to UTF-8.

image

Thanks for all the help! :slight_smile:

2 Likes