-----BEGIN PGP SIGNED MESSAGE----- Helo,
On Monday 08 March 2004 16:04, Nick Ing-Simmons wrote: > Tels <[EMAIL PROTECTED]> writes: > >I am on linux, but the same source (that uses wchar) is also compiled > > under Windows. Since it apparently works on both, I need to emulate > > both. From C++ constant strings are passed in as L"SomeString". How do > > I emulate that froma Perl e.g. convert a Perl scalar to this? > > Well C must be using locale to determine what L"" means, > snag is getting useful info back from locale system is > non-portable. I am out of my depth now ... > > >> If you encode("YourCodePage,"SomeString") then SvPV of the thing > >> should be suitably encoded can can be cast to a wchar_t * > > > >Ok, which CodePage do I then use? Yes, sorry, I don't know nothing about > >codepages, unicode etc. > > Then sadly you are either going having to find out about them or > abandon your use of wchar_t interfaces :-( Good news: I asked on the Irrlicht board, and their very helpfull answer was, use some obsucre conversation function: void setWindowCaption(SV* classname, char* caption) PREINIT: wchar_t mytitle[512]; CODE: // TODO: find out length of scalar and alloc memory for myTitle? mbstowcs(mytitle, caption, 512); device->setWindowCaption(mytitle); This works! :) However, whoever thought up the name of these conversion functions should be shot. Honestly, who can remember these cryptic garbage names like mbscwsomethingfoobar? Glad that I have to write it only once as macro in XS :) Best wishes, Tels - -- Signed on Mon Mar 8 18:24:10 2004 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "Ivonna Humpalot" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. iQEVAwUBQEys2XcLPEOTuEwVAQGTEAf7Bc9f987tDh37Za29vbBPJ/vfAJT6ExVI +xYgz33Y/p4/pdu/AosxNKdpxN2CUxZWBB5xaiTIzNQaCg70/WZnoipAZGTZyP9Z Q+qy4x4352B3FLKgTqA2awShUxqSBMVCkADBZKBcGW5Vjbhm+pxwIGuA6Sdk27nJ ewiSR/KgL1IPBdOK+dnpr287v6rGkJwISTpbaYcdrpMBw1P5W3/lv5Wgn+tZop79 ptolZzKBV8KiGiTa6gueQBSjwjSDmtKVKHWkLrluY4LAinHJJ9cM6HoTNOocy4B0 zbzLU1g8vsKq5WPWOVlaxN1CoNu3v0I+3i4P2DPBZZUdTVaMB7ZobQ== =bOxb -----END PGP SIGNATURE-----