similar to: Trouble reading a UTF-16LE file

Displaying 20 results from an estimated 10000 matches similar to: "Trouble reading a UTF-16LE file"

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
2024 Feb 28
1
Trouble reading a UTF-16LE file
Try this: > x <- file("C:\\Users\\Jim\\Downloads\\PV2-ch2 - R_Help.ANA",+ encoding = "UTF-16")> y <- readLines(x)> head(y)[1] "1\t36,74\t0" "2\t269,02\t-44" "1\t326,62\t29" "2\t354,52\t24" [5] "8\t390,75\t1838" "2\t395,11\t-1053"> > Thanks Jim Holtman *Data Munger Guru*
2024 Feb 28
1
Trouble reading a UTF-16LE file
The earlier post had an attached text file that did not go through. I hope this link works. I tested it with a coworker, but that is no guarantee. https://uflorida-my.sharepoint.com/:u:/g/personal/tebert_ufl_edu/EXf5u_CtTwJCrhdfTBIPr7wBefZHx4P_suj4wAWb8i8HFA?e=iQawhh Regards, Tim
2016 Feb 23
0
iconv to UTF-16 encoding produces error due to embedded nulls (write.table with fileEncoding param)
On 23.02.2016 11:37, Martin Maechler wrote: >>>>>> 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
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> >
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
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): > >
2016 Feb 24
2
iconv to UTF-16 encoding produces error due to embedded nulls (write.table with fileEncoding param)
On 23/02/2016 7:06 AM, Mikko Korpela wrote: > On 23.02.2016 11:37, Martin Maechler wrote: >>>>>>> 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
2016 Feb 22
0
iconv to UTF-16 encoding produces error due to embedded nulls (write.table with fileEncoding param)
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 did something wrong (e. g. semi "anonymous" email address to protect my privacy and defend unwanted spam) please let me know since I am new here. Thank you very much :-) J.
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:
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
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", "",
2016 Feb 25
0
iconv to UTF-16 encoding produces error due to embedded nulls (write.table with fileEncoding param)
On 25.02.2016 11:31, Mikko Korpela wrote: > On 23.02.2016 14:06, Mikko Korpela wrote: >> On 23.02.2016 11:37, Martin Maechler wrote: >>>>>>>> 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
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
2016 Feb 29
1
iconv to UTF-16 encoding produces error due to embedded nulls (write.table with fileEncoding param)
I have just committed your first patch (the strlen() replacement) to R-devel, and will soon put it in R-patched as well. I wont have time to look at this again before the 3.2.4 release, so your file.show() patch isn't going to make it unless someone else gets to it. There's still a faint chance that I'll do more in R-devel before 3.3.0, but I think it's best if there were bug
2012 May 18
1
UTF-16 input and read.delim/scan
Hi all, I am running 64-bit R 2.15.0 on windows 7. I am trying to use read.delim to read from a file that has 2-byte unicode (CJK) characters. Here is an example of the data (it is tab-delimited if that gets messed up): HITId HITTypeId Title 2Q69Z6KW4ZMAGKKFRT6Q4ONO6MJF68 2LVJ1LY58B72OP36GNBHH16YF7RS7Z 看看句子,写写想法 请看以下的句子,再回答问 So read.delim (code below) doesn't read in correctly. It reads
2014 Jun 22
0
[PATCH 1/6] utils/isohybrid.c: Encode GPT partition names as UTF-16LE
The worst sin of isohybrid.c was to compose GPT partition names by 8-bit characters and to memcpy() them as if they were 16 bit wide. GPT names are encoded as UTF-16LE. It is trivial to create this encoding from 7-bit ASCII. This change introduces two byte arrays with the desired UTF-16LE names which replace the string constants "ISOHybrid ISO" and "ISOHybrid". ---
2014 Jun 24
2
[syslinux:master] isohybrid: Function to write UTF-16LE strings
Op 2014-06-23 om 20:09 schreef syslinux-bot for H. Peter Anvin: > Commit-ID: f9dad5340bcefe34d860e991e8743be01a4d6c3c > Gitweb: http://www.syslinux.org/commit/f9dad5340bcefe34d860e991e8743be01a4d6c3c > Author: H. Peter Anvin <hpa at zytor.com> > AuthorDate: Mon, 23 Jun 2014 20:06:51 -0700 > Committer: H. Peter Anvin <hpa at zytor.com> > CommitDate: Mon, 23
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
2016 Feb 25
2
iconv to UTF-16 encoding produces error due to embedded nulls (write.table with fileEncoding param)
On 23.02.2016 14:06, Mikko Korpela wrote: > On 23.02.2016 11:37, Martin Maechler wrote: >>>>>>> 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 >>