From bullard at berkeley.edu  Sat Aug 27 00:56:14 2005
From: bullard at berkeley.edu (James Bullard)
Date: Fri, 26 Aug 2005 15:56:14 -0700
Subject: [Rd] wchar and wstring.
Message-ID: <430F9E0E.9020606@berkeley.edu>

Hello all, I am writing an R interface to some C++ files which make use
of std::wstring classes for internationalization. Previously (when I
wanted to make R strings from C++ std::strings), I would do something
like this to construct a string in R from the results of the parse.

SET_VECTOR_ELT(vals, i++, mkString(header.GetHeader().c_str()));


However, now the call header.GetHeader().c_str() returns a pointer to an
array of wchar_t's. I was going to use
wcstombs() to convert the wchar_t* to char*, but I wanted to see if
there was a similar function in R for the mkString function which I had
initially used which deals with wchar_ts as opposed to chars. Also,
since I have no experience with the wctombs() function I wanted to ask
if anyone knew if this will handle the internationilzation issues from
within R.


As always thank you for the help. jim



[Rd] wchar and wstring.
James Bullard