|
|
Label: ♦english
♦feature request
Pompei2
created at Tuesday, 2010-04-13, 15:05:52
3 Replies, 1174 Hits
I read that 'string' is an UTF8 string while "string" is a WC-string.
In our game, we will only use UTF8. Always. It would thus be really useful if there was a compiler flag that tells Dao that "string" should be UTF-8 too. Something like compiling with -DDAO_ONLY_UTF8 so that any string is always UTF8. Or does it make more sense to define a syntax that transforms "string" into 'string', and automatically include this syntax at the beginning of every script? This feels quite hacky though. Comments
fu commented at Wednesday, 2010-04-14, 00:15:50
You can use @@X(Y), such as @@PATH() @@ECHO() @@LOCALE(), @@ON(), @@OFF(), to change some of the internal settings. So far, only @@PATH() is documented here: http://daovm.net/space/dao/page/dao_quick_guide#6.3 .
Adding @@ON(MBS) in your codes will allow all "string" to be parsed as multi-byte (utf8) strings. For the rest, see this table,
Pompei2 commented at Saturday, 2010-04-17, 13:47:24
Pompei2 modified at Saturday, 2010-04-17, 13:48:01
I see, nice to know there is such a feature. But to enable it with @@ON(MBS), this has to be done in the script, right? How can I enable this feature in my application?
I digged into the code and found out that it can probably be done by the following:
vms = DaoInit();
Is this the correct way to do it, or is there another (better) way?vms->options |= DAO_EXEC_MBS_ONLY;
fu commented at Saturday, 2010-04-17, 17:36:20
fu modified at Saturday, 2010-04-17, 20:08:13
That's the correct way to do it in your application. It is for all scripts, as long as vms is the only DaoVmSpace struct you use to handle the scripts.
|
fu: ... I forgot to say something about the plan for the whole new year in my previous reply. Well, besides w ... (Jan.19,01:40) fu: ... Happy new dragon year (which will start from this sunday)! Actually, it was a busy month (I wish th ... (Jan.18,22:46) ybabel: What's the plan for the new year ? Hello 'vry budy :- ) happy new year (when is the new year for you Fu ?) I saw you come back and comm ... (Jan.18,18:59) |