title: Using non-ASCII characters inside functions for packages
body: <p>I'm trying to write a function equivalent to <code>scales::dollar</code> that adds a pound (£) symbol to the beginning of a figure. Since the scales code is so robust, I've used it as a framework and simply replaced the $ for the £. </p>
  
  <p>A stripped-down function example:</p>
  
  <pre><code>pounds&lt;-function(x) paste0("£",x)
  </code></pre>
  
  <p>When I run a CHECK I get the following:</p>
  
  <pre><code>Found the following file with non-ASCII characters:
    pounds.R
  Portable packages must use only ASCII characters in their R code,
  except perhaps in comments.
  Use \uxxxx escapes for other characters.
  </code></pre>
  
  <p>Looking through the <em>Writing R extensions</em> guide it doesn't give a lot of help (IMO) on how to resolve this issue.  It mentions the \uxxxx and says it refers to Unicode characters.</p>
  
  <p>Looking up unicode characters yields me the code <code>&amp;#163</code> but the guidance I can find for <code>\uxxxx</code> is minimal and relates to Java on W3schools.</p>
  
  <p>My question is thus:</p>
  
  <p><strong>How do you implement the usage of non-unicode characters in R functions using the \uxxxx escapes and how does the usage affect the display of such characters after the function has been used?</strong></p>