dput() helppage says: "Writes a textual representation of the ASCII object R". Therefore, if your object contains non-ASCII characters, they cannot be represented and must be converted in some way.
Therefore, I suggest you use iconv() to convert your vector to dput ing. One approach:
> test <- "Gwena\xeblle M" > out <- iconv(test, from="latin1", to="ASCII", sub="byte") > out [1] "Gwena<eb>lle M" > gsub('<eb>', 'รซ', out) [1] "Gwenaรซlle M"
which, as you can see, works in both directions. You can use gsub() to reverse convert bytes to characters (if your encoding supports it, e.g. utf-8).
The second approach is simpler (and I prefer it for your needs), but it works unilaterally, and your libiconv may not support it:
> test <- "Gwena\xeblle M" > iconv(test, from="latin1", to="ASCII//TRANSLIT") [1] "Gwenaelle M"
Hope this helps!
Theodore lytras
source share