character encoding for SQL query incorrect in RStudio Cloud but same Rmd and credentials work correctly in local RStudio

I have run into what seems to be an encoding problem and am looking for advice on how to further pinpoint the issue.

I am teaching a course where we use RMariaDB to connect to a MariaDB server and run various queries. We run the queries in SQL chunks with the heading {sql connection =con}. Everything working fine but when the queries result in characters outside the basic ascii character set I get correct results in my local copy of RStudio but incorrect results when running in RStudio cloud.

Here is an example. These are band names.

In RStudio local, a particular artist name is shown as:


and the same artist in RStudio Cloud is:


(I just checked the preview and both seem to be displaying here as they do in my output.)

So the encoding for the table on MariaDB is latin1, which is the obvious thing to change, but I just tried changing the encoding to utf8 (there were two options and I tried them both) and I am seeing the same issue.

Any advice on what this could be and how to track it down?

Thank you so much!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.