search for: ce_utf8

Displaying 9 results from an estimated 9 matches for "ce_utf8".

Did you mean: 30_utf8
2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
...= 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 } else { PROTECT(ans = allocVector(STRSXP, i)); @@ -416,11 +424,14 @@...
2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
...); > 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 > } else { > PROTECT(an...
2008 Oct 28
2
A question about the API mkchar()
...tion 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? Thanks, Long
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
2
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
...gt; --- src/main/sysutils.c (revision 83731) ..... >> >> Here are the potential problems with this approach: >> >> * I don't know whether known_to_be_utf8 can disagree with utf8locale. >> known_to_be_utf8 was the original condition for setting CE_UTF8 on >> the string. I also need to detect non-UTF-8 multibyte locales, so >> I'm checking for utf8locale and mbcslocale. Perhaps I should be more >> careful and test for (enc == CE_UTF8) || (utf8locale && enc == >> CE_NATIVE) instead of just utf8loc...
2017 Jun 11
1
translateChar in NewName in bind.c
...Date: Saturday, 10 June, 2017, 9:14 PM In function 'NewName' in bind.c (https://svn.r-project.org/R/trunk/src/main/bind.c), in else if (*CHAR(base)) , 'translateChar' is used. Should it be 'translateCharUTF8' instead? The end result is marked as UTF-8: mkCharCE(cbuf, CE_UTF8) Other cases already use 'translateCharUTF8'.
2009 Jan 27
2
Package (PR#13475)
Full_Name: Partho Bhowmick Version: 2.8.1 OS: Windows XP Submission from: (NULL) (199.43.48.131) While trying to install package sn (I have tried multiple mirrors), I get the following message trying URL 'http://www.revolution-computing.com/cran/bin/windows/contrib/2.8/sn_0.4-10.zip' Content type 'application/zip' length 320643 bytes (313 Kb) opened URL downloaded 313 Kb
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
...otector --param=ssp-buffer-size=4 -m64 -mtune=generic -c myUTF8.c -o myUTF8.o myUTF8.c: In function 'StringValue': myUTF8.c:284:5: warning: passing argument 1 of 'Rf_mkCharLenCE' from incompatible pointer type [enabled by default] yylval = mkCharLenCE(wcs, wcnt, CE_UTF8); /* 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 *, in...