Displaying 16 results from an estimated 16 matches for "localetocharset".
Did you mean:
locale_charset
2005 Apr 20
1
localeToCharset error for Thai locale (PR#7799)
...> example(attach)
Error in switch(x[2], "1250" = return("ISO 8859-2"), "1251" = return("KOI8-U"),
: argument is missing, with no default
I tracked the source codes and finally found minor mistakes with Thai language
management on Windows platform in 'localeToCharset' function.
file: /R-2.1.0/src/library/utils/iconv.R
line: 50
if (en %in% "th") <<-- Should be "tg"-tajik???
return("KOI8-T")
"th" is for Thai (TIS-620; already defined on line 48-49).
line: 53-56
"874" = return("TIS 620&...
2017 Sep 14
2
special latin1 do not print as glyphs in current devel on windows
...t; "?" "?" "?"
> (x_un2utf8 <- enc2utf8(x_un))
[1] "?" "?" "?" "?"
Long story short: The characters in the 80 to 9F range should not be
marked as "latin1" on CP1252 locales, IMHO.
As a side-note: the output of localeToCharset() is also problematic,
since ISO8859-1 != CP1252.
> localeToCharset()
[1] "ISO8859-1"
Finally on to Patrick Perry's bug report
(https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17329): 'On
Windows, enc2utf8("?") yields "|".'
Unfortunately, I ca...
2005 Jun 15
1
Getting the character set
Hi R-gurus,
In python one can do
>>> import string
>>> print string.letters
and get the characters in the local character set.
This feature is often useful in Python, and if I could find it in R
I could make good use of it.
In R both Sys.getlocale() and localeToCharset() can tell me which
charset I am using, but I haven't found a way to print out the
actual characters. Is there a way to do this?
Sincerely,
H.
--
------------------------------------------
Halldor Bjornsson (halldor at vedur.is)
Vedurstofa Islands (Icelandic Met. Office)
Bustadavegur 9, IS...
2006 May 09
1
A question about encoding
I use R 2.3.0 under windows.
> Sys.getlocale()
[1] "LC_COLLATE=Chinese_People's Republic of
China.936;LC_CTYPE=Chinese_People's Republic of
China.936;LC_MONETARY=Chinese_People's Republic of
China.936;LC_NUMERIC=C;LC_TIME=Chinese_People's Republic of China.936"
> localeToCharset()
[1] "CP936"
Now I want to use JGR,which uses UTF-8 encoding.
So when I use save.image function to save something containg Chinese
character with R,and then load into JGR, the Chinese character will
not display correctly.Of course,I can use iconv to convert the
character making it reada...
2009 Mar 09
1
Problem with capabilities() in R2-8.1
...quot;) :
1 argument passed to .Internal(capabilities) which requires 0
I looked at the code for source and it indeed has a call to
capabilities("iconv")
if (capabilities("iconv")) {
if (identical(encoding, "unknown")) {
enc <- utils::localeToCharset()
encoding <- enc[length(enc)]
}
So then I ran capabilities itself:
>capabilities("iconv")
Error in capabilities("iconv") :
1 argument passed to .Internal(capabilities) which requires 0
I made sure that I hadn't by accident aliased e...
2005 Oct 31
2
Sweave (R?) font encoding problems
...day 20
language R
R> Sys.getlocale()
[1]
"LC_CTYPE=pt_PT.utf-8;LC_NUMERIC=C;LC_TIME=pt_PT.utf-8;LC_COLLATE=pt_PT.utf-8;LC_MONETARY=pt_PT.utf-8;LC_MESSAGES=pt_PT.utf-8;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C"
R> localeToCharset()
[1] "ISO8859-1"
Here is a small example trying to replicate my problems:
File:exp.Rnw
================================
\documentclass[10pt,twoside]{article}
\usepackage[dvips]{graphicx}
\usepackage[portuges]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\begin{docume...
2006 Nov 28
1
problem with source(), parse() and "french" colnames
Hello every one
Working under Windows Xp in French, and R version 2.4.0 (and : >
localeToCharset() : "ISO8859-1" )
I am trying to source a file with basic commands.
source("R files/InputFile Analysis (Calculs et mises à l'échelle - gestion
des pb d'unités).r")
and it works fine as long as I do not use command like these ones :
file_table[[2]]$MES.boue.recirculé...
2017 Sep 14
0
special latin1 do not print as glyphs in current devel on windows
...quot;?"
> > (x_un2utf8 <- enc2utf8(x_un))
> [1] "?" "?" "?" "?"
>
> Long story short: The characters in the 80 to 9F range should not be
> marked as "latin1" on CP1252 locales, IMHO.
>
> As a side-note: the output of localeToCharset() is also problematic,
> since ISO8859-1 != CP1252.
>
> > localeToCharset()
> [1] "ISO8859-1"
>
> Finally on to Patrick Perry's bug report
> (https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17329): 'On
> Windows, enc2utf8("?") yields &qu...
2007 Feb 05
1
Build error with last R-devel tarball
...edit, emacs, example,
file_test, file.edit, find,
fix, fixInNamespace, flush.console, formatOL, formatUL, getAnywhere,
getFromNamespace, getS3method,
glob2rx, head, head.matrix, help, help.search, help.start, history,
index.search, install.packages, i
nstalled.packages, limitedLabels, loadhistory, localeToCharset, ls.str, lsf.str,
make.packages.html,
make.socket, memory.limit, memory.size, menu, methods, mirror2html, modifyList,
new.packag
In addition: Warning message:
S3 methods '[.getAnywhere', '[.roman', 'as.character.person',
'as.character.personList', 'as.characte
r....
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
2006 Jun 01
0
Some non-fatal startup issues
...libstdc
> ++.6.dylib
> )
(3) When I start with the most recent JGR (1.4-2 is what ?JGR tells
me), I get (here too I increased the quote level of what's different):
...
grid.xaxis grid.yaxis
> Error in switch(.Platform$OS.type, windows = { :
> could not find function "localeToCharset"
Thought on what I may have done wrong?
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
Parcels: Room 102 Gilmer Hall
McCormick Road Charlottesville, VA 229...
2008 Jan 17
0
Change R localization
...rchased mac with the Japanese input/
reader enabled, which must be where the Japanese came from. When I
uninstalled R and reinstalled it last time (I think I completely
uninstalled it, but some folders may have survived?), I installed with
the Japanese option turned off."
sessionInfo();localeToCharset()
R version 2.5.1 (2007-06-27)
powerpc-apple-darwin8.9.1
locale:
ja_JP.UTF-8/ja_JP.UTF-8/ja_JP.UTF-8/C/ja_JP.UTF-8/ja_JP.UTF-8
attached base packages:
[1] "stats" "graphics" "grDevices" "utils" "datasets"
"methods"
[7] "...
2013 Mar 20
0
Character Encoding: Why are valid Windows-1252 characters encoded as invalid ISO-8859-1 characters?
...s intended.
Using RGui v2.15.3, 64bit, on a Windows 7 machine with US English locale
You can see the behavior I describe in the following
--------------------
> Sys.getlocale("LC_CTYPE") # my default encoding is windows code page 1252
[1] "English_United States.1252"
> localeToCharset() # R thinks the best character set to use is ISO8859-1,
a subset of windows-1252
[1] "ISO8859-1"
> x<-"\x92" # I create a 'right quote' character, using a value valid in
windows-1252 but NOT VALID in ISO8859-1
> Encoding(x) # R has chosen to encode it as '...
2008 Nov 06
3
Umlaut read from csv-file
Dear All!
Reading character strings containing an "umlaut"
from a csv-file I find a (to me) surprising
behaviour in R 2.8.0, that I did not notice in R 2.7.2.
A comparison by "==" results in FALSE, while grep does find the aggreement.
See the example below.
The crucial line is x=="div 1-2 Ver?nderungen",
with the result [1] FALSE in R 2.8.0 but
[1] TRUE in R
2005 Apr 18
1
R-2.1.0 is released
...9;encoding' for a connection has changed: it now
allows any charset encoding supported by iconv on the
platform, and can re-encode output as well as input.
As the new specification is a character string and the old was
numeric, this should not cause incorrect operation.
o New function localeToCharset() to find/guess encoding(s) from
the locale name.
o nchar() returns the true number of bytes stored (including any
embedded nuls), this being 2 for missing values. It has an
optional argument 'type' with possible non-default values
"chars" and "width" to give t...
2005 Apr 18
1
R-2.1.0 is released
...9;encoding' for a connection has changed: it now
allows any charset encoding supported by iconv on the
platform, and can re-encode output as well as input.
As the new specification is a character string and the old was
numeric, this should not cause incorrect operation.
o New function localeToCharset() to find/guess encoding(s) from
the locale name.
o nchar() returns the true number of bytes stored (including any
embedded nuls), this being 2 for missing values. It has an
optional argument 'type' with possible non-default values
"chars" and "width" to give t...