On 3/14/06, Shawn Anderson <shawn42 / gmail.com> wrote:> As long as we're discussing unicode here,> I am testing a large C++ application and would like to wrap it with> Ruby.  However, this application makes wide use of unicode and wchar_t> in almost all it's method calls.  Can anyone help my feeble mind> understand how to do this?>> Would someone be able to point me in the direction of some example> code or such for both calling into the C++ code with a wchar_t> argument, and getting wchar_t's back from calls?  Apparently SWIG> won't touch this?
This is exactly the thing that is not supported right now. But youmight be able to convert the wide character strings to something elseusing iconv.
And you could possibly use icu4r to work with wide strings directly ifit happens to use the same wide characters. But I suspect you wouldhave to write some glue code to put it all together.
Swig is supposed to make such argument conversions easier.
Thanks
Michal

--             Support the freedom of music!Maybe it's a weird genre  ..  but weird is *not* illegal.Maybe next time they will send a special forces commandoto your picnic .. because they think you are weird. www.music-versus-guns.org  http://en.policejnistat.cz