Thanks guys. For the benefit of anyone following up on this in the future, I
solved my problem in my offending file with:

iconv -f LATIN1 -t UTF-8 methods.output.func.R >> methods.output.func.R

Mark

On Sun, May 4, 2008 at 4:13 AM, Peter Dalgaard <[EMAIL PROTECTED]>
wrote:

> Prof Brian Ripley wrote:
>
> > From the NEWS file for R-patchd:
> > >
> >
> > BUG FIXES
> >
> >    o    The parser sometimes accepted invalid quoted strings in a UTF-8
> >        locale.
> >
> > This is likely to be the issue, but we still don't have a reproducible
> > example (see the posting guide).
> >
> >  As Brian probably already knows, the issue is likely to be that your
> source file is in a non-UTF-8 encoding. (Emacs has become a little too
> smooth in handling such files almost invisibly. The magic incantation is
>
> C-x RET f utf-8
>
> before saving.)
>
> It can be reproduces as follows:
>
> [EMAIL PROTECTED] ~]$ cat > xxx.R
> "æøå"
> [EMAIL PROTECTED] ~]$ iconv -t latin1 xxx.R > xxxx.R
>
> and then R-patched gives
>
> > source("~/xxxx.R")
> Error in source("~/xxxx.R") :
>  invalid multibyte character in mbcs_get_next at line 1
>
> whereas R-2.6.2 gives
>
> > source("xxxx.R")
> > .Last.value
> $value
> [1] "\xe6\xf8\xe5"
>
> $visible
> [1] TRUE
>
>
>
>
>
>
> > On Sat, 3 May 2008, Mark Kimpel wrote:
> >
> >  I have found the cause of the problem I am having with R-patched. In my
> > > .Rprofile I have a function that loads a bunch of my own functions,
> > > one
> > > of which contains the character "(R)". No other version of R I have used
> > > since writing this function ~2 yrs. ago has had a problem reading in
> > > this
> > > character, but apparently R-patched does (invalid multibyte character
> > > in
> > > mbcs_get_next at line 17).
> > >
> >
> > That is a parser error message.
> >
> >  Has something intentional or unintentional
> > > occured to cause this? I suspect unintentional since this would seem
> > > to
> > > be a loss of functionalilty unlikely to be introduced in a patch of a
> > > release.
> > >
> > > Anyway, that's the issue, R-patched doesn't like "(R)".
> > >
> >
> > I get
> >
> >  "(R)"
> > >
> > [1] "(R)"
> >
> > in R-patched in UTF-8.
> >
> >
> > > Mark
> > >
> > >
> > > On Sat, May 3, 2008 at 4:20 PM, Prof Brian Ripley <
> > > [EMAIL PROTECTED]>
> > > wrote:
> > >      On Sat, 3 May 2008, Mark Kimpel wrote:
> > >
> > >            Just installed the latest R-patched and get the
> > >            error seen at the end of the
> > >            output below. Don't know what to make of this but
> > >            thought I should report
> > >            it.
> > >
> > >
> > > Nor do we.  You have something incorrect in your startup files, but
> > > we don't have those.
> > >
> > >      In general, when installing the latest version of R,
> > >      should one use
> > >      R-latest or R-patched? R-latest is stable, but one
> > >      would assume that
> > >      R-patched includes the latest bug fixes.
> > >
> > >
> > > And you terminolgy is from where?  (Not e.g. the R FAQ.)
> > >
> > > Mark
> > >
> > > mkimpel-m90 ~/R_HOME/R-patched/R-build/bin: ./R
> > >
> > > R version 2.7.0 Patched (2008-05-02 r45591)
> > > Copyright (C) 2008 The R Foundation for Statistical Computing
> > > ISBN 3-900051-07-0
> > >
> > > R is free software and comes with ABSOLUTELY NO WARRANTY.
> > > You are welcome to redistribute it under certain conditions.
> > > Type 'license()' or 'licence()' for distribution details.
> > >
> > >  Natural language support but running in an English locale
> > >
> > > R is a collaborative project with many contributors.
> > > Type 'contributors()' for more information and
> > > 'citation()' on how to cite R or R packages in publications.
> > >
> > > Type 'demo()' for some demos, 'help()' for on-line help, or
> > > 'help.start()' for an HTML browser interface to help.
> > > Type 'q()' to quit R.
> > >
> > > Loading required package: utils
> > > [1] "packages do not need updated"
> > > Error in source(source.files[i]) :
> > >  invalid multibyte character in mbcs_get_next at line 17
> > > [Previously saved workspace restored]
> > >
> > >      sessionInfo()
> > >
> > > R version 2.7.0 Patched (2008-05-02 r45591)
> > > x86_64-unknown-linux-gnu
> > >
> > > locale:
> > > LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_
> > >
> > > MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;L
> > >
> > > C_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
> > >
> > > attached base packages:
> > > [1] stats     graphics  grDevices datasets  utils     methods
> > >  base
> > >
> > >
> > > --
> > > Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
> > > Indiana University School of Medicine
> > >
> > > 15032 Hunter Court, Westfield, IN 46074
> > >
> > > (317) 490-5129 Work, & Mobile & VoiceMail
> > > (317) 663-0513 Home (no voice mail please)
> > >
> > > ******************************************************************
> > >
> > >       [[alternative HTML version deleted]]
> > >
> > > ______________________________________________
> > > R-devel@r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-devel
> > >
> > >
> > > --
> > > Brian D. Ripley,                  [EMAIL PROTECTED]
> > > Professor of Applied Statistics,
> > >  http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/>
> > > University of Oxford,             Tel:  +44 1865 272861 (self)
> > > 1 South Parks Road,                     +44 1865 272866 (PA)
> > > Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> > >
> > >
> > >
> > >
> > > --
> > > Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
> > > Indiana University School of Medicine
> > >
> > > 15032 Hunter Court, Westfield, IN 46074
> > >
> > > (317) 490-5129 Work, & Mobile & VoiceMail
> > > (317) 663-0513 Home (no voice mail please)
> > >
> > > ******************************************************************
> > >
> > >
> > ------------------------------------------------------------------------
> >
> > ______________________________________________
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
> >
>
>
> --
>  O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
>  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
> (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
> ~~~~~~~~~~ - ([EMAIL PROTECTED])              FAX: (+45) 35327907
>
>
>


-- 
Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
Indiana University School of Medicine

15032 Hunter Court, Westfield, IN 46074

(317) 490-5129 Work, & Mobile & VoiceMail
(317) 663-0513 Home (no voice mail please)

******************************************************************

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to