search for: mbcsvalid

Displaying 5 results from an estimated 5 matches for "mbcsvalid".

2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
...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 @@ if (s == NULL) SET_STRING_ELT(ans, j, STRING_ELT(CADR(args), 0)); else { - SEXP tmp; - if(known_to_be_latin1) tmp =...
2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
...); > + 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 @@ > if (s == NULL) > SET_STRING_ELT(ans, j, STRING_ELT(CADR(args), 0)); >...
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
2005 Jul 20
1
(PR#8017) build of REventLoop package crashes with 2.1 due
...utf8strIsASCII(char *str); > < #ifdef SUPPORT_MBCS > < int utf8clen(char c); > < #define mbs_init(x) memset(x, 0, sizeof(mbstate_t)) > < size_t Mbrtowc(wchar_t *wc, const char *s, size_t n, mbstate_t *ps); > < void mbcsToLatin1(char *in, char *out); > < Rboolean mbcsValid(char *str); > < char *Rf_strchr(const char *s, int c); > < char *Rf_strrchr(const char *s, int c); > < #else > < #define Rf_strchr(s, c) strchr(s, c) > < #define Rf_strrchr(s, c) strrchr(s, c) > < #endif > < #ifdef Win32 > < void R_fixslash(char *s);...
2005 Jul 19
0
build of REventLoop package crashes with 2.1 due tosyntax error in Defn.h (PR#8017)
...*s, SEXPTYPE t); < Rboolean utf8strIsASCII(char *str); < #ifdef SUPPORT_MBCS < int utf8clen(char c); < #define mbs_init(x) memset(x, 0, sizeof(mbstate_t)) < size_t Mbrtowc(wchar_t *wc, const char *s, size_t n, mbstate_t *ps); < void mbcsToLatin1(char *in, char *out); < Rboolean mbcsValid(char *str); < char *Rf_strchr(const char *s, int c); < char *Rf_strrchr(const char *s, int c); < #else < #define Rf_strchr(s, c) strchr(s, c) < #define Rf_strrchr(s, c) strrchr(s, c) < #endif < #ifdef Win32 < void R_fixslash(char *s); < void R_fixbackslash(char *s); <...