-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support unicode characters. #38
Comments
Do you have |
Thanks for your response, but adding "\usepackage[utf8]{inputenc} did not help, and it also caused a warning: *** you should not be loading the inputenc package |
Oh, you are using XeLaTeX... Then I guess it will be difficult to solve. This gives me yet another motivation to rewrite a literate programming engine to replace the old good Sweave... although in this case it is not the fault of Sweave, but I see the difficulty for add-on packages to be compatible with Sweave again. |
I get a message that implies that the problem is tex, not pgfSweave:
Also, the α character is present the tex-file that pgfSweave produces. I think this issue should be closed - not a bug.
|
As I said, this is just a tip of the iceberg which reveals fundamental design flaws of Sweave:
For this particular issue, you got α probably because your native locale is UTF8 so you do not need to tell (pgf)Sweave your encoding. |
I get the following error when run the following code to dowload a PDF url <- "http://ccjcc.lacounty.gov/LinkClick.aspx?fileticket=HcUb-Mi2foo%3d&portalid=11" Any ideas on how to make it run? Thanks |
Even when using luatex or xetex, it appears that pgfsweave will remove some unicode characters.
For example,
<<>>=
"α"
@
produces the output
[1] ""
There also seems to be a problem sometimes with detecting the encoding.
For example,
<<>>=
α <- 1
@
produces an error:
Error: chunk 1
Error in parse(text = chunk) : 1:0: unexpected input
1: Î
^
In addition: Warning messages:
1: âa.Rnw’ has unknown encoding: assuming Latin-1
2: In strsplit(msg, "\n") : input string 1 is invalid in this locale
Execution halted
My locale is en_US.UTF8, and I have no problems using these unicode characters directly in R and in latex.
locale:
[1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C
[3] LC_TIME=en_US.utf8 LC_COLLATE=en_US.utf8
[5] LC_MONETARY=C LC_MESSAGES=en_US.utf8
[7] LC_PAPER=en_US.utf8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_2.13.1
The text was updated successfully, but these errors were encountered: