[R] Code \255 no longer working to produce a short dash in base R PDF graphs
Paul Sherliker
p@u|@@her||ker @end|ng |rom ndph@ox@@c@uk
Thu Feb 20 16:48:39 CET 2025
Ivan Krylov wrote:
>> text(1, 11, "baseline\255defined")
>> text(1, 9, "done")
>> graphics.off()
>>
>> They like that dash - but I never knew what it was called.
>>
>> Recently work updated my PC to the latest version of Windows, and,
>> perforce, I updated to the latest version of R (4.4.2).
>
>Nowadays, the session encoding on appropriately new versions of Windows is UTF-8 [*]. Previously, the native encoding of the R session corresponded to the ANSI encoding of your computer, most likely CP1252.
>Let's see what does \255 mean in that encoding:>
>
i>conv('\255', 'CP1252', '') |> utf8ToInt() |> as.hexmode() # [1] "ad">
>
>Does '\uad' work for you?
>
>--
>Best regards,
>Ivan
Inside my pasted-together constructed titles, I have to use \u{ad}, but _that_ works perfectly. Thank you very much indeed!
Paul
[[alternative HTML version deleted]]
More information about the R-help
mailing list