daqana / tikzDevice

A R package for producing graphics output as PGF/TikZ code for use in TeX documents.
https://daqana.github.io/tikzDevice
132 stars 26 forks source link

remove redundant code that might mess the string #158

Closed jszhao closed 6 years ago

jszhao commented 7 years ago

Force encoding a string of unknown encoding will mess the string. And enc2utf8 do the better. So the removed code is redundancy and might be harmful, and cause warning, such as:

Warning message:
In strsplit(string, "") : input string 1 is invalid UTF-8

Closes #156.

jszhao commented 7 years ago

it's a pull request to https://github.com/yihui/tikzDevice/issues/156.

jszhao commented 7 years ago

I don't know why it not pass the checks. I also don't know how to close this pull request. It seems that I have not remove the argument of encoding="UTF-8", and I don't update the help page of the function.

yihui commented 7 years ago

Thanks! Don't worry about the failed test. I don't think it is relevant to your change.

@krlmlr Any ideas why it failed? https://travis-ci.org/yihui/tikzDevice/builds/218475233

krlmlr commented 6 years ago

Thanks!