Displaying 20 results from an estimated 10000 matches similar to: "gsub With unicode characters"
2011 Jul 17
3
gsub() with unicode and escape character
Dear helpers,
I'm trying to replace a character with a unicode code inside a data
frame using gsub(), but unsuccessfully.
> data.frame(animals=c("dog","wolf","cat"))->my.data
> gsub("o","\u0254",my.data$animals)->my.data$animals
> my.data$animals
[1] "d??g"  "w??lf" "cat"
It's not that a data
2015 Jan 08
0
gsub with perl=TRUE results in 'this version of PCRE is not compiled with Unicode property support' in R-devel
Why are you reporting that your PCRE library does not have something 
which the R-admin manual says it should preferably have?  To wit, 
footnote 37 says
'and not PCRE2, which started at version 10.0. PCRE must be built with 
UTF-8 support (not the default) and support for Unicode properties is 
assumed by some R packages. Neither are tested by configure. JIT support 
is desirable.'
That
2015 Jan 07
2
gsub with perl=TRUE results in 'this version of PCRE is not compiled with Unicode property support' in R-devel
The following code:
res <- gsub("(*UCP)\\b(i)\\b", 
    "", "nhgrimelanomaclass", perl = TRUE)
results in:
Error in gsub(sprintf("(*UCP)\\b(%s)\\b", "i"), "", "nhgrimelanomaclass",  : 
  invalid regular expression '(*UCP)\b(i)\b'
In addition: Warning message:
In gsub(sprintf("(*UCP)\\b(%s)\\b",
2008 May 30
1
Unicode characters (R 2.7.0 on Windows XP SP3 and Hardy Heron)
Hi all
Four questions regarding Unicode.
Three Windows questions. I am using
- a PC with Windows XP (Build 20600.xpsp080413-2111 (Service Pack 3);
- the following R version:
> R.version
platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          7.0
year           2008
month          04
day            22
svn
2014 Jul 28
1
Parsing and deparsing of escaped unicode characters
In both R and JSON (and many other languages), unicode characters can
be escaped using a backslash followed by a lowercase "u" and a 4 digit
hex code. However when deparsing a character vector in R on Windows,
the non-latin characters get escaped as "<U+" followed by their 4
digit hex code and ">":
> x <- "I like \u5BFF\u53F8"
> cat(x)
I like
2008 Aug 25
1
Unicode notation \x000
Dear list,
I am trying to replace Unicode notation of German and Spanish special  
characters (as read in by read.csv from excel spreadsheets) by  
character strings that can be interpreted by LaTeX.
E.g.:
uni2latex <- function(x){
		x <- gsub("&", "et", x, fixed = TRUE)
		# Deutsch
		x <- gsub("\u0080", "\\\"A", x, fixed = TRUE)
		x
2011 Nov 23
1
gsub, utf-8 replacements and the C-locale
Hi all,
I'd like to discuss a infelicity/possible bug with gsub.  Take the
following function:
f <- function(x) {
  gsub("\u{A0}", " ", gsub(" ", "\u{A0}", x))
}
As you might expect, in utf-8 locales it is idempotent:
Sys.setlocale("LC_ALL", "UTF-8")
f("x y")
# [1] "x y"
But in the C locale it is not:
2011 Aug 19
1
gsub for numeric characters in string
Dear all,
I have what is a bit of a confusing question, so I hope that I can explain
clearly. Thank you for your help in advance.
I would like to do a replacement procedure on several strings, but the way
that I am currently going about it is not working.
I have defined "len", which is a series comprising the lengths of different
items, all preceded by a colon.
> len
[1]
2006 Mar 14
2
RJS & Unicode (again)
I have a problem with unicode & RJS. I searched several boards & blogs, 
but was not able to find a solution. Let me explain my problem with an 
example.
View (test.rhtml):
  ...
  <div id="a_test_div">?????????</div>
  ...
Output:
?????????
RJS-Template (an_action.rjs):
  page.replace_html ''a_test_div'', ''?????????''
Calling
2008 Jan 07
1
Displaying special characters (like é)
Hi wx guru''s,
When I want to display strings with special characters like é (e + /) in a
wxRuby gui element, only an empty string is displayed. Not only the
''special'' characters are hidden but all characters!
I am using wxRuby on windows XP. It doesn''t matter if I include the special
characters directly in the Ruby source code, or read them from an external
2008 Jul 24
1
How to make UNICODE characters to display correctly?
I run WBridge5 (French version) under wine-1.1.1 on FreeBSD-7.0.
It runs ok except for every UNICODE character is replaced by the little box.
Also in some message boxes symbols that obviously should be some French 
characters that aren't part of normal Latin alphabet are replaced with 
Chinese characters.
How to make UNICODE to display correctly?
Thank you,
Yuri
2015 Jul 06
3
[PATCH v2 1/1] paint visual host key with unicode box-drawing characters
From: Christian Hesse <mail at eworm.de>
Signed-off-by: Christian Hesse <mail at eworm.de>
---
 log.c    |  2 +-
 sshkey.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++-----------------
 2 files changed, 58 insertions(+), 21 deletions(-)
diff --git a/log.c b/log.c
index 32e1d2e..90c1232 100644
--- a/log.c
+++ b/log.c
@@ -444,7 +444,7 @@ do_log(LogLevel level, const char *fmt,
2009 Mar 22
0
gsub('(.).(.)(.)', '\\3\\2\\1', 'gsub')
there seems to be something wrong with r's regexing.  consider the
following example:
    gregexpr('a*|b', 'ab')
    # positions: 1 2
    # lengths: 1 1
    gsub('a*|b', '.', 'ab')
    # ..
where the pattern matches any number of 'a's or one b, and replaces the
match with a dot, globally.  the answer is correct (assuming a dfa
engine). 
2009 Mar 22
0
gsub('(.).(.)(.)', '\\3\\2\\1', 'gsub') (PR#13617)
Full_Name: Wacek Kusnierczyk
Version: 2.10.0 r48181
OS: Ubuntu 8.04 Linux 32bit
Submission from: (NULL) (129.241.199.135)
there seems to be something wrong with r's regexing.  consider the following
example:
    gregexpr('a*|b', 'ab')
    # positions: 1 2
    # lengths: 1 1
    gsub('a*|b', '.', 'ab')
    # ..
where the pattern matches any number of
2018 Feb 17
0
readLines interaction with gsub different in R-dev
I think the problem in R-devel happens when there are non-ASCII characters
in any
of the strings passed to gsub.
txt <- vapply(list(as.raw(c(0x41, 0x6d, 0xc3, 0xa9, 0x6c, 0x69, 0x65)),
as.raw(c(0x41, 0x6d, 0x65, 0x6c, 0x69, 0x61))), rawToChar, "")
txt
#[1] "Am?lie" "Amelia"
Encoding(txt)
#[1] "unknown" "unknown"
gsub(perl=TRUE,
2001 Aug 02
1
gsub() and parenthesis symbols
Dear R-users --
I'm using R 1.3.0 on a PC running SuSE Linux 7.1. I'm confused by the
following behavior from the gsub() function. Am I doing something wrong?
## A string of characters
> string<-c("q","w","e","(",")","q","w","e")
## Use gsub to replace `q' with `A' 
>
2012 Jan 24
1
gsub semicolon with double quotation mark
Hi,
I would like to substitute a semicolon with two double quotation marks and
a comma inbetween.
It suppose to look like that:
I have:
FBpp0070086;FBpp0099643;FBpp0112915
I would like to have:
"FBpp0070086","FBpp0099643","FBpp0112915"
I tried with various numbers of backslashes, but noe have worked.
for example:
gsub(";", "\\\",\"",
2004 Aug 27
3
gsub, backslash and xtable
R Version 1.9.1  (2004-06-21)
Mac OS X.3.5 Dual 2GHz PowerPC G5
GUI = "AQUA"
I have a data.frame comprising percentiles with the column headings 
containing % characters, e.g.
 > (pp <- colnames(temp2))
[1] "5%"  "10%" "25%" "50%" "75%" "90%" "95%"
I use xtable to convert the data.frame to Latex but I want to
2002 Jul 23
2
sub() and gsub() (PR#1826)
Full_Name: Jerome Asselin
Version: 1.5.1
OS: linux redhat 7.2
Submission from: (NULL) (142.103.173.179)
gsub() return different answers depending on how the input
variables were created. Here is an example of code that
replicates the problem. The vectors y and yy appear to be
the same, but gsub() doesn't return the same answer.
It should remove all the blanks when I use the vector y,
but it
2012 Feb 23
1
multiple gsub
Hi Guys,
I am relatively new to R and was wondering if I could next my gsub command
in identifying one object
I have data which looks like this:  <name>Taiwan_250km</name>
I want it to look like this:                 Taiwan_250km
So essentially I just want to gsub '<name>' and  </name> with nothing!
So far I have got this:  PolyNam <-