From richierocks at gmail.com  Tue Sep 22 14:55:43 2015
From: richierocks at gmail.com (Richard Cotton)
Date: Tue, 22 Sep 2015 15:55:43 +0300
Subject: [Rd] Differences in printing UTF-8 strings to stdout vs. stderr
	under Windows
Message-ID: <CAPp_+=cw-1FCLmZVj7da6P1EhOysyD6sG575xhB8CJLXOmgTGw@mail.gmail.com>

It seems that under Windows, some UTF-8 strings that print OK to
stdout do not print correctly to stderr.  To reproduce:

x <- "\ub124"
cat(x, file = stdout())
## ?
cat(x, file = stderr())
## <U+B124>

Original motivating problem here:
https://stackoverflow.com/questions/32696241/how-to-display-a-message-warning-error-with-unicode-characters-under-windows

How does printing to stderr differ from printing to stdout?

And more importantly, is there any way I can ensure correct printing
of Unicode characters when I need to write to stderr (when throwing
errors or warnings)?

-- 
Regards,
Richie

Learning R
4dpiecharts.com



[Rd] Differences in printing UTF-8 strings to stdout vs. stderr under Windows
Richard Cotton