search for: translatecharutf8

Displaying 17 results from an estimated 17 matches for "translatecharutf8".

2017 Aug 23
2
Error "translateCharUTF8' must be called on a CHARSXP Execution halted"
...n installing it via yum. R starts up and seems to be doing fine at first sight. However, when I try to list the files in a directory with the command files <- list.files(path="/home/username/directory_name/", pattern="*.Rda",, full.names=T, recursive=FALSE) I get the error translateCharUTF8' must be called on a CHARSXP Execution halted On my local windows machine the command works fine. Googling this nothing really comes up except that the installation might be broken. (See http://r.789695.n4.nabble.com/list-files-error-message-translateCharUTF8-must-be-called-on-a-CHARSXP-td3250...
2017 Aug 23
0
Error "translateCharUTF8' must be called on a CHARSXP Execution halted"
...starts up and seems to be doing fine at first sight. However, when I try to list the files in a directory with the command > > files <- list.files(path="/home/username/directory_name/", pattern="*.Rda",, full.names=T, recursive=FALSE) > > I get the error > > translateCharUTF8' must be called on a CHARSXP > Execution halted > > On my local windows machine the command works fine. > Googling this nothing really comes up except that the installation might be broken. (See http://r.789695.n4.nabble.com/list-files-error-message-translateCharUTF8-must-be-called-...
2011 Feb 01
1
list.files() error message: 'translateCharUTF8' must be called on a CHARSXP
...les() on my home directory, like this: crnt.files <- list.files(dir.to.check, full.names=TRUE, all.files=TRUE, recursive=TRUE) With dir.to.check set to the full path to my home directory. After a while I get: Error in list.files(dir.to.check, full.names = TRUE, all.files = TRUE, : 'translateCharUTF8' must be called on a CHARSXP This happens on one of my two machines, not the other. Presumably there is a "file" somewhere in my home directory that, well, isn't a file? Or maybe has some strange character in its file name? That maybe isn't valid in my LOCALE? I would apprec...
2017 Jun 11
1
translateChar in NewName in bind.c
...----- Subject: translateChar in NewName in bind.c To: r-devel at r-project.org 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 Jun 16
1
Package Install "Design" fails on Ubuntu 8.04
...preparing package for lazy loading Loading required package: Hmisc Error in dyn.load(file, ...) : unable to load shared library '/home/dp0377/R/x86_64-pc-linux-gnu-library/2.6/Hmisc/libs/Hmisc.so': /home/dp0377/R/x86_64-pc-linux-gnu-library/2.6/Hmisc/libs/Hmisc.so: undefined symbol: translateCharUTF8 Error: package 'Hmisc' could not be loaded Execution halted ERROR: lazy loading failed for package 'Design' ** Removing '/home/dp0377/R/x86_64-pc-linux-gnu-library/2.6/Design' -- I think the problem lies in: 'Hmisc/libs/Hmisc.so: undefined symbol: translateCharUTF8'...
2017 Jun 30
1
Rprintf expected encoding
...How-to-print-UTF-8-encoded-strings-from-a-C-routine-to-R-s-output-td4724337.html) but it wasn't very helpful. If I want to print a UTF-8 string, I can do one of the following: 1) Send native data via Rprintf("%s", translateChar(str)); 2) Send UTF-8 data via Rprintf("%s", translateCharUTF8(str)); If Rprintf is sending its output to stdout, then (1) seems like the correct option. If Rprintf is sending to a file connection with encoding set to UTF-8 (for example, after a call to sink(file(..., encoding="UTF-8"))), then (2) is correct. Is there any way to know the encodin...
2017 Aug 01
0
translateChar in NewName in bind.c
...gt;> on Sun, 30 Jul 2017 14:57:53 +0000 writes: > R devel's bind.c has been ported to R patched. Is it OK while names of 'unlist' or 'c' result may be not strictly the same as in R 3.4.1 because of changed function 'NewName' in bind.c? > Using 'translateCharUTF8' instead of 'translateChar' is as it should be. It has an effect in non-UTF-8 locale for this example. > x <- list(1:2) > names(x) <- "\ue7" > res <- unlist(x) > charToRaw(names(res)[1]) > Directly assigning 'tag' to 'a...
2010 Feb 22
1
shash in unique.c
...(STRING_ELT(x,indx) == NA_STRING) return 0; return scatter((unsigned int) (STRING_ELT(x,indx), d); } rather than its current form which appears to hash the string it points to : static int shash(SEXP x, int indx, HashData *d) { unsigned int k; const char *p; if(d->useUTF8) p = translateCharUTF8(STRING_ELT(x, indx)); else p = translateChar(STRING_ELT(x, indx)); k = 0; while (*p++) k = 11 * k + *p; /* was 8 but 11 isn't a power of 2 */ return scatter(k, d); } Looking at sequal, below, and reading its comments, if the pointers are equal it doesn't look at the...
2017 Sep 14
2
special latin1 do not print as glyphs in current devel on windows
..." "?", "?", and "?" are printed as (incorrect) unicode escapes. "?" for example should be \u20ac not \u0080. (In R 3.4.1, print(x) shows the glyphs and not the unicode escapes. Apparently, as of v3.5, print() calls enc2utf8() (or its equivalent in C (translateCharUTF8?))?) > print("\u20ac") [1] "?" The characters in x are marked as "latin1". > Encoding(x) [1] "latin1" "latin1" "latin1" "latin1" Looking at the CP1252 table (e.g. link above), we see that this is incorrect for "...
2017 May 09
2
source(), parse(), and foreign UTF-8 characters
...derstanding of the problem, and I'm grateful for any feedback you might have. I have looked into character encodings in the context of the dplyr package, and I have observed the following behavior: - Strings are treated preferentially in the native encoding - Only upon specific request (via translateCharUTF8() or enc2utf8() or ...), they are translated to UTF-8 and marked as such - On UTF-8 systems, strings are never marked as UTF-8 - ASCII strings are marked as ASCII internally, but this information doesn't seem to be available, e.g., Encoding() returns "unknown" for such strings - Mo...
2009 Sep 30
2
R 2.9.2 crashes when sorting latin1-encoded strings
...nt(N) > [1] 1000 > > for (i in 1:N) { > + x <- words[1:i] > + # the following line will crash for some i, depending on the > particular > + # strings in <words> and the subset selected for <x> above > + order(x) > + } > Error in order(x) : 'translateCharUTF8' must be called on a CHARSXP > Execution halted >
2008 Jan 27
0
Character encodings and packages
...tive encoding of the current locale. This needs the package to depend on 'R (>= 2.5.0)'. - to note the declared encoding and handle the string in that encoding. - to translate the string to UTF-8 and handle it in UTF-8. This will be easiest to do in R >= 2.7.0 using the function translateCharUTF8(). For writers of graphics devices where is a further twist in R >= 2.7.0: currently text is passed to the graphics device in the native encoding, but by setting the DevDesc variable hasTextUTF8 to TRUE you can indicate to the graphics engine the ability to accept text in UTF-8. This is do...
2017 May 09
1
source(), parse(), and foreign UTF-8 characters
...edback you >> might have. >> >> I have looked into character encodings in the context of the dplyr >> package, and I have observed the following behavior: >> >> - Strings are treated preferentially in the native encoding >> - Only upon specific request (via translateCharUTF8() or enc2utf8() or >> ...), they are translated to UTF-8 and marked as such >> - On UTF-8 systems, strings are never marked as UTF-8 >> - ASCII strings are marked as ASCII internally, but this information >> doesn't seem to be available, e.g., Encoding() returns "un...
2017 Sep 14
0
special latin1 do not print as glyphs in current devel on windows
...;, "?", and "?" are printed as (incorrect) unicode escapes. "?" for > example should be \u20ac not \u0080. > (In R 3.4.1, print(x) shows the glyphs and not the unicode escapes. > Apparently, as of v3.5, print() calls enc2utf8() (or its equivalent in > C (translateCharUTF8?))?) > > > print("\u20ac") > [1] "?" > > The characters in x are marked as "latin1". > > > Encoding(x) > [1] "latin1" "latin1" "latin1" "latin1" > > Looking at the CP1252 table (e.g. link above...
2017 May 09
0
source(), parse(), and foreign UTF-8 characters
...I'm grateful for any feedback you > might have. > > I have looked into character encodings in the context of the dplyr > package, and I have observed the following behavior: > > - Strings are treated preferentially in the native encoding > - Only upon specific request (via translateCharUTF8() or enc2utf8() or > ...), they are translated to UTF-8 and marked as such > - On UTF-8 systems, strings are never marked as UTF-8 > - ASCII strings are marked as ASCII internally, but this information > doesn't seem to be available, e.g., Encoding() returns "unknown" for...
2017 Aug 01
2
special latin1 do not print as glyphs in current devel on windows
Thank you!. My apologies again for not including the console output in my message before. I sent another e-mail with the output in the meantime, so it should be a bit clearer now, what I am seeing. In case I missed something, please let me know. Yes, I am using latin1 and cp1252 interchangebly here, mostly because Encoding() is reporting the encoding as "latin1". You presumed correctly
2011 Jan 21
1
match function causing bad performance when using table function on factors with multibyte characters on Windows
[I originally posted this on the R-help mailing list, and it was suggested that R-devel would be a better place to dicuss it.] Running ?table? on a factor with levels containing non-ASCII characters seems to result in extremely bad performance on Windows. Here?s a simple example with benchmark results (I?ve reduced the number of replications to make the function finish within reasonable time):