search for: cetype_t

Displaying 13 results from an estimated 13 matches for "cetype_t".

2008 Oct 28
2
A question about the API mkchar()
...sh locale could the function work correctly, under other locale, such as Japanese or Chinese, the string will be convert incorrectly. As a matter of fact, those utf-8 code already is Unicode string, and don't need to be converted at all. I also tried to use the SEXP Rf_mkCharCE(const char *, cetype_t);, Parsing the CE_UTF8 as the argument of cetype_t, but the result is worse. It returned the result as ucs code, an kind of Unicode under windows platform. All I want to get is just a SEXP object containing the original utf-8 string, no matter what locale is set currently. Normally what can I do...
2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
...n/sysutils.c (working copy) @@ -393,8 +393,16 @@ char **e; for (i = 0, e = environ; *e != NULL; i++, e++); PROTECT(ans = allocVector(STRSXP, i)); - for (i = 0, e = environ; *e != NULL; i++, e++) - SET_STRING_ELT(ans, i, mkChar(*e)); + for (i = 0, e = environ; *e != NULL; i++, e++) { + cetype_t enc = known_to_be_latin1 ? CE_LATIN1 : + known_to_be_utf8 ? CE_UTF8 : + CE_NATIVE; + if ( + (utf8locale && !utf8Valid(*e)) + || (mbcslocale && !mbcsValid(*e)) + ) enc = CE_BYTES; + SET_STRING_ELT(ans, i, mkCharCE(*e, enc)); + } #endif...
2008 Sep 17
2
RCurl compilation error on ubuntu hardy
...gure: creating ./config.status config.status: creating src/Makevars ** libs gcc -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include -DHAVE_LIBIDN_FIELD=1 -fpic -g -O2 -c base64.c -o base64.o In file included from base64.c:1: Rcurl.h:52: error: expected specifier-qualifier-list before 'cetype_t' make: *** [base64.o] Error 1 chmod: cannot access `/usr/local/lib/R/site-library/RCurl/libs/*': No such file or directory ERROR: compilation failed for package 'RCurl' ** Removing '/usr/local/lib/R/site-library/RCurl' The downloaded packages are in /tmp/RtmpQ8FMBZ/downloa...
2010 Jun 19
1
more powerful iconv
...i = isRawx ? x : STRING_ELT(x, i); top_of_loop: inbuf = CHAR(si); inb = LENGTH(si); outbuf = cbuff.data; outb = cbuff.bufsize - 1; @@ -622,7 +623,7 @@ goto next_char; } - if(res != -1 && inb == 0) { + if(res != -1 && inb == 0 && !isRawx) { cetype_t ienc = CE_NATIVE; nout = cbuff.bufsize - 1 - outb; @@ -632,7 +633,12 @@ } SET_STRING_ELT(ans, i, mkCharLenCE(cbuff.data, nout, ienc)); } - else SET_STRING_ELT(ans, i, NA_STRING); + else if(!isRawx) SET_STRING_ELT(ans, i, NA_STRING); + else { + nout = cbuff.bufsize - 1...
2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
...+393,16 @@ > char **e; > for (i = 0, e = environ; *e != NULL; i++, e++); > PROTECT(ans = allocVector(STRSXP, i)); > - for (i = 0, e = environ; *e != NULL; i++, e++) > - SET_STRING_ELT(ans, i, mkChar(*e)); > + for (i = 0, e = environ; *e != NULL; i++, e++) { > + cetype_t enc = known_to_be_latin1 ? CE_LATIN1 : > + known_to_be_utf8 ? CE_UTF8 : > + CE_NATIVE; > + if ( > + (utf8locale && !utf8Valid(*e)) > + || (mbcslocale && !mbcsValid(*e)) > + ) enc = CE_BYTES; > + SET_STRING_ELT(ans, i,...
2012 Mar 21
1
Trouble installing the XML package
...MemoryEnc in -lxml2... yes checking libxml/xmlversion.h usability... yes checking libxml/xmlversion.h presence... yes checking for libxml/xmlversion.h... yes Expat: FALSE Checking for return type of xmlHashScan element routine. No return value for xmlHashScan xmlNs has a context field Checking for cetype_t enumeration No cetype_t enumeration defined in R headers. checking for xmlsec1-config... no nodegc default Version has XML_WITH_ZLIB Version has xmlHasFeature() **************************************** Configuration information: Libxml settings libxml include directory: -I/usr/include/libxml2 li...
2010 May 26
1
persp(); help with 'tck' option
Hi All, I'm using 'tck' option to *reduce* the length of tick marks but it is not working, can anyone please tell me where I'm going wrong... require(graphics) require(grDevices) x <- seq(-10, 10, length= 30) y <- x f <- function(x,y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r } z <- outer(x, y, f) z[is.na(z)] <- 1 # 'bg' works but 'tck' is not showing
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
2012 Oct 13
0
XML_3.95-0.1.tar.gz does not build on FreeBSD
...MemoryEnc in -lxml2... yes checking libxml/xmlversion.h usability... yes checking libxml/xmlversion.h presence... yes checking for libxml/xmlversion.h... yes Expat: FALSE Checking for return type of xmlHashScan element routine. No return value for xmlHashScan xmlNs has a context field Checking for cetype_t enumeration Using recent version of R with cetype_t enumeration type for encoding checking for xmlsec1-config... no nodegc default xml-debug default Version has XML_WITH_ZLIB Version has xmlHasFeature() **************************************** Configuration information: Libxml settings libxml...
2016 Jan 27
2
rstan warning messages
Confirmed that gcc-gfortran is installed Package gcc-gfortran-4.4.7-16.el6.x86_64 already installed and latest version What could I check next? I do not have the following installed and will get that done and tested again. libcurl-devel libidn-devel Thanks, Larry -----Original Message----- From: Tom Callaway [mailto:tcallawa at redhat.com] Sent: Wednesday, January 27, 2016
2016 Jan 28
2
rstan warning messages
.../* include terminator */ ^ In file included from /usr/include/R/Rdefines.h:29:0, from myUTF8.c:3: /usr/include/R/Rinternals.h:890:6: note: expected 'const char *' but argument is of type 'ucs_t *' SEXP Rf_mkCharLenCE(const char *, int, cetype_t); ^ myUTF8.c:112:34: warning: variable 'use_wcs' set but not used [-Wunused-but-set-variable] Rboolean oct_or_hex = FALSE, use_wcs = FALSE; ^ myUTF8.c:112:14: warning: variable 'oct_or_hex' set but not used [-Wunu...
2008 Apr 22
3
R 2.7.0 is released
...notably for (reciprocal) condition number estimation of complex matrices. o Experimental utility R_has_slot supplementing R_do_slot. o There is a new public interface to the encoding info stored on CHARSXPs, getCharCE and mkCharCE using the enumeration type cetype_t. o A new header 'R_ext/Visibility.h' contains some definitions for controlling the visibility of entry points, and how to control visibility is now documented in 'Writing R Extensions'. BUG FIXES o pt(x, df) is now even more accurate in some cases (e....
2008 Apr 22
3
R 2.7.0 is released
...notably for (reciprocal) condition number estimation of complex matrices. o Experimental utility R_has_slot supplementing R_do_slot. o There is a new public interface to the encoding info stored on CHARSXPs, getCharCE and mkCharCE using the enumeration type cetype_t. o A new header 'R_ext/Visibility.h' contains some definitions for controlling the visibility of entry points, and how to control visibility is now documented in 'Writing R Extensions'. BUG FIXES o pt(x, df) is now even more accurate in some cases (e....