Ah. Ouch. I hate x64/x86 ASM, And I understand that changing ASM is not easy without large rewrites. Thankfully I can just avoid passing (non-pod) types by value now, Now that I know what the bug is. It just really scared me that string was somehow crashing and I needed to know it was not a symptom of something else I needed to fix in my code (Stack corruption or some such).
You might also think MSVC is silly with its debug mode strings.. But you do have to admit, It did manage to find this bug! And technically the copy constructor is the correct way, even if it might end up being a little slower and would only be noticed in 0.1% of cases.
I am happy I could find a bug and help you improve Angelscript. It appears to also have had a ton of improvements since I first tried it (2.24). Oh that is right. Modfusion (http://newvegas.nexusmods.com/mods/46859) also used Angelscript. I used it for the install scripts (Detects other installed mods, DLC, etc) and to actually alter the mods themselves, as my mod manager actually parsed the entire mod like fallout new vegas would, and then would use Angelscript to call C++ functions to alter the data before writing it back to disk. Thought you might like to hear where Angelscript has turned up! Made installing of some of the other mods I wrote a LOT easier, and made some crazy mod ideas of mine possible, Like scripted replacement of objects in the game (Turning 9000 rocks and bushes into random zombies was fun..)
Also, Feel free to add that wstring version of your string registration function to Angelscript (http://pastebin.com/Zx5kvMfe , based on 2.24's string registration function). between that and setting unicode support in scripts, Angelscript has worked well in a unicode environment... Well, Except for the fact that all your C++ side functions still only take char* strings for function defs and such, so I have to run that WStringToString function on all the strings first before using them in angelscript. But ah well, Angelscript is not the only library I have to do that for and people can live with ASCII only function names if at least the strings they show users can be in unicode.