Skip to content
This repository has been archived by the owner on Mar 23, 2020. It is now read-only.

FTable in Shiny and characters "ö", "ä", "ü" and "õ" not being shown correctly #120

Open
Mait22 opened this issue Apr 14, 2016 · 3 comments
Labels

Comments

@Mait22
Copy link

Mait22 commented Apr 14, 2016

Hello,

If I create FTable object and add it to Word document then Estonian characters “õ”, “ä”, “ö”, “ü” show up just nice.

But if I use the same FTable object in Shiny app by firstly converting it to html using function as.html and then render the table to output by renderUI the characters “õ” “ä”, “ö” and “ü” are not shown correctly. I.e. word “töötajatesse” is being displayed as “ töötajatesse”.

Is there any workaround for this problem or I am just doing something wrong here?

Thanks in advance,
Mait

@davidgohel
Copy link
Owner

Hi

I bet you are with a Windows OS. I am on a mac and it's working as expected - I think it will work on Linux also.

Is it displayed correctly with a standard div?

div("õäöü")

@Mait22
Copy link
Author

Mait22 commented Apr 15, 2016

Hello,

Firstly, my sincere thanks for answer!

Yes, I am using Windows PC. The combination of output$test <- renderUI({div("öäõü")}) on server side and uiOutput("test") on UI side renders fine in Shiny app.

The following workaround helped in my case:

    output$FT_o <- renderUI({
        tf <- as.html(transposed_means_FT())
        tf <- gsub("ö", "ö", tf) 
        tf <- gsub("ü", "ü", tf) 
        tf <- gsub("ä", "ä", tf) 
        tf <- gsub("õ", "õ", tf)
        return(div(HTML(tf), class = "shiny-html-output"))
    })

I have previously also experienced the problem that in Linux environment (Shinyapps.io) the text that shows ok on PC does not show those multibyte characters and vice-versa.

With Best Regards,
Mait

@davidgohel
Copy link
Owner

OK,

Thanks for that

I will try to fix it but it could take time (I need to have a Windows system and I need to better understand how all these encodings are working :( )

KR,
David

@davidgohel davidgohel added the bug label Apr 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants