Displaying 20 results from an estimated 30000 matches similar to: "Strings from different locale"
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:
2015 Jan 22
1
R CMD check: Locale not set to C?
Dear All
The "R CMD check" on the "zoo" (1.7-11) package results in an error on my
environment. It can be reduced to the following example:
----------------------------------------------------
> require(zoo)
> read.zoo(system.file("doc", "demo1.txt", package = "zoo"), sep = "|",
format="%d %b %Y")
Error in
2011 Jan 03
2
error in calling source(): invalid multibyte character in parser
Being italians when writing comments/instructions we use accented letters - like ?, ?, ?, etc.... when running R scripts using such characters I get and error saying:
invalid multibyte character in parser
I have been looking at the help and searched the r-help archives but I haven't find anything that I could intelligibly apply to my case.
Can anyone suggest a fix for this error?
Thanks,
2023 May 30
3
why does [A-Z] include 'T' in an Estonian locale?
Inspired by this old Stack Overflow question
https://stackoverflow.com/questions/19765610/when-does-locale-affect-rs-regular-expressions
I was wondering why this is TRUE:
Sys.setlocale("LC_ALL", "et_EE")
grepl("[A-Z]", "T")
TRE's documentation at
<https://laurikari.net/tre/documentation/regex-syntax/> says that a
range "is shorthand for
2009 Oct 27
3
Stack overflow in R 2.10.0 with sub()
Hi R developers:
Congratulations for the new R 2.10.0 version.
It is a huge effort! Thank you for your work and dedication.
I just want to ask how to make this "strip blank" function
to work again (it works on R.2.9.2).
alumnos$AL_NUME_ID<-sub("(^ +)|( +$)","",alumnos$AL_NUME_ID),)
"alumnos" is a data base with 900.000 rows and 72 columns.
and
2010 Dec 10
1
Consistency of variable storage in R and Sys.setlocale (is this a feature or bug)?
<I was not sure if this should go to R-devel or R-help. If I e-mailed this
to the wrong place, please let me know.>
Hello dear R-devel members,
I came by an oddity, with regards to how character variables are being
transformed when they are in Hebrew, and when Sys.setlocale is changed.
Here is an example:
# first, let's set the locale to Hebrew
Sys.setlocale("LC_ALL",
2012 Oct 24
2
R CMD BATCH: set locale?
Hi
I would like to change the locale when using R CMD BATCH. Usually, if I
want to run it in english, for R in console/GUIs, I edit the .Rprofile
file, adding:
Sys.setlocale("LC_ALL","en_US.UTF8")
Sys.setlocale("LC_MESSAGES","en_US.UTF8")
But while this works for interactive R, it does not for R CMD BATCH. The
problem is that running tests for a package,
2014 Apr 30
2
make fullcheck fails: strtod/atof and locale
make fullcheck fails on my computer: flac cannot recognize --skip option
that contains decimal point, e.g. "--skip=1.234".
System locale uses comma as a separator, so strtod/atof expect comma, not point,
and "make fullcheck" fails.
Here's what I can see in FLAC source code:
atof() function found in:
file: src/share/grabbag/seektable.c
function:
2023 Jun 01
1
why does [A-Z] include 'T' in an Estonian locale?
On 5/30/23 17:45, Ben Bolker wrote:
> Inspired by this old Stack Overflow question
>
> https://stackoverflow.com/questions/19765610/when-does-locale-affect-rs-regular-expressions
>
>
> I was wondering why this is TRUE:
>
> Sys.setlocale("LC_ALL", "et_EE")
> grepl("[A-Z]", "T")
>
> TRE's documentation at
>
2011 May 04
1
issue with "strange" characters (locale settings)
WinXP-x32, R-21.13.0
Dear list,
I have a problem that (I think) relates to the interaction between Windows
and R.
I am trying to scrape a table with data on the Hawai'ian Islands, This is my
code:
library(XML)
u <- "http://en.wikipedia.org/wiki/Hawaii"
tables <- readHTMLTable(u)
Islands <- tables[[5]]
The output is (first set of columns):
2010 Nov 24
4
R encoding question
Hi,
I am using RpgSQL to retrieve data from a PostgreSQL database wich is
with encoding UTF8, and I have some Chinese character in one of the
columns, unfortunately R can't show it correctly.
> df <- dbGetQuery(con, "select * from test")
> df
a b
1 1 ????????\xa2
2 2 ???? EURO\xa1
I see the following option, do I need to change the encoding option to
show
2010 Apr 15
1
Changing locale?
Hi
I need for a specific application to change the locale of R 2.9.2 in
Ubuntu 9.04. Trying the example in ?Sys.setlocale:
Sys.setlocale("LC_TIME", "de_DE.utf8")
[1] ""
Warning message:
In Sys.setlocale("LC_TIME", "de_DE.utf8") :
la requ?te OS pour sp?cifier la localisation ? "de_DE.utf8" n'a pas pu
?tre honor?e
I tried the code
2012 Dec 15
3
Cannot build custom locale with utf-8 charset
I am trying, without success, to compile a custom locale for the utf-8
character set. I have issued this command:
localedef --no-archive -f UTF-8 -i
/usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd.utf8
which produces the requisite files without reporting an error but
which none-the-less insists on using the iso-8859-1 charset:
LC_ALL=en_CA at yyyy-mm-dd locale charmap
2009 Jul 01
2
locale changing on Windows
Dear r-helpers,
This is a little bit more of a Windows problem than
an R problem, but ...
any idea how to query the *available* locales from
within R (or otherwise) on a Windows system? Teaching
in a Spanish-language setting and would like to do
something like
Sys.setlocale("LC_TIME","en_US")
(for example so that we can convert dates like
"1970-jan-01" with
2015 Jul 06
7
[PATCH 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>
---
sshkey.c | 47 ++++++++++++++++++++++++++++++++++++-----------
1 file changed, 36 insertions(+), 11 deletions(-)
diff --git a/sshkey.c b/sshkey.c
index cfe5980..47511c2 100644
--- a/sshkey.c
+++ b/sshkey.c
@@ -44,6 +44,9 @@
#include <stdio.h>
#include <string.h>
#include
2006 May 22
4
Sys.setlocale upsets windows graphics device (PR#8887)
Full_Name: Edward McNeil
Version: 2.3.0
OS: Widows XP
Submission from: (NULL) (203.170.234.5)
Type the following:
> Sys.setlocale("LC_ALL","C")
> hist(1:10)
CRASH
2017 Jun 23
2
LC_TIME not set correctly by Sys.setlocale() ?
Related to the following question on Stackoverflow:
https://stackoverflow.com/questions/44723690/unexpected-behavior-of-sys-setlocale#44723690
It appears as if Sys.setlocale() does not update LC_TIME correctly for use
in date formatting. Although R reports that LC_TIME is changed to the new
setting after use of Sys.setlocale(), as.Date() still uses the old
settings. The only way to update this is
2010 Mar 18
5
language!!!
Hi,
there´s something that really bothers me about R and after hours and hours of internet research, I´m still stuck with the same problem: I installed R and it is in Spanish, as the system on my work. I would really like it in English and there seems to be no way to change that!?! I´m doing an abroad internship, so my Spanish is far from perfect and my tutorial is in English.
Is there any
2009 Jul 28
1
how to load packages from different location
Dear list:
I know this may be an old question.
I know how to install the packages to a different directory, for example,
/home/zrl/tmp
and I know how to load it
>library("genefilter",lib.loc="/home/zrl/tmp")
but I found some package(for example package A) will have to load some
other packages as well, and this time package A will look for the package in
the original
2015 Jun 08
3
Bug in loadNamespace?
On 07/06/2015 9:14 PM, Dirk Eddelbuettel wrote:
>
> On 7 June 2015 at 20:46, Duncan Murdoch wrote:
> | I am seeing very strange behaviour in R 3.2.0 patched (r68272) and a new
> | build of R-devel. The sessioninfo() from the former is below.
> |
> | Here's what I see: If I set the locale, and trigger a namespace load, a
> | version comparison gives NA, and I get an