similar to: Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF

Displaying 20 results from an estimated 500 matches similar to: "Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF"

2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
Can we use the "bytes" encoding for such environment variables invalid in the current locale? The following patch preserves CE_NATIVE for strings valid in the current UTF-8 or multibyte locale (or non-multibyte strings) but sets CE_BYTES for those that are invalid: Index: src/main/sysutils.c =================================================================== --- src/main/sysutils.c
2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
On 1/31/23 09:48, Ivan Krylov wrote: > Can we use the "bytes" encoding for such environment variables invalid > in the current locale? The following patch preserves CE_NATIVE for > strings valid in the current UTF-8 or multibyte locale (or > non-multibyte strings) but sets CE_BYTES for those that are invalid: > > Index: src/main/sysutils.c >
2023 Jan 31
2
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
>>>>> Tomas Kalibera >>>>> on Tue, 31 Jan 2023 10:53:21 +0100 writes: > On 1/31/23 09:48, Ivan Krylov wrote: >> Can we use the "bytes" encoding for such environment variables invalid >> in the current locale? The following patch preserves CE_NATIVE for >> strings valid in the current UTF-8 or multibyte locale (or
2023 Jan 31
2
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
Tomas, I think you're not addressing the actual issue which is a clear regression in Sys.getenv() [because it used to work and still works for single env var, but not a list] and the cryptic error due to that regression (caused by changes in R-devel). So in either case, Sys.getenv needs fixing (i.e., this should really go to the bugzilla). Its behavior is currently inconsistent. The quoted
2008 Oct 28
2
A question about the API mkchar()
Hi guys, I've got a question about the API mkchar(). I have met some difficulty in parsing utf-8 string to mkchar() in R-2.7.0. I was intending to parse an utf-8 string str_jan (some Japanese characters such as?, whose utf-8 code is E381B5) to R API SEXP mkChar(const char *name) , we only need to create the SEXP using the string that we parsed. Unfortunately, I found when parsing the
2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
> On 31 Jan 2023, at 12:51 , Tomas Kalibera <tomas.kalibera at gmail.com> wrote: > > > On 1/31/23 11:50, Martin Maechler wrote: <snippage> >> hmm.., that's a pity; I had hoped it was a pragmatic and valid strategy, >> but of course you are right that type stability is really a >> valid goal.... >> >> In general, what about behaving close
2010 Jun 19
1
more powerful iconv
R community, As you may know, R's iconv doesn't work well converting to and from encodings that allow embedded nulls. For example > iconv("foo", to="UTF-16") Error in iconv("foo", to = "UTF-16") : embedded nul in string: '\xff\xfef\0o\0o\0' However, I don't believe embedded nulls are at issue here, but rather that R's iconv
2011 Aug 04
1
slightly speeding up readChar()
Hi, I was trying to have R read files faster with readChar(). That was before I noticed that readChar() is not that bad! In any case, below I suggest a few simple changes that will make readChar slightly faster. I followed readChar(useBytes=T), and tried to identify all O(N) operations, where N is the size of the file. The assumption is that for LARGE files we want to avoid any O(N) operations,
2020 May 18
1
ether-wake
> Actually you are not correct. > > > 1st: I didn't quote the wikipedia article,? someone sent that as an > answer to my previous post. > > ?? (similar mindset probably, as in your response) > > 2: You are wrong,? broadcast packets, like for example DHCP, and also > WOL (if UDP), can be routed, by > > the means of ip helper addresses and directed broadcasts
2018 Apr 26
1
embeded R application on Windows prints broken character.
The issue was reported to me for?https://github.com/randy3k/rtichoke/issues/50 which is a python program which embeds R and provides a interface to R. With R 3.5,?for reason which i don't understand, when I typed `"a"` in the console STDOUT got `"\x02\xff\xfea\x03\xff\xfe"`?with the extra escaped characters. I notice that `\x02\xff\xfe` and `\x03\xff\xfe` are encoding
2010 May 16
1
Reading JPEG file, converting to HEX
Colleagues, I am using R to assemble RTF documents (which are plain text). I need to embed a JPEG graphic that was created with R. I presume that the steps need to be: a. read the file into R b. convert the object to HEX format c. write the converted object to a textfile. If I read the file into R using readLines, I get the following (only the first 5 lines shown): > >
2006 Oct 26
1
Error: invalid multibyte string
I'm observing the following on different platforms: > parse(text='"\\x7F"') expression("\177") > parse(text='"\\x80"') Error: invalid multibyte string ... > parse(text='"\\xFF"') Error: invalid multibyte string However, cat("\x7F\n\x80\n...\xFF\n") works. Using R --vanilla. SYSTEMS GIVING THE ERROR: >
2013 Sep 09
2
Invalid UTF-8 with gsub(perl=TRUE) and iconv(sub="")
Hi! I experience an error with an invalid UTF-8 character passed to gsub(..., perl=TRUE); the interesting point is that with perl=FALSE (the default) no error happens. (The character itself was read from an invalid HTML file.) Illustration of the error: gsub("a", "", "\U3e3965", perl=FALSE) # [1] "\U3e3965" gsub("a", "",
2017 Jun 11
1
translateChar in NewName in bind.c
I see another thing in function 'NewName' in bind.c. In else if (*CHAR(tag)) , 'ans' is basically copied from 'tag'. Could the whole thing there be just the following? ans = tag; It seems to me that it can also replace ans = R_BlankString; in 'else'; so, else if (*CHAR(tag)) and else can be merged to be just else . --------------------------------------------
2017 Mar 13
2
virt-customize fail to inject firstboot script when running it from script.
Hello, We have a nodejs app which is injecting first boot scripts using virt-customize however the exact same commands are working when triggered manually. Here is the debug output of the commands Regards, Peter [ 0.0] Examining the guest ... libguestfs: trace: set_network true libguestfs: trace: set_network = 0 libguestfs: trace: add_drive
2005 Nov 11
1
undefined symbol in grDevices.so
Hello I'm trying to use rpy with latest R (2.2.0), but unfortunately it seems there is some kind of undefined symbol in grDevices.so (utf8locale) Within python, this message appears: >>> import rpy Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library '/usr/local/lib/R/library/grDevices/libs/grDevices.so':
2010 Jun 30
2
Reading in a transcript-like file
http://r.789695.n4.nabble.com/file/n2272669/FT20100626_%2420_%2B_%242_Sit_%26_Go_-_%28169112900%29_-_Summary.txt FT20100626_%2420_%2B_%242_Sit_%26_Go_-_%28169112900%29_-_Summary.txt I have a lot of experience with Stata, but I'm new to R. I'm trying to read the attached file into R on my mac. My goal is to have it as a list, with each element a string - from then I can parse out the
2014 Mar 12
2
Lectura de texto
Hola Jorge, Algo pasa con el fichero... He abierto el link de Dropbox, y he salvado el texto como "txt.txt" en local. Pruebo a abrirlo en R y...: > scan(file="txt.txt")Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : scan() expected 'a real', got 'ÿþM'> getwd()[1] "C:/Users/xIs12136/Downloads" Pruebo a abrirlo
2003 Jan 20
2
Location of fileinfo
hello there, I just started using ogg files. And want to thank you all for this new format. I have written an addon for mirc (chatclient for irc chat networks) to play and exchange soundfiles and I am almost done with implementing the ogg vorbis format into this application. The mirc-scriptinglanguage provides me a command to read a specified number of bytes starting at a specified location of
2024 Feb 28
2
Trouble reading a UTF-16LE file
Dear R-help, I am having trouble reading a UTF-16LE formatted file. The issue appears to be a byte order mark at the beginning of the file. I have tried readLines(file, encoding='utf-16LE') but got me [1]"\xff\xfe1" "" "" "" "" "" Regards, Tim