Closed dracodoc closed 2 years ago
Easier way to trigger the warning:
> library(fontawesome)
> fa_i("file")
Warning message:
In mget(objectNames, envir = ns, inherits = TRUE) :
strings not representable in native encoding will be translated to UTF-8
I have the same problem (with a a german or english locale).
For example the exclamation-triangle
icon throws a warning but renders fine in a shiny app.
This Font Awesome icon ('exclamation-triangle') does not exist:
* if providing a custom `html_dependency` these `name` checks can
be deactivated with `verify_fa = FALSE`
When I use fontawesome::fa_i("exclamation-triangle")
the warning is shown as well and the icon renders (shiny::icon calls fa_i after all) but when I use fontawesome::fa("exclamation-triangle")
, it throws an error and no icon is shown.
This is now fixed in https://github.com/rstudio/fontawesome/pull/96.
With shiny::icon() calling fontawesome::fa_i(), there is a check for v4 icon names. With a fresh R session, this process will generate a warning even when icon name is a valid v5 name.
This is a simple shiny app, icon used is valid in both v4 and v5.
It seemed that fa_i checked icon name and didn't find any problem, but still this checking process generated warning when there are some string encoding issues in fa_tbl$v4_name. This might be related to my Chinese locale, but I think it still need to be fixed in some way.
My session info