But i'll get an error like this when running that script:
no match for function call 'printString' with the parameters (wstring)
printString(custom [class std::basic_string<wchar_t,struct
std::char_traits<wchar_t>,class std::allocator<wchar_t> >])
I just don't know what to do from here.
I've searched through the code for luabind and LuaPlus for hours but I
can't find the problem.
Can anyone point me in the right direction?
Daniel Wyatt wrote:
> I need to use wstring in luabind.
> I've read this isn't really possible but I thought it may be with LuaPlus.
I don't think that'll work. There's no lua datatype tht wstring would
naturally translate to. Generally, wchar_t is a portability liability -
it's not the same size on all platforms, it's not equally supported
everywhere, etc., etc.
For unicode, I use regular char * or string satatypes that contain UTF8
data, and when an API I'm using requires 2-byte characters (Windows GUI
libraries for example) I convert from the UTF8 source strings and back.
I find that as long as you know at which level in your code's
architecture you use what, and don't get your encodings mixed up, it's
not an issue to use more than one.