similar to: Problem with writing a file in UTF-8

Displaying 20 results from an estimated 7000 matches similar to: "Problem with writing a file in UTF-8"

2009 May 10
2
In C, a fast way to slice a vector?
Hello, Suppose in the following code, PROTECT(sr = R_tryEval( .... )) sr is a RAWSXP vector. I wish to return another RAWSXP starting at position 13 onwards (base=0). I could create another RAWSXP of the correct length and then memcpy the required bytes and length to this new one. However is there a more efficient method? Regards Saptarshi Guha
2016 Sep 05
2
How to print UTF-8 encoded strings from a C routine to R's output?
Dear R experts, It seems that Rprintf has to be used to print from a C routine to guarantee to write to R?s output according to https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Printing. However if a string is UTF-8 encoded, non-ASCII characters (e.g., the infinity symbol http://www.fileformat.info/info/unicode/char/221e/index.htm) are misprinted. Is this an unsupported feature or is
2007 Aug 12
10
about chinese display
hello: I have built a project with Instant Rails.Now only a database and a scaffold based on a product model have finished.But when i inputted "../admin/list" in my browser,i found my chinese characters cound not display normally.Then i made five steps: 1 ajusting encoding in my browser menu 2 in "C:\InstantRails\conf_files\my.ini"directory,making sure
2008 Apr 28
4
R 2.7.0, match() and strings containing \0 - bug?
Hi, A piece of my code that uses readBin() to read a certain file type is behaving strangely with R 2.7.0. This seems to be because of a failure to match() strings after using rawToChar() when the original was terminated with a "\0" character. Direct equality testing with == still works as expected. I can reproduce this as follows: > x <- "foo" > y <-
2010 Aug 23
1
Strange space characters in character strings
Hello everyone, I am reading a HTML table from a website with readHTMLTable() from the XML package: > library(XML) > moose = readHTMLTable("http://www.decisionmoose.com/Moosistory.html", header=FALSE, skip.rows=c(1,2), trim=TRUE)[[1]] > moose V1 V2 V3 1 07.02.2010 SWITCH to Long Bonds\n (BTTRX)
2019 Feb 07
3
Bug Report: read.table with UTF-8 encoded file imports infinity symbol as Integer 8
I can confirm that it doesn't happen on Ubuntu 18.04.1 so Peter is most likely correct; it looks like its Windows specific. On Thu, 7 Feb 2019 at 12:55, peter dalgaard <pdalgd at gmail.com> wrote: > > This doesn't seem to be happening on MacOS, neither in Terminal nor RStudio, (R 3.5.1, R-devel, R-patched). So probably Windows specific. > > -pd > > > On 7 Feb
2023 Apr 13
1
Split String in regex while Keeping Delimiter
Dear Emily, Using a look-behind solves the split problem in this case. (Note: Using Regex is in most/many cases the simplest solution.) str = c("leucocyten + gramnegatieve staven +++ grampositieve staven ++", "leucocyten ? grampositieve coccen +") tokens = strsplit(str, "(?<=[-+])\\s++", perl=TRUE) PROBLEM The current expression does NOT work for a different
2019 Feb 08
3
Bug Report: read.table with UTF-8 encoded file imports infinity symbol as Integer 8
I can reproduce this behavior on my Windows 10 system in RGui (cp1252): when I paste the Unicode infinity symbol into the console, it is treated as number 8. This is caused by Windows "best fit" default behavior in conversion of unicode characters to characters in the current native encoding: at some point in the past, 8 has been chosen as a good fit for infinity in Windows. In my
2018 Feb 15
2
writeLines argument useBytes = TRUE still making conversions
On Thu, Feb 15, 2018 at 11:19 AM, Kevin Ushey <kevinushey at gmail.com> wrote: > I suspect your UTF-8 string is being stripped of its encoding before > write, and so assumed to be in the system native encoding, and then > re-encoded as UTF-8 when written to the file. You can see something > similar with: > > > tmp <- '?' > > tmp <- iconv(tmp,
2008 Aug 01
2
boxplot help
hi I have list of matrix of lenggth 61 containg the mean values..I want to make a boxplot for each of the matrix. I used a for loop but i cant figure out the way to save in the boxplots > all.the.mean [[1]] mean 0.5 o.6 0.8 [[2]] 0.6 0.6 0.9 now i want the boxplot for each of the matrix in a seperate window.my code for(i in 1:length(all.the.mean) { windows() boxplot(all.the.mean[[i]] } this
2008 May 21
1
rawToChar(raw(0))
Hi, right now we have (on R v2.7.0 patched (2008-04-23 r45466)) that: > rawToChar(raw(0)) [1] "" > rawToChar(raw(0), multiple=TRUE) character(0) Is this intended or should both return character(0)? Personally, I would prefer that an empty input vector returns an empty output vector. Same should then apply to charToRaw(), but right now we get: > x <- character(0) >
2008 Feb 25
3
How to include the documentation of a function in a Sweave document?
Dear R-help, I would like to include the documentation of an R function in an *.rnw document processed by Sweave. Because I'm sharing my *.rnw files with colleagues under Linux and Windows (I'm on Mac OS X), I would like a pure R solution. The naive approach doesn't work, because Sweaving this *.rnw file: -------- tmp.rnw -------- \documentclass{article} \begin{document}
2018 Feb 17
1
writeLines argument useBytes = TRUE still making conversions
Of course, right after writing this e-mail I tested on my Windows machine and did not see what I expected: > charToRaw(before) [1] c3 a9 > charToRaw(after) [1] e9 so obviously I'm misunderstanding something as well. Best, Kevin On Sat, Feb 17, 2018 at 2:19 PM, Kevin Ushey <kevinushey at gmail.com> wrote: > From my understanding, translation is implied in this line of ?file
2004 Oct 04
2
smbmount and UTF-8 characters
Hello list! Sorry to be a pain, but I've hunted high and low and can't seem to find the answer. I have a Slackware 10 system and a Microsoft Windows 2000 system. On the Windows 2000 system are lots of files with extended characters - like (tm), (r) and characters with umlauts. I used the "locale" command and set LC_ALL=en_US.UTF8. I am running KDE and in the Konqueror
2006 May 04
2
data manipulation docs
Hi All, Is there some document/manual about data manipulation within R that I could use as a reference (obviously, aside the R manuals)? The reason I am asking is that I have a number of data frames/matrices containg genetic data. The data is in a character form, as in: V1 V2 V3 V4 V5 1 AA AG AA GG AG 2 AC AA AA GG AG 3 AA AG AA GG AG 4 AA AA AA GG AG 5 AA AA AA GG AA I need, to chop,
2012 Jul 20
1
subRaw?
Hello, All: Do you know of any capability to substitute more then one byte in an object of class Raw? Consider the following: > let4 <- paste(letters[1:4], collapse='') > (let4Raw <- charToRaw(let4)) [1] 61 62 63 64 > (let. <- sub('bc', '--', let4Raw)) [1] "61" "62" "63" "64" > # no
2018 Sep 25
2
Asterisk 15.6.1. Symbol pjsip_tls_transport_start2 not found
Hello. After successful compilation 15.6.1 (bundled pjsip) and start asterisk i has error Symbol pjsip_tls_transport_start2 not found. /main/libasteriskpj.exports does not containg pjsip_tls_transport_start2 and pjsip_tls_transport_start. More: * All versions before (including 15.5) has not such error on this computer (ubuntu 18.04). * with 15.6.0, 15.6.1 has error on this computer
2011 Aug 22
3
automatic file input
Dear all, I have 100 files which are used as input.and I have to input the name of my files again and again.the name of the files are 1.out, 2.out......100.out. I want to know if there is anything like perl so that i can use something like this- for($f = 1; $f <= 100; $f++) { $file = $f.".out"; I have tried this thing in R but it does not work.Can somebody please help me.
2008 Jan 23
3
How do I get a character and a symbol in a legend
In the following snippet plot(1:10,1:10,type="n") points(1:5,1:5,pch="+") points(6:10,6:10,pch=20) legend(5,5, c("A","B"), pch=c("+",20)) I want to get a legend with a "+" and a solid circle (pch=20). However, what I get in the legend is "+" and "2". How can I get a "+" and a solid circle? thanks, Steve
2017 May 09
2
source(), parse(), and foreign UTF-8 characters
Hi I'm having trouble sourcing or parsing a UTF-8 file that contains characters that are not representable in the current locale ("foreign characters") on Windows. The source() function stops with an error, the parse() function reencodes all foreign characters using the <U+xxxx> notation. I have added a reproducible example below the message. This seems well within the