Skip to content
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

find_pandoc() gives annoy warning when user name is in non-latin #2527

Closed
jszhao opened this issue Nov 3, 2023 · 2 comments
Closed

find_pandoc() gives annoy warning when user name is in non-latin #2527

jszhao opened this issue Nov 3, 2023 · 2 comments
Assignees

Comments

@jszhao
Copy link

jszhao commented Nov 3, 2023

Hi there,

find_pandoc() on my system returns the correct pandoc version and directory. However, it also gives the following warning messages.

Warning messages:
1: In strsplit(info, "\n") :
  unable to translate 'User data directory: C:\Users\<c1><fa>\AppData\Roaming\pandoc' to a wide string
2: In strsplit(info, "\n") : input string 4 is invalid

The root of this warning message is raised from strsplit(info, "\n")[[1]][1] in function get_pandoc_version

If using strsplit(info, "\n", useBytes = TRUE)[[1]][1], the warning message disappears. However, I don't know if it is the right solution.

> sessionInfo()
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8 
[2] LC_CTYPE=Chinese (Simplified)_China.utf8   
[3] LC_MONETARY=Chinese (Simplified)_China.utf8
[4] LC_NUMERIC=C                               
[5] LC_TIME=Chinese (Simplified)_China.utf8    

time zone: Asia/Shanghai
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] compiler_4.3.2    fastmap_1.1.1     cli_3.6.1         htmltools_0.5.6.1
 [5] tools_4.3.2       rstudioapi_0.15.0 yaml_2.3.7        rmarkdown_2.25   
 [9] knitr_1.45        xfun_0.40         digest_0.6.33     rlang_1.1.1      
[13] evaluate_0.23    
@yihui
Copy link
Member

yihui commented Nov 3, 2023

Should be fixed now. Thanks for the report!

You can install the development version via

remotes::install_github('rstudio/rmarkdown')

Copy link

github-actions bot commented May 8, 2024

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants