How to fix degree symbol not showing correctly in R on Linux/Fedora 31

Here are two solutions for your problem using R (ver3.6.3 2020-02-29) / R Studio (ver1.2.5033) running on a Fedora 31 VirtualBox VM:

1) Insert the unicode character using custom scales to produce the correct symbols (include N/S or E/W depending on your long/lat):

#install.packages("ggplot2")
#install.packages("sf")
library("ggplot2")
library("sf")

nc <- st_read(system.file("shape/nc.shp", package="sf"))

ggplot() +
  geom_sf(data = nc) +
  scale_x_continuous(labels = function(x) paste0(x, '\u00B0', "W")) +
  scale_y_continuous(labels = function(x) paste0(x, '\u00B0', "N"))

2) Downgrade the pango library. In Fedora 31, pango was upgraded to 1.44, which affects bitmap fonts like the default R-Studio font due to the switch from Freetype to HarfBuzz. Downgrading the package fixes rendering of special characters system-wide. This should solve the problem in Fedora 32 as well (untested).

sudo dnf downgrade --releasever 30 pango-1.43.0-4.fc30.x86_64

This is not so much an answer as some diagnostics to try, which are too long to put in a comment.

Note that the "strange symbol" you see is what you get when a symbol is not available in the specified font.

Before we get stuck into diagnostics, also note that from ?plotmath:

On Unix-alikes: In a UTF-8 locale any Unicode character can be entered, perhaps as a \uxxxx or \Uxxxxxxxx escape sequence, but the issue is whether the graphics device is able to display the character. The widest range of characters is likely to be available in the X11 device using cairo: see its help page for how installing additional fonts can help. This can often be used to display Greek letters in bold or italic.

In non-UTF-8 locales there is normally no support for symbols not in the languages for which the current encoding was intended.

Now some things to try to investigate the cause:

1. To get info about your locale

Sys.getlocale()

2. To see your default x11 settings:

X11.options()

We are especially interested in the type to see if the x11 device is using cairo. If it is not, try setting the cairo option in X11.options() to see if that helps

3. To see which characters are available enter the following:

TestChars <- function(...)
{
  info = l10n_info()
  r <- c(32:126, 160:254)
  par(pty = "s")
  plot(c(-1,10), c(20,260), type = "n", xlab = "", ylab = "", xaxs = "i", yaxs = "i")
  grid(11, 24, lty = 1)
  mtext(paste("MBCS:", info$MBCS, "  UTF8:", info$`UTF-8`, "  Latin:", info$`Latin-1`))
  for(i in r) try(points(i%%10, 10*i%/%10, pch = i, font = 5,...))
  points(6,170, col='red', cex=5)
}
TestChars()

On my system it looks like this (note I drew a circle to highlight symbol 176, the one you are having issues with).

enter image description here

4. to see which symbols are available on other graphics devices

Try using the TestChars function on different devices, to see if any of them have a complete set. For example,

cairo_pdf()
TestChars()
dev.off()

If after trying these things you are still stuck, enter the diagnostic results back into your question in case they can help others to resolve the issue.