[R] UTF-8 to the console

Olivier Crouzet o||v|er@crouzet @end|ng |rom un|v-n@nte@@|r
Thu Jun 23 16:31:45 CEST 2022


Hi, 

from what I can tell, unicode-related issues (in several programming
languages) are often specifically related to the MS Windows operating
system rather than to R (though that does not imply it is irrelevant
here).

You may wish to have a look at:
https://blog.r-project.org/2020/05/02/utf-8-support-on-windows/

This may provide directions to solving your issue.

Yours.
Olivier.



On Thu, 23 Jun
2022 12:26:23 +0200 Helmut Schütz <helmut.schuetz using bebac.at> wrote:

> Dear all,
> 
> I want to send UTF-8 characters to the console. Font in the 
> GUI-Preference 'Lucida Console', supporting the desired symbols:
> greater than or equal: UTF-8 2265, HTML-entity ≥ HTML-Unicode
> ≥ TeX \ge
> approximately equal: UTF-8 2248, HTML-entity ≈ HTML-Unicode 
> ≈ TeX \approx
> 
> txt <- "x ≥ y, x \u2265 y; a ≈ b, a \u2248 b"
> Encoding(txt) <- "UTF-8"
> print(txt)
> [1] "x = y, x = y; a \230 b, a \230 b"
> cat(txt, "\n")
> x = y, x = y; a ˜ b, a ˜ b
> 
> Desired "x ≥ y, x ≥ y; a ≈ b, a ≈ b"
> 
> I'm sending the email in UTF-8. Don’t know how @r-project.org is 
> configured (ASCII?) If you see garbage, I'm sorry but you should get
> the idea.
> 
> R 4.2.0 on Windows 7 (UCRT10.0.10240.16390) and Windows 11.
> 
> Helmut
> -- 
> Ing. Helmut Schütz
> BEBAC – Consultancy Services for
> Bioequivalence and Bioavailability Studies
> Neubaugasse 36/11
> 1070 Vienna, Austria
> E helmut.schuetz using bebac.at <mailto:helmut.schuetz using bebac.at>
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html and provide commented,
> minimal, self-contained, reproducible code.


-- 
  Olivier Crouzet, PhD
  http://olivier.ghostinthemachine.space
  /Maître de Conférences/
  @LLING - Laboratoire de Linguistique de Nantes
    UMR6310 CNRS / Université de Nantes



More information about the R-help mailing list