encoding for readLines() is almost useless; use file(encoding) instead
a better in.file detection: if input is a connection based on a file, it also counts as a 'file'
use encoding only if it is in iconvlist()
if input is not missing, copy it to input2, and make sure 'input' is a character string of the file path

if input is a connection, extract the filename from summary(connection)
now 'input' is the character path, and input2 is the original input (may be a connection or whatever readable)
if input2 is a character string, use file(input2, encoding), otherwise use it as is
before writing the output, make sure to use the encoding if it is not empty

this preserves user's original encoding setting
similarly Sweave2knitr() handles encoding correctly now
roxygenize
update news on encoding
bump version