wxWidgets integration and UTF8 support


#1

Good day,

I came across ChaiScript while looking for a scripting language for a new project I gong to begin soon. The GUI toolkit will be wxWidgets for a few reasons, one being cross platform support in case it is needed, and has good international support (UTF8 natively and translation files), does not need to be high performance, but must handle huge datasets.

I spent the last few days searching for information on ChaiScript, ending up on various forums, such as Orge3D, Reddit, GameDev, StackOverflow, and many more. Finding snippets of code, videos, etc that does indicate ChaiScript to be a really simple scripting engine to embed into C++ applications, with hardly any external dependencies.

My concern is, before I even attempt to doing any coding, is to sort out all my prerequisites for the project. One is being international language support at C++ level, but also script language support as plenty datasets may be available in multiple languages. wxWidgets fulfils the C++ level requirement rather well, especially with version 3.0 now available (worked with 2.9 and 2.8 for previous projects).

What is nagging at me, and I can;t seems to find the answer on ChaiScript easily: How well does ChaiScript supports UTF8 for international projects?

Alternative to ChaiScript is Lua which supports UTF8 natively, though the C++ bindings wrappers seems to be not so well maintained, meaning most likely plenty work to be done to integrate Lua with C++.

Eagerly await your answer. :slight_smile:


#2

After 11 days of no response to my queries, I take it that ChaiScript does not support UTF-8 in scripts, and as data moving between ChaiScript and C++,

What other scripting language would you recommend that supports UTF-8 and is fairly easy to integrate with C++ not relying on unmaintained wrappers for C++.


#3

Or you could take it to mean that the developers of ChaiScript are busy, as there is no one paid to work on it full time.

ChaiScript is unconcerned with the type of data you put in your strings. See this test for an example: https://github.com/ChaiScript/ChaiScript/blob/develop/unittests/string_unicode_unicode.chai

If you end up prefering to use Lua, I strongly suggest you use the “sol2” bindings. They are actively maintained and you can easily get support from the developer here: https://gitter.im/chat-sol2/Lobby

-Jason


#4

Thank you Jason for the answer.

I was not expecting a complete source example to show that UTF-8 is supported in ChaiScript. Just a simple Yes or No would do. I take it from the unit test that ChaiScript does indeed support UTF-8, else the unit test would not have been created. I presume asset_equal() is built-in ChaiScript function.

wxWidgets wxString class does have method to validate string as UTF-8, so should be simple to integrate ChaiScript with wxWidgets.