[Rd] Recent changes to as.complex(NA_real_)

2023-09-20 Thread Mikael Jagan
Revisiting this thread from April: https://stat.ethz.ch/pipermail/r-devel/2023-April/082545.html where the decision (not yet backported) was made for as.complex(NA_real_) to give NA_complex_ instead of complex(r=NA_real_, i=0), to be consistent with help("as.complex") and as.complex(NA) and

Re: [Rd] proposal: 'dev.capabilities()' can also query Unicode capabilities of current graphics device

2023-09-20 Thread Paul Murrell
Hi The problem is what "supports UNICODE" means. Graphics devices have a 'hasTextUTF8' boolean to indicate that ... /* Some devices can plot UTF-8 text directly without converting to the native encoding, e.g. windows(), quartz() If this flag is true, all text *not in the

Re: [Rd] proposal: 'dev.capabilities()' can also query Unicode capabilities of current graphics device

2023-09-20 Thread Trevor Davis
> However, pdf() *does* support Unicode. When I run a simple Unicode example like: ``` f <- tempfile(fileext = ".pdf") pdf(f) # U+2655 ♥ is found in most (all?) "sans" fonts like Arial, Dejavu Sans, Arimo, etc. # However, it is not in the Latin-1 encoding grid::grid.text("\u2665") dev.off() `

Re: [Rd] proposal: 'dev.capabilities()' can also query Unicode capabilities of current graphics device

2023-09-20 Thread Martin Maechler
> Trevor Davis > on Thu, 31 Aug 2023 13:49:03 -0700 writes: > Hi, > It would be nice if `grDevices::dev.capabilities()` could also be used to > query whether the current graphics device supports Unicode. In such a case > I'd expect it to return `FALSE` if `pdf()` is