Gavin Simpson
2006-Sep-18 13:38 UTC
[Rd] Using \u2030 in plot axis label -> stack smashing
Dear List I just noticed the following behaviour in R 2.3.1 Patched (2006-06-13 r38342) and confirmed similar behaviour in R 2.4.0 alpha (2006-09-18 r39383) & R 2.5.0 (2006-09-18 r39383) - which may actually be the same thing?, that trying to plot the unicode character \u2030 (which should be in a ? [per mille] sign) in an axis label leads to the following error: *** stack smashing detected ***: /home/gavin/R/R-devel/build/bin/exec/R terminated Aborted The simplest, reproducible example I have tried is: plot(1:10, ylab = "\u2030") This is on a Fedora Core 5 box. Relevant version/session info below. I presume this is how you are supposed to enter Unicode characters for use in stings etc? If so, can anyone else reproduce this - or is this something peculiar to my set-up and/or lack of fonts? Cheers Gav ## R 2.3.1 patched> sessionInfo()Version 2.3.1 Patched (2006-06-13 r38342) i686-pc-linux-gnu attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base"> version_ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status Patched major 2 minor 3.1 year 2006 month 06 day 13 svn rev 38342 language R version.string Version 2.3.1 Patched (2006-06-13 r38342) ## R 2.4.0> sessionInfo()R version 2.4.0 alpha (2006-09-18 r39383) i686-pc-linux-gnu locale: LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base"> version_ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status alpha major 2 minor 4.0 year 2006 month 09 day 18 svn rev 39383 language R version.string R version 2.4.0 alpha (2006-09-18 r39383) ## R 2.5.0> sessionInfo()R version 2.5.0 Under development (unstable) (2006-09-18 r39383) i686-pc-linux-gnu locale: LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base"> version_ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status Under development (unstable) major 2 minor 5.0 year 2006 month 09 day 18 svn rev 39383 language R version.string R version 2.5.0 Under development (unstable) (2006-09-18 r39383) -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [t] +44 (0)20 7679 0522 ECRC & ENSIS, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gregor Gorjanc
2006-Sep-18 19:02 UTC
[Rd] Using \u2030 in plot axis label -> stack smashing
Gavin Simpson <gavin.simpson <at> ucl.ac.uk> writes:> > Dear List > > I just noticed the following behaviour in R 2.3.1 Patched (2006-06-13 > r38342) and confirmed similar behaviour in R 2.4.0 alpha (2006-09-18 > r39383) & R 2.5.0 (2006-09-18 r39383) - which may actually be the same > thing?, that trying to plot the unicode character \u2030 (which should > be in a ? [per mille] sign) in an axis label leads to the following > error: > > *** stack smashing detected ***: /home/gavin/R/R-devel/build/bin/exec/R > terminated > Aborted > > The simplest, reproducible example I have tried is: > > plot(1:10, ylab = "\u2030") >I can not reproduce this on my Debian GNU/Linux. I get something like "S for y label under 2.3.1 2006-06-01 and 2.5.0 2006-09-13 r39292 with the following locale [1] "LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8; LC_COLLATE=en_GB.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8; LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C; LC_IDENTIFICATION=C" It does not change if I set everything into en_GB.UTF-8. Is this valid unicode code? Gregor
Gavin Simpson
2006-Sep-18 21:18 UTC
[Rd] Using \u2030 in plot axis label -> stack smashing
On Mon, 2006-09-18 at 19:02 +0000, Gregor Gorjanc wrote:> Gavin Simpson <gavin.simpson <at> ucl.ac.uk> writes: > > > > Dear List > > > > I just noticed the following behaviour in R 2.3.1 Patched (2006-06-13 > > r38342) and confirmed similar behaviour in R 2.4.0 alpha (2006-09-18 > > r39383) & R 2.5.0 (2006-09-18 r39383) - which may actually be the same > > thing?, that trying to plot the unicode character \u2030 (which should > > be in a ? [per mille] sign) in an axis label leads to the following > > error: > > > > *** stack smashing detected ***: /home/gavin/R/R-devel/build/bin/exec/R > > terminated > > Aborted > > > > The simplest, reproducible example I have tried is: > > > > plot(1:10, ylab = "\u2030") > > > > I can not reproduce this on my Debian GNU/Linux. I get something like "S > for y label under 2.3.1 2006-06-01 and 2.5.0 2006-09-13 r39292 with the > following locale > > [1] "LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8; > LC_COLLATE=en_GB.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8; > LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C; > LC_IDENTIFICATION=C" > > It does not change if I set everything into en_GB.UTF-8. Is this valid > unicode code? > > GregorCheers for the follow up Gregor, I was following advice given by Prof. Ripley in a posting on R-Help about how to get the per mille character: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/48709.html It should look like a "%" character but with two circles at the bottom. I get the same (stack smashing) behaviour on my FC5 laptop with R 2.3.1 patched as below:> sessionInfo()Version 2.3.1 Patched (2006-09-02 r39223) i686-pc-linux-gnu attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base"> version_ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status Patched major 2 minor 3.1 year 2006 month 09 day 02 svn rev 39223 language R version.string Version 2.3.1 Patched (2006-09-02 r39223) G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [t] +44 (0)20 7679 0522 ECRC & ENSIS, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/cv/ London, UK. WC1E 6BT. [w] http://www.ucl.ac.uk/~ucfagls/ %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gregor Gorjanc
2006-Sep-19 03:14 UTC
[Rd] Using \u2030 in plot axis label -> stack smashing
Gavin Simpson wrote:> On Mon, 2006-09-18 at 19:02 +0000, Gregor Gorjanc wrote: >> Gavin Simpson <gavin.simpson <at> ucl.ac.uk> writes: >>> Dear List >>> >>> I just noticed the following behaviour in R 2.3.1 Patched (2006-06-13 >>> r38342) and confirmed similar behaviour in R 2.4.0 alpha (2006-09-18 >>> r39383) & R 2.5.0 (2006-09-18 r39383) - which may actually be the same >>> thing?, that trying to plot the unicode character \u2030 (which should >>> be in a ? [per mille] sign) in an axis label leads to the following >>> error: >>> >>> *** stack smashing detected ***: /home/gavin/R/R-devel/build/bin/exec/R >>> terminated >>> Aborted >>> >>> The simplest, reproducible example I have tried is: >>> >>> plot(1:10, ylab = "\u2030") >>> >> I can not reproduce this on my Debian GNU/Linux. I get something like "S >> for y label under 2.3.1 2006-06-01 and 2.5.0 2006-09-13 r39292 with the >> following locale >> >> [1] "LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8; >> LC_COLLATE=en_GB.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8; >> LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C; >> LC_IDENTIFICATION=C" >> >> It does not change if I set everything into en_GB.UTF-8. Is this valid >> unicode code? >> >> Gregor > > Cheers for the follow up Gregor, > > I was following advice given by Prof. Ripley in a posting on R-Help > about how to get the per mille character: > > http://finzi.psych.upenn.edu/R/Rhelp02a/archive/48709.html > > It should look like a "%" character but with two circles at the bottom.Perhaps I do not have appropriate font for this character. Gregor