Created attachment 1720 [details] tiny package to demonstrate the bug (use valgrind to check) Valgrind complains about title(b) when the string b contains fancy quotes. The attached package 'fake_1.0.tar.gz' demonstrates the bug when it is checked with valgrind. ............. Extract from fake-Ex.Rout ................................. > a <- dQuote("nothing") > b <- paste("This package does", a) > plot(0:1, 0:1, type="n", xlab="x", ylab="y", main=b) Warning in title(...) : conversion failure on 'This package does “nothing”' in 'mbcsToSbcs': dot substituted for <e2> ==8856== Invalid read of size 1 ==8856== at 0x618AFE8: PostScriptStringWidth (devPS.c:766) ==8856== by 0x619AE79: PDF_StrWidthUTF8 (devPS.c:8119) ==8856== by 0x80D361C: GEStrWidth (engine.c:2487) ==8856== by 0x80D408E: GEText (engine.c:1761) ==8856== by 0x61C7372: Rf_GText (graphics.c:3030) ==8856== by 0x61DDA7D: C_title (plot.c:2607) ==8856== by 0x80BB5E3: do_External (dotcode.c:530) ==8856== by 0x80C1E8B: do_Externalgr (dotcode.c:1257) ==8856== by 0x80F0733: bcEval (eval.c:4721) ==8856== by 0x80F39CA: Rf_eval (eval.c:560) ==8856== by 0x80F4D9C: Rf_applyClosure (eval.c:1044) ==8856== by 0x80ED6E5: bcEval (eval.c:4731) ==8856== Address 0xbef20920 is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes
I cannot reproduce this: x86_64 Linux, en_GB.UTF-8 (it does I think need to be in a UTF-8 locale). Neither with R 3.1.2 nor R-devel.