AngelScript 2.18.0 is here
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
string dd="a汉字b";
cout<<dd;
it prints:a汉字b
But after update to 2.18.0 ,there are some new warning:
Waring : Invalid unicode sequence in source
and it prints:a b
Let me know if the problem continues after that, and I'll look into it.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
[ 7%] Building CXX object src/builds/angelscript/CMakeFiles/angelscript.dir/home/samuel/working/angelscript/angelscript/source/as_scriptengine.cpp.o
/home/samuel/working/angelscript/angelscript/source/as_scriptengine.cpp: In member function ‘int asCScriptEngine::RegisterMethodToObjectType(asCObjectType*, const char*, const asSFuncPtr&, asDWORD)’:
/home/samuel/working/angelscript/angelscript/source/as_scriptengine.cpp:1982: error: no matching function for call to ‘asCBuilder::CheckNameConflictMember(asCDataType, char*, int, int)’
/home/samuel/working/angelscript/angelscript/source/as_builder.h:117: note: candidates are: int asCBuilder::CheckNameConflictMember(asCDataType&, const char*, asCScriptNode*, asCScriptCode*)
make[2]: *** [src/builds/angelscript/CMakeFiles/angelscript.dir/home/samuel/working/angelscript/angelscript/source/as_scriptengine.cpp.o] Error 1
I replace the line (.../source/as_scriptengine.cpp:1982) with:
asCDataType x = asCDataType::CreateObject(objectType, false);
r = bld.CheckNameConflictMember(x, func->name.AddressOf(), 0, 0);
I think that gcc treats a temporary object as a pointer?
Samuel E. Henley OSRail.net
Even though I'm not actively developing my game at the moment, I keep updating it to the latest AS version so it will be ready if/when I return to it, so keep up the good work!
Quote:
Original post by SEHenley
asCDataType x = asCDataType::CreateObject(objectType, false);
r = bld.CheckNameConflictMember(x, func->name.AddressOf(), 0, 0);
I think that gcc treats a temporary object as a pointer?
Thanks, I'll have this updated as soon as possible.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
Print("recieve汉字: " + a + ", " + b + "\n");
save file as simplify chinese (2312) codepage 936:
prints:recieve潞潞脳脰: 3.14159, 2.71828
save file as Unicode (UTF-8 signature) codepage 65001:
prints:recieve姹夊瓧: 3.14159, 2.71828
save file as Unicode (UTF-8 no signature) codepage 65001:
prints:recieve姹夊瓧: 3.14159, 2.71828
If you were doing this on Linux I think you would get the correct result, as I'm told Linux handles UTF-8 encoded strings natively.
If you wish to use the standard IO routines on Windows with Unicode you should be using UTF-16. You can change AngelScript to encode the string literals in UTF-16 with engine->SetEngineProperty(asEP_STRING_ENCODING, 1); But you also need to change the string type you register to use wstring instead of just string. Then you need to change the cout to wcout as well.
Another option would be to write a routine for converting the UTF-8 encoded string to UTF-16, then print that with wcout.
Regards,
Andreas
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
asCGlobalProperty
Undefined references to a whole host of methods in there, any ideas?
Using GCC 4.4.0 (Win32)
[Edited by - Wavesonics on December 22, 2009 2:47:38 PM]
Regards,
Andreas
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game