Displaying 20 results from an estimated 1000 matches similar to: "Invalid UTF-8 with gsub(perl=TRUE) and iconv(sub="")"
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 30
2
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
/Hello.
SUMMARY:
$ BOOM=$'\xFF' LC_ALL=en_US.UTF-8 Rscript --vanilla -e "Sys.getenv()"
Error in substring(x, m + 1L) : invalid multibyte string at '<ff>'
$ BOOM=$'\xFF' LC_ALL=en_US.UTF-8 Rscript --vanilla -e "Sys.getenv('BOOM')"
[1] "\xff"
BACKGROUND:
I launch R through an Son of Grid Engine (SGE) scheduler, where the R
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
>
2016 Feb 16
2
iconv to UTF-16 encoding produces error due to embedded nulls (write.table with fileEncoding param)
If I execute the code from the "?write.table" examples section
x <- data.frame(a = I("a \" quote"), b = pi)
# (ommited code)
write.csv(x, file = "foo.csv", fileEncoding = "UTF-16LE")
the resulting CSV file has a size of 6 bytes which is too short
(truncated):
""",3
The problem seems to be the iconv function:
2019 Aug 04
1
iconv: embedded nulls when converting to UTF-16
R-devel community:
I have encountered some unexpected behavior using iconv, which may be the source of errors I am getting when connecting to a UTF-16 -encoded SQL Server database. A simple example is below.
When researching this problem, I found r-devel reports of the same problem in threads from June 2010 and February, 2016, and that bug #16738 was posted to Bugzilla as a result. However, I
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
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
2016 Feb 23
4
iconv to UTF-16 encoding produces error due to embedded nulls (write.table with fileEncoding param)
>>>>> nospam at altfeld-im de <nospam at altfeld-im.de>
>>>>> on Mon, 22 Feb 2016 18:45:59 +0100 writes:
> Dear R developers
> I think I have found a bug that can be reproduced with two lines of code
> and I am very thankful to get your first assessment or feed-back on my
> report.
> If this is the wrong mailing list or I
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
2016 Feb 23
1
iconv to UTF-16 encoding produces error due to embedded nulls (write.table with fileEncoding param)
Excellent analysis, thank you both for the quick reply!
Is there anything I can do to get the bug fixed in the next version of R
(e. g. filing a bug report at https://bugs.r-project.org/bugzilla3/)?
On Tue, 2016-02-23 at 14:06 +0200, Mikko Korpela wrote:
> On 23.02.2016 11:37, Martin Maechler wrote:
> >>>>>> nospam at altfeld-im de <nospam at altfeld-im.de>
>
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
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
2017 Aug 21
3
Control multi-threading in standard matrix product
Dear R Core Team,
I wish to report what can be viewed as a bug or at least a strange
behavior in R-3.4.1. I ask my question here (as recommended on
https://www.r-project.org/bugs.html) since I am not member of the R's
Bugzilla.
When running 'R --vanilla' from the command line, the standard matrix
product is by default based on BLAS and multi-threaded on all cores
available on
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):
> >
2011 Jun 05
1
another missing link in febootstrap; failing tests for libguestfs
After the last round of patches to febootstrap, the image-based test in
libguestfs still failed. It turned out that this happens because Debian
started replacing /var/run and /var/lock with symlinks that point to a
tmpfs mounted to /run. The symlinks were copied to the appliance but
/run/lock did not exist, so pvcreate refused to run (script
'images/guest-aux/make-debian-img.sh').
After I
2009 Jan 29
3
Dead keys do not work
Hello,
I m a french user of Gnome / Ubuntu (last version) and wine. I'm quite a beginner on linux. I'm trying to switch totally to linux, but still want to use some windows software with wine which generally works great.
I have figured out that the dead keys did not work on my french keyboard. For instance, I can't type ???????, etc. I will get instead ^e^a etc.
Otherwise, the
2017 Aug 21
2
Control multi-threading in standard matrix product
Hi Tomas,
Thanks for your answer.
Indeed, I checked and my R-3.4.1 installed from the ubuntu repository
use 'libopenblasp-r0.2.18.so' while my R-3.3.2 that I did compiled on my
machine use 'libRblas.so' which explain the difference of behavior.
I will use RhpcBLASctl to avoid issue when combining matrix product and
other multi-threading package.
Maybe this point regarding
2020 May 18
3
ether-wake
On Sun, 2020-05-17 at 20:25 -0600, R C wrote:
> Ok, I get that, found it before; "typically sent as a UDP datagram to
> port 0, 7 or 9, or directly over Ethernet as EtherType 0x0842"
>
>
> The keyword being 'typically', but what is it that ether-wake actually
> uses/does? (I need to forward a WOL packet to a different
>
> vlan on some Cisco
2014 Feb 24
3
Error gdata and gplots packages
Hi, I just installed Ubuntu 12.04.4. I installed R by following
instructions from CRAN after modification into my /etc/apt/sources.list file
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
When I try to load library(gdata) ou library(gplots), I have error
message :
library(gdata)
gdata: read.xls support for 'XLS' (Excel 97-2004) files
2020 Feb 19
3
dimnames incoherence?
Hi,
I was bitten by a little incoherence in dimnames assignment or may be I
missed some point.
Here is the case. If I assign row names via dimnames(a)[[1]], when
nrow(a)=1 then an error is thrown. But if I do the same when nrow(a) > 1
it's OK. Is one of this case works unexpectedly? Both? Neither?
a=as.matrix(1)
dimnames(a)[[1]]="a" # error: 'dimnames' must be a list