[Rd] \U with more than 4 digits returns the wrong character

Richard Cotton richierocks at gmail.com
Thu Dec 4 20:00:54 CET 2014

If I type a character using \U syntax that has more than 4 digits, I
get the wrong character.  For example,


should print a mathematical bold script capital A.  See

On my machine, it prints the Hangul character corresponding to


It seems that the hex-digit part is overflowing at 16^4.

I tested this on R3.1.2 and devel (2014-12-03 r67101) x64 under
Windows.  I played around with Sys.setlocale and options("encoding"),
but couldn't get the expected value.

Can others reproduce this?  It feels like a bug, but experience tells
me I probably have something silly going on with my setup.


More information about the R-devel mailing list