format function changes unicode characters

Viewed 22

I'm trying to use the format function, but it changes unicode charactes. You can see this happening in the example below:

> cat(format('\u2265', width=20))
=

It should print this character:

> cat('\u2265')
[1] ≥

Any ideas why this happens, and how to fix it?

1 Answers

The encodeString function doesn't have the same issue, and has the same functionality.

Related