[R-SIG-Mac] Question on warnings like "wchar_t is Unicode on this platform"

Hans-Jörg Bibiko bibiko at eva.mpg.de
Thu Jul 19 18:14:30 CEST 2012


Hi,

[Since I have not a Windows machine at hand - I cannot say if it's a general R issue.]

I'm dealing with some texts written in languages which are using e.g. this character:

Ɂ U+0241 LATIN CAPITAL LETTER GLOTTAL STOP   UTF-8: C9 81

An naïve example:

print("Ɂ")

and I get:

[1] "\u0241"
Warning message:
In print.default("\u0241") :
  it is not known that wchar_t is Unicode on this platform


utf8ToInt("Ɂ") will be processed correctly.

If I do something like:

print(intToUtf8(32:5000))

I see lots of \u.... 


Ok, I could use "cat()" to print such characters but ...

As far as I can see in e.g. "printutils.c" the decision is made due to the returned value of "iswprint()". "iswprint()" depends on locale's setting and I set locale to en_US.UTF-8.

Would it be possible to "update" the code to be able to print normal Unicode characters?
This issue also arises if I try to name e.g. rows and/or columns of R-objects.



Kind regards,
--Hans


--------
Mac OS 10.7.4

R version 2.14.2 (2012-02-29)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_2.14.2



More information about the R-SIG-Mac mailing list