Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-22 Thread jo...@jorisgoosen.nl
Hello Tomas, On Mon, 21 Dec 2020 at 21:21, Tomas Kalibera wrote: > Hi Joris, > > On 12/21/20 7:33 PM, jo...@jorisgoosen.nl wrote: > > Hello Tomas, > > Thank you for the feedback and your summary of how things now work and > what goes wrong for the tao- and mathot-string confirms all of my > susp

Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-21 Thread Tomas Kalibera
Hi Joris, On 12/21/20 7:33 PM, jo...@jorisgoosen.nl wrote: > Hello Tomas, > > Thank you for the feedback and your summary of how things now work and > what goes wrong for the tao- and mathot-string confirms all of my > suspicions. And it also describes my exact problem fairly well. > > It seems

Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-21 Thread jo...@jorisgoosen.nl
Hello Tomas, Thank you for the feedback and your summary of how things now work and what goes wrong for the tao- and mathot-string confirms all of my suspicions. And it also describes my exact problem fairly well. It seems it does come down to R not keeping the UTF-8 encoding of the literal strin

Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-18 Thread Tomas Kalibera
Hi Joris, thanks for the example. You can actually simply have Test.R assign the two variables and then run Encoding(utf8StringsPkg1::mathotString) charToRaw(utf8StringsPkg1::mathotString) Encoding(utf8StringsPkg1::tao) charToRaw(utf8StringsPkg1::tao) I tried on Linux, Windows/UTF-8 (the experi

Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-18 Thread jo...@jorisgoosen.nl
Hello Tomas, I have made a minimal example that demonstrates my problem: https://github.com/JorisGoosen/utf8StringsPkg This package is encoded in UTF-8 as is Test.R. There is a little Rcpp function in there I wrote that displays the bytes straight from R's CHAR to be sure no conversion is happeni

Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-18 Thread Tomas Kalibera
On 12/17/20 6:43 PM, jo...@jorisgoosen.nl wrote: > > > On Thu, 17 Dec 2020 at 18:22, Tomas Kalibera > wrote: > > On 12/17/20 5:17 PM, jo...@jorisgoosen.nl > wrote: >> >> >> On Thu, 17 Dec 2020 at 10:46, Tomas Kalibera >>

Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-17 Thread jo...@jorisgoosen.nl
On Thu, 17 Dec 2020 at 18:22, Tomas Kalibera wrote: > On 12/17/20 5:17 PM, jo...@jorisgoosen.nl wrote: > > > > On Thu, 17 Dec 2020 at 10:46, Tomas Kalibera > wrote: > >> On 12/16/20 11:07 PM, jo...@jorisgoosen.nl wrote: >> > David, >> > >> > Thanks for the response! >> > >> > So the problem is a

Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-17 Thread Tomas Kalibera
On 12/17/20 5:17 PM, jo...@jorisgoosen.nl wrote: > > > On Thu, 17 Dec 2020 at 10:46, Tomas Kalibera > wrote: > > On 12/16/20 11:07 PM, jo...@jorisgoosen.nl > wrote: > > David, > > > > Thanks for the response! >

Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-17 Thread jo...@jorisgoosen.nl
Ps. I will try to have a go at using your experimental version to see if that could help us out. If I run into trouble I will mail you personally. On Thu, 17 Dec 2020 at 17:17, jo...@jorisgoosen.nl wrote: > > > On Thu, 17 Dec 2020 at 10:46, Tomas Kalibera > wrote: > >> On 12/16/20 11:07 PM, jo.

Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-17 Thread jo...@jorisgoosen.nl
On Thu, 17 Dec 2020 at 10:46, Tomas Kalibera wrote: > On 12/16/20 11:07 PM, jo...@jorisgoosen.nl wrote: > > David, > > > > Thanks for the response! > > > > So the problem is a bit worse then just setting `encoding="UTF-8"` on > > functions like readLines. > > I'll describe our setup a bit: > > So

Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-17 Thread Tomas Kalibera
On 12/16/20 11:07 PM, jo...@jorisgoosen.nl wrote: David, Thanks for the response! So the problem is a bit worse then just setting `encoding="UTF-8"` on functions like readLines. I'll describe our setup a bit: So we run R embedded in a separate executable and through a whole bunch of C(++) magic

Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-16 Thread jo...@jorisgoosen.nl
David, Thanks for the response! So the problem is a bit worse then just setting `encoding="UTF-8"` on functions like readLines. I'll describe our setup a bit: So we run R embedded in a separate executable and through a whole bunch of C(++) magic get that to the main executable that runs the actua