There could be multiple issues in this post:
First, please do not try shiny < 0.10.1. That will only waste your
time. The article
http://shiny.rstudio.com/articles/unicode.html
stated clearly that the support was only available since shiny 0.10.1.
The next time if you want to try anything, please start from the
latest CRAN release. If that does not work, try
devtools::install_github('rstudio/shiny') to see if the problem still
exists; if it does, it is time to report to us. We certainly
appreciate it if you test multiple previous versions, but sometimes it
is probably not worth it.
Your Windows locale is English_United States.1252, which means you are
unlikely to be able to run that example by definition, since the
example uses Simplified Chinese characters. To run it, you may have to
change your system locale to Simplified Chinese (go to the Control
Panel -> Region and Language -> find the button to change the locale;
you can keep the display language as English, unless you can read
Chinese).
You said you "copied" the example, and copying text does not guarantee
what its encoding will be under Windows. You should download the
example from
https://github.com/rstudio/shiny-examples You can either
clone the GIT repo, or just download it if you do not know GIT:
https://github.com/rstudio/shiny-examples/archive/master.zip Then
unzip it, and run the example 022. This guarantees you will not change
the original encoding by accident. If your OS does not support Chinese
characters, it will not work even if you save the file as UTF-8.
Once you are in a Chinese locale, makes sure the file encoding is
UTF-8, **and** have Chinese fonts available (to show Chinese
characters in the plot), you should be able to run the example under
Windows.
For Ubuntu, the encoding is not an issue (the default locale is often
base on UTF-8). I'm surprised that the example did not work. I suspect
you copied the files from Windows, instead of using our original
example files in the Github repo.
Regards,
Yihui