title: Does R's package support unicode rd file?
body: <p>My platform is:</p>
  
  <pre><code>Win7 64
  Rtudio
  R3.1.3
  devtools 1.8.0
  Rxygen2 4.1.1
  </code></pre>
  
  <p>I am trying to make a package of my own. I need to describe the function by unicode. I used Roxygen2 to generate the Rd file. The code is very simple(I removed the real function just know how to make a package):</p>
  
  <p>xxxx means comment made by unicode.</p>
  
  <pre><code>#' eastChoice
  #' @param fn.kind wind xxxxxx
  #' @param estChoice.Path wind
  #' @return data.frame
  #' @export
  #' @examples
  #' getIndByEastChoice("20150108.csv")
  getIndByEastChoice &lt;- function(fn.kind){
    d &lt;- data.frame(a=c(1,2,3), b=c(4,5,6))
    dt &lt;- data.table::data.table(d)
  }
  </code></pre>
  
  <p>When I check(devtools) the R code, it always failed. The following error information is given:</p>
  
  <pre><code>* checking PDF version of manual ... WARNING
  LaTeX errors when creating PDF version.
  This typically indicates Rd problems.
  LaTeX errors found:
  ! Package inputenc Error: Unicode char \u8:��&lt;87&gt; not set up for use with LaTeX.
  
  See the inputenc package documentation for explanation.
  Type  H &lt;return&gt;  for immediate help.
  </code></pre>
  
  <p>At first I thought that the Roxygen2 does not support unicode other than ASCII, but I read the Rd file generated by Roxygen2, it is OK. 
  And then I just use build&amp;Reload function(using devtools), to my suprise, it passed. </p>
  
  <p>And then I add more unicode comment in the R file and checked(devtools) it again. It is like the following:</p>
  
  <pre><code>#' eastChoice xxxxxx
  #' @param fn.kind wind xxxxx
  #' @param estChoice.Path wind xxxxxxxx
  #' @return data.frame xxxxxxx
  #' @export
  #' @examples
  #' getIndByEastChoice("20150108.csv")
  getIndByEastChoice &lt;- function(fn.kind){
    d &lt;- data.frame(a=c(1,2,3), b=c(4,5,6))
    dt &lt;- data.table::data.table(d)
  }
  </code></pre>
  
  <p>It failed as I expected, but other information was given and seems more serious:</p>
  
  <pre><code>* checking whether package 'ftools.temp' can be installed ... ERROR
  Installation failed.
  See 'D:/onedrive/program/R.package/ftools.temp.Rcheck/00install.out' for details.
  </code></pre>
  
  <p>So I checked the log:</p>
  
  <pre><code>* installing *source* package 'ftools.temp' ...
  ** R
  ** preparing package for lazy loading
  ** help
  *** installing help indices
  wrong in gsub("&amp;", "&amp;amp;", x, fixed = TRUE) : '&lt;86&gt;'multi byte string is wrong
  * removing 'D:/onedrive/program/R.package/ftools.temp.Rcheck/ftools.temp'
  </code></pre>
  
  <p>And this time build&amp;load also failed.</p>
  
  <p>So I think that maybe the R does not support unicode other ASCII in its RD file? Can any one confirm it? If it is true, I will not waste my time trying to solve this problem. </p>
  
  <hr>
  
  <p>@hrbrmstr
  Thank you. I have tried your advice. First, I added the line "Encoding:UTF-8" in the decription file,  and then saved .R and DESCRIPTION with coding UTF-8 to ensure that the encode is correct. And I run the "check " function, but I got the same error:</p>
  
  <pre><code>strsplit(txt, "\n", fixed = TRUE)���о���: �������ַ���1����UTF-8
  * checking examples ... OK
  * checking PDF version of manual ... WARNING
  LaTeX errors when creating PDF version.
  This typically indicates Rd problems.
  ����: ��������'"D:/R/R-31~1.3/bin/x64/Rcmd.exe" Rd2pdf  --batch --no-preview --build-dir="C:/Users/kanpu/AppData/Local/Temp/RtmpgFjyKw/Rd2pdf15f2c22b7768d" --no-clean -o  ftools.temp-manual.pdf  "D:/onedrive/program/R.package/ftools.temp.Rcheck/ftools.temp"'��״̬��1
  LaTeX errors found:
  ! Package inputenc Error: Unicode char \u8:��&lt;97&gt; not set up for use with LaTeX.
  </code></pre>
  
  <p>The DESCRIPTION is like this:</p>
  
  <pre><code>Package: ftools.temp
  Type: Package
  Title: Just try to make a package
  Version: 0.1
  Date: 2015-08-25
  Author: None
  Maintainer: no one &lt;none@somewhere.net&gt;
  Description: Just try to make a package
  License: CPL
  LazyData: TRUE
  Encoding:UTF-8
  Depends:
    data.table
  </code></pre>