-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pander can not encode UTF-8 in rows or columns #280
Comments
This report seems to be similar to #228 -- are you on Windows? Can you please share your |
Thanks a lot for coming back to me so quick, here is the sessioninfo: Yours, |
Thanks for the details! Runnig here works OK: Although I'm on Linux and using UTF-8 locale. Can you pls also try to set the locale to UTF-8? |
You are absolutely correct, seems to be a windows problem. It worked on my linux vbox. |
Might be related to some internal Rcpp stuff, but AFAIK we pass all headers + table body to the same functions. cc @RomanTsegelskyi for confirmation BTW can you please let me know, @NaserMonsefi, how you created this |
I originally noticed the problem, importing a data set using
The files is encoded in UTF-8 and have header names with the UTF-8 beta in it. |
I have been having the same problem, also on Windows. Thanks Naser, |
I tested #326 in a Windows VM started and seems to do the trick, but please confirm. |
Should be fixed with the above commit. |
@daroczig, I just had the same issue. Is there a way that I could help in some way to release a new version of pander with this fix (and all others that have been made)? |
@billdenney you mean a CRAN release? I will need to look into the CI builder as seems to be failing and do a general check-up on the package ... I have not really touched it for a while. I can do that in a few weeks hopefully, but would appreciate any help someone running all the tests and |
Hi,
I was using pander with a matrix containing UTF-8 col names and released that pander can not recognise them. I dig a little deeper and noticed that actually pander have no problem with UTF-8 characters anywhere else beside row or col names. Further, I noticed that pander encodes them from UTF-8 to latin1 but for some reason this doesn't happen for row or col names. I made a small matrix to test this and it looks like this:
The encoding for this data shows that the first two are UTF-8 (β) with longer tail on beta and the two others are latin1 (ß) with chopped beta tail. This is true for the rownames and colnames as well.
Now if it is passed to pander it looks as follow:
First pander encoded all the UTF-8 (β) in the matrix to latin1 (ß) and printed them. But for some reason this doesn't happen for row and col names. Pander was only able to print the latin1 (ß) correctly in rows and cols.
My question is first, how can I make sure that pander actually print UTF-8 in the row and col as well? Also it is preferred if it actually pass them as UTF-8 not as latin1 in the matrix and for rows and cols.
Thanks,
Naser
The text was updated successfully, but these errors were encountered: